vendor: 5,111 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/terms-tcnEtsYO.js","assets/button-CzqgLvlk.js","assets/file-check-corner-Duho2vpb.js","assets/arrow-left-DQBnqOat.js","assets/privacy-CSWN64mJ.js","assets/auth-CJMIrrKo.js","assets/input-uJ98uv1a.js","assets/label-DmRTP_pp.js","assets/index-61SE6DWD.js","assets/index-CEn_ZFtW.js","assets/index-7ynCgKYc.js","assets/check-kKD71wVD.js","assets/arrow-right-CPtRxnWU.js","assets/index-DERzhTmT.js","assets/sparkles-h7VnJzkS.js","assets/upload-DaxWrHJe.js","assets/file-down-Dcu6PSdz.js","assets/file-text-CyeTtHDK.js","assets/zap-DAFHaa8D.js","assets/qa-Ct49yzW5.js","assets/auth-middleware-CYFYrGnd.js","assets/textarea-CHAPWqS3.js","assets/badge-D_c6R5eh.js","assets/wand-sparkles-DIqDF5BL.js","assets/trash-2-BMAEOaNQ.js","assets/x-Crw27WMd.js","assets/files-DldJhqHt.js","assets/pricing-4f-gZkPG.js","assets/PaymentTestModeBanner-BlhZc-tL.js","assets/onboarding-CeOCsWpL.js","assets/select-Cx2nib1r.js","assets/Combination-DfK1QEes.js","assets/knowledge.functions-DbQrtQoj.js","assets/skip-forward-CN8Rn5RA.js","assets/circle-check-DjH_4wv6.js","assets/knowledge-VbZBwi4f.js","assets/dashboard-Cmvmmm01.js","assets/projects.functions-CzFEarHk.js","assets/popover-Ca8eRGwu.js","assets/projects.new-Cig7xdm7.js","assets/projects._id-Dr2Ji0sU.js","assets/quota-toast-CTcgQxdh.js"])))=>i.map(i=>d[i]); 2function Uw(t,e){for(var s=0;s<e.length;s++){const a=e[s];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in t)){const u=Object.getOwnPropertyDescriptor(a,l);u&&Object.defineProperty(t,l,u.get?u:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qh={exports:{}},qi={};var Ym;function Lw(){if(Ym)return qi;Ym=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:t,type:a,key:c,ref:l!==void 0?l:null,props:u}}return qi.Fragment=e,qi.jsx=s,qi.jsxs=s,qi}var Qm;function Pw(){return Qm||(Qm=1,qh.exports=Lw()),qh.exports}var Q=Pw(),$h={exports:{}},ge={};var Jm;function zw(){if(Jm)return ge;Jm=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,E={};function A(C,q,G){this.props=C,this.context=q,this.refs=E,this.updater=G||S}A.prototype.isReactComponent={},A.prototype.setState=function(C,q){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,q,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=A.prototype;function j(C,q,G){this.props=C,this.context=q,this.refs=E,this.updater=G||S}var N=j.prototype=new M;N.constructor=j,O(N,A.prototype),N.isPureReactComponent=!0;var X=Array.isArray;function K(){}var I={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function W(C,q,G){var J=G.ref;return{$$typeof:t,type:C,key:q,ref:J!==void 0?J:null,props:G}}function le(C,q){return W(C.type,q,C.props)}function ae(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function me(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(G){return q[G]})}var _e=/\/+/g;function qe(C,q){return typeof C=="object"&&C!==null&&C.key!=null?me(""+C.key):q.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(K,K):(C.status="pending",C.then(function(q){C.status==="pending"&&(C.status="fulfilled",C.value=q)},function(q){C.status==="pending"&&(C.status="rejected",C.reason=q)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,q,G,J,ee){var ce=typeof C;(ce==="undefined"||ce==="boolean")&&(C=null);var we=!1;if(C===null)we=!0;else switch(ce){case"bigint":case"string":case"number":we=!0;break;case"object":switch(C.$$typeof){case t:case e:we=!0;break;case y:return we=C._init,L(we(C._payload),q,G,J,ee)}}if(we)return ee=ee(C),we=J===""?"."+qe(C,0):J,X(ee)?(G="",we!=null&&(G=we.replace(_e,"$&/")+"/"),L(ee,q,G,"",function(Nt){return Nt}
vendor: 7,063 bytes, line 2
2)):ee!=null&&(ae(ee)&&(ee=le(ee,G+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(_e,"$&/")+"/")+we)),q.push(ee)),1;we=0;var de=J===""?".":J+":";if(X(C))for(var xe=0;xe<C.length;xe++)J=C[xe],ce=de+qe(J,xe),we+=L(J,q,G,ce,ee);else if(xe=_(C),typeof xe=="function")for(C=xe.call(C),xe=0;!(J=C.next()).done;)J=J.value,ce=de+qe(J,xe++),we+=L(J,q,G,ce,ee);else if(ce==="object"){if(typeof C.then=="function")return L(Me(C),q,G,J,ee);throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return we}function Y(C,q,G){if(C==null)return C;var J=[],ee=0;return L(C,J,"","",function(ce){return q.call(G,ce,ee++)}),J}function se(C){if(C._status===-1){var q=C._result;q=q(),q.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=q)}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 q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ye={map:Y,forEach:function(C,q,G){Y(C,function(){q.apply(this,arguments)},G)},count:function(C){var q=0;return Y(C,function(){q++}),q},toArray:function(C){return Y(C,function(q){return q})||[]},only:function(C){if(!ae(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ge.Activity=m,ge.Children=ye,ge.Component=A,ge.Fragment=s,ge.Profiler=l,ge.PureComponent=j,ge.StrictMode=a,ge.Suspense=p,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ge.__COMPILER_RUNTIME={__proto__:null,c:function(C){return I.H.useMemoCache(C)}},ge.cache=function(C){return function(){return C.apply(null,arguments)}},ge.cacheSignal=function(){return null},ge.cloneElement=function(C,q,G){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=O({},C.props),ee=C.key;if(q!=null)for(ce in q.key!==void 0&&(ee=""+q.key),q)!F.call(q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&q.ref===void 0||(J[ce]=q[ce]);var ce=arguments.length-2;if(ce===1)J.children=G;else if(1<ce){for(var we=Array(ce),de=0;de<ce;de++)we[de]=arguments[de+2];J.children=we}return W(C.type,ee,J)},ge.createContext=function(C){return C={$$typeof:c,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},ge.createElement=function(C,q,G){var J,ee={},ce=null;if(q!=null)for(J in q.key!==void 0&&(ce=""+q.key),q)F.call(q,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ee[J]=q[J]);var we=arguments.length-2;if(we===1)ee.children=G;else if(1<we){for(var de=Array(we),xe=0;xe<we;xe++)de[xe]=arguments[xe+2];ee.children=de}if(C&&C.defaultProps)for(J in we=C.defaultProps,we)ee[J]===void 0&&(ee[J]=we[J]);return W(C,ce,ee)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(C){return{$$typeof:d,render:C}},ge.isValidElement=ae,ge.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:se}},ge.memo=function(C,q){return{$$typeof:g,type:C,compare:q===void 0?null:q}},ge.startTransition=function(C){var q=I.T,G={};I.T=G;try{var J=C(),ee=I.S;ee!==null&&ee(G,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(K,Se)}catch(ce){Se(ce)}finally{q!==null&&G.types!==null&&(q.types=G.types),I.T=q}},ge.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ge.use=function(C){return I.H.use(C)},ge.useActionState=function(C,q,G){return I.H.useActionState(C,q,G)},ge.useCallback=function(C,q){return I.H.useCallback(C,q)},ge.useContext=function(C){return I.H.useContext(C)},ge.useDebugValue=function(){},ge.useDeferredValue=function(C,q){return I.H.useDeferredValue(C,q)},ge.useEffect=function(C,q){return I.H.useEffect(C,q)},ge.useEffectEvent=function(C){return I.H.useEffectEvent(C)},ge.useId=function(){return I.H.useId()},ge.useImperativeHandle=function(C,q,G){return I.H.useImperativeHandle(C,q,G)},ge.useInsertionEffect=function(C,q){return I.H.useInsertionEffect(C,q)},ge.useLayoutEffect=function(C,q){return I.H.useLayoutEffect(C,q)},ge.useMemo=function(C,q){return I.H.useMemo(C,q)},ge.useOptimistic=function(C,q){return I.H.useOptimistic(C,q)},ge.useReducer=function(C,q,G){return I.H.useReducer(C,q,G)},ge.useRef=function(C){return I.H.useRef(C)},ge.useState=function(C){return I.H.useState(C)},ge.useSyncExternalStore=function(C,q,G){return I.H.useSyncExternalStore(C,q,G)},ge.useTransition=function(){return I.H.useTransition()},ge.version="19.2.5",ge}var Xm;function bo(){return Xm||(Xm=1,$h.exports=zw()),$h.exports}var oe=bo();const Z=Lv(oe),d2=Uw({__proto__:null,default:Z},[oe]);var Vh={exports:{}},$i={},Gh={exports:{}},Kh={};var Zm;function Bw(){return Zm||(Zm=1,(function(t){function e(L,Y){var se=L.length;L.push(Y);e:for(;0<se;){var Se=se-1>>>1,ye=L[Se];if(0<l(ye,Y))L[Se]=Y,L[se]=ye,se=Se;else break e}}function s(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var Y=L[0],se=L.pop();if(se!==Y){L[0]=se;e:for(var Se=0,ye=L.length,C=ye>>>1;Se<C;){var q=2*(Se+1)-1,G=L[q],J=q+1,ee=L[J];if(0>l(G,se))J<ye&&0>l(ee,G)?(L[Se]=ee,L[J]=se,Se=J):(L[Se]=G,L[q]=se,Se=q);else if(J<ye&&0>l(ee,se))L[Se]=ee,L[J]=se,Se=J;else break e}}return Y}function l(L,Y){var se=L.sortIndex-Y.sortIndex;return se!==0?se:L.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,m=null,b=3,_=!1,S=!1,O=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function N(L){for(var Y=s(g);Y!==null;){if(Y.callback===null)a(g);else if(Y.startTime<=L)a(g),Y.sortIndex=Y.expirationTime,e(p,Y);else break;Y=s(g)}}function X(L){if(O=!1,N(L),!S)if(s(p)!==null)S=!0,K||(K=!0,me());else{var Y=s(g);Y!==null&&Me(X,Y.startTime-L)}}var K=!1,I=-1,F=5,W=-1;function le(){return E?!0:!(t.unstable_now()-W<F)}function ae(){if(E=!1,K){var L=t.unstable_now();W=L;var Y=!0;try{e:{S=!1,O&&(O=!1,M(I),I=-1),_=!0;var se=b;try{t:{for(N(L),m=s(p);m!==null&&!(m.expirationTime>L&&le());){var Se=m.callback;if(typeof Se=="function"){m.callback=null,b=m.priorityLevel;var ye=Se(m.expirationTime<=L);if(L=t.unstable_now(),typeof ye=="function"){m.callback=ye,N(L),Y=!0;break t}m===s(p)&&a(p),N(L)}else a(p);m=s(p)}if(m!==null)Y=!0;else{var C=s(g);C!==null&&Me(X,C.startTime-L),Y=!1}}break e}finally{m=null,b=se,_=!1}Y=void 0}}finally{Y?me():K=!1}
vendor: 8,876 bytes, line 2
2}}var me;if(typeof j=="function")me=function(){j(ae)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,qe=_e.port2;_e.port1.onmessage=ae,me=function(){qe.postMessage(null)}}else me=function(){A(ae,0)};function Me(L,Y){I=A(function(){L(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(L){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var se=b;b=Y;try{return L()}finally{b=se}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(L,Y){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var se=b;b=L;try{return Y()}finally{b=se}},t.unstable_scheduleCallback=function(L,Y,se){var Se=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Se+se:Se):se=Se,L){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=se+ye,L={id:y++,callback:Y,priorityLevel:L,startTime:se,expirationTime:ye,sortIndex:-1},se>Se?(L.sortIndex=se,e(g,L),s(p)===null&&L===s(g)&&(O?(M(I),I=-1):O=!0,Me(X,se-Se))):(L.sortIndex=ye,e(p,L),S||_||(S=!0,K||(K=!0,me()))),L},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(L){var Y=b;return function(){var se=b;b=Y;try{return L.apply(this,arguments)}finally{b=se}}}})(Kh)),Kh}var Wm;function Iw(){return Wm||(Wm=1,Gh.exports=Bw()),Gh.exports}var Fh={exports:{}},xt={};var ey;function Hw(){if(ey)return xt;ey=1;var t=bo();function e(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(e(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:p,containerInfo:g,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,xt.createPortal=function(p,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return u(p,g,null,y)},xt.flushSync=function(p){var g=c.T,y=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=g,a.p=y,a.d.f()}},xt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(p,g))},xt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},xt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=d(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:_}):y==="script"&&a.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},xt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=d(g.as,g.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(p)},xt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=d(y,g.crossOrigin);a.d.L(p,y,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},xt.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=d(g.as,g.crossOrigin);a.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(p)},xt.requestFormReset=function(p){a.d.r(p)},xt.unstable_batchedUpdates=function(p,g){return p(g)},xt.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},xt.useFormStatus=function(){return c.H.useHostTransitionStatus()},xt.version="19.2.5",xt}var ty;function Pv(){if(ty)return Fh.exports;ty=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Fh.exports=Hw(),Fh.exports}var ny;function qw(){if(ny)return $i;ny=1;var t=Iw(),e=bo(),s=Pv();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function g(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var i=n,o=r;;){var h=i.return;if(h===null)break;var f=h.alternate;if(f===null){if(o=h.return,o!==null){i=o;continue}break}if(h.child===f.child){for(f=h.child;f;){if(f===i)return p(h),n;if(f===o)return p(h),r;f=f.sibling}throw Error(a(188))}if(i.return!==o.return)i=h,o=f;else{for(var v=!1,w=h.child;w;){if(w===i){v=!0,i=h,o=f;break}if(w===o){v=!0,o=h,i=f;break}w=w.sibling}if(!v){for(w=f.child;w;){if(w===i){v=!0,i=f,o=h;break}if(w===o){v=!0,o=f,i=h;break}w=w.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function me(n){return n===null||typeof n!="object"?null:(n=ae&&n[ae]||n["@@iterator"],typeof n=="function"?n:null)}var _e=Symbol.for("react.client.reference");function qe(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===_e?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case O:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case K:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case j:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case N:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case I:return r=n.displayName||null,r!==null?r:qe(n.type)||"Memo";case F:r=n._payload,n=n._init;try{return qe(n(r))}catch{}}return null}var Me=Array.isArray,L=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pen
vendor: 4,200 bytes, lines 2-9
2ding:!1,data:null,method:null,action:null},Se=[],ye=-1;function C(n){return{current:n}}function q(n){0>ye||(n.current=Se[ye],Se[ye]=null,ye--)}function G(n,r){ye++,Se[ye]=n.current,n.current=r}var J=C(null),ee=C(null),ce=C(null),we=C(null);function de(n,r){switch(G(ce,r),G(ee,n),G(J,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?ym(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=ym(r),n=vm(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(J),G(J,n)}function xe(){q(J),q(ee),q(ce)}function Nt(n){n.memoizedState!==null&&G(we,n);var r=J.current,i=vm(r,n.type);r!==i&&(G(ee,n),G(J,i))}function Ut(n){ee.current===n&&(q(J),q(ee)),we.current===n&&(q(we),zi._currentValue=se)}var kt,us;function Lt(n){if(kt===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);kt=r&&r[1]||"",us=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+kt+n+us}var cs=!1;function Fn(n,r){if(!n||cs)return"";cs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(B){var z=B}Reflect.construct(n,[],V)}else{try{V.call()}catch(B){z=B}n.call(V.prototype)}}else{try{throw Error()}catch(B){z=B}(V=n())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(B){if(B&&z&&typeof B.stack=="string")return[B.stack,z.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),v=f[0],w=f[1];if(v&&w){var x=v.split(` 5`),P=w.split(` 6`);for(h=o=0;o<x.length&&!x[o].includes("DetermineComponentFrameRoot");)o++;for(;h<P.length&&!P[h].includes("DetermineComponentFrameRoot");)h++;if(o===x.length||h===P.length)for(o=x.length-1,h=P.length-1;1<=o&&0<=h&&x[o]!==P[h];)h--;for(;1<=o&&0<=h;o--,h--)if(x[o]!==P[h]){if(o!==1||h!==1)do if(o--,h--,0>h||x[o]!==P[h]){var H=` 7`+x[o].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=o&&0<=h);break}}}finally{cs=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?Lt(i):""}function Dn(n,r){switch(n.tag){case 26:case 27:case 5:return Lt(n.type);case 16:return Lt("Lazy");case 13:return n.child!==r&&r!==null?Lt("Suspense Fallback"):Lt("Suspense");case 19:return Lt("SuspenseList");case 0:case 15:return Fn(n.type,!1);case 11:return Fn(n.type.render,!1);case 1:return Fn(n.type,!0);case 31:return Lt("Activity");default:return""}}function ln(n){try{var r="",i=null;do r+=Dn(n,i),i=n,n=n.return;while(n);return r}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var bt=Object.prototype.hasOwnProperty,Zt=t.unstable_scheduleCallback,hs=t.unstable_cancelCallback,ft=t.unstable_shouldYield,Nn=t.unstable_requestPaint,dt=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,un=t.unstable_UserBlockingPriority,Yn=t.unstable_NormalPriority,Xa=t.unstable_LowPriority,Qn=t.unstable_IdlePriority,So=t.log,Sr=t.unstable_setDisableYieldValue,fs=null,jt=null;function Tn(n){if(typeof So=="function"&&Sr(n),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(fs,n)}catch{}}var At=Math.clz32?Math.clz32:Un,ju=Math.log,Za=Math.LN2;function Un(n){return n>>>=0,n===0?32:31-(ju(n)/Za|0)|0}var Ks=256,Fs=262144,ds=4194304;function Ln(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;
vendor: 7,104 bytes, line 9
9case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function pe(n,r,i){var o=n.pendingLanes;if(o===0)return 0;var h=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var w=o&134217727;return w!==0?(o=w&~f,o!==0?h=Ln(o):(v&=w,v!==0?h=Ln(v):i||(i=w&~n,i!==0&&(h=Ln(i))))):(w=o&~f,w!==0?h=Ln(w):v!==0?h=Ln(v):i||(i=o&~n,i!==0&&(h=Ln(i)))),h===0?0:r!==0&&r!==h&&(r&f)===0&&(f=h&-h,i=r&-r,f>=i||f===32&&(i&4194048)!==0)?r:h}function Ke(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function pt(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ot(){var n=ds;return ds<<=1,(ds&62914560)===0&&(ds=4194304),n}function Er(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Qe(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Pt(n,r,i,o,h,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var w=n.entanglements,x=n.expirationTimes,P=n.hiddenUpdates;for(i=v&~i;0<i;){var H=31-At(i),V=1<<H;w[H]=0,x[H]=-1;var z=P[H];if(z!==null)for(P[H]=null,H=0;H<z.length;H++){var B=z[H];B!==null&&(B.lane&=-536870913)}i&=~V}o!==0&&ps(n,o,0),f!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~r))}function ps(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-At(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function zt(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var o=31-At(i),h=1<<o;h&r|n[o]&r&&(n[o]|=r),i&=~h}}function Bt(n,r){var i=r&-r;return i=(i&42)!==0?1:Ys(i),(i&(n.suspendedLanes|r))!==0?0:i}function Ys(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 Mu(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Hm(n.type))}function rd(n,r){var i=Y.p;try{return Y.p=n,r()}finally{Y.p=i}}var Tr=Math.random().toString(36).slice(2),_t="__reactFiber$"+Tr,It="__reactProps$"+Tr,Qs="__reactContainer$"+Tr,Du="__reactEvents$"+Tr,Tb="__reactListeners$"+Tr,Rb="__reactHandles$"+Tr,sd="__reactResources$"+Tr,Wa="__reactMarker$"+Tr;function Nu(n){delete n[_t],delete n[It],delete n[Du],delete n[Tb],delete n[Rb]}function Js(n){var r=n[_t];if(r)return r;for(var i=n.parentNode;i;){if(r=i[Qs]||i[_t]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=Rm(n);n!==null;){if(i=n[_t])return i;n=Rm(n)}return r}n=i,i=n.parentNode}return null}function Xs(n){if(n=n[_t]||n[Qs]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function ei(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function Zs(n){var r=n[sd];return r||(r=n[sd]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function gt(n){n[Wa]=!0}var ad=new Set,id={};function gs(n,r){Ws(n,r),Ws(n+"Capture",r)}function Ws(n,r){for(id[n]=r,n=0;n<r.length;n++)ad.add(r[n])}var Ab=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),od={},ld={};function Ob(n){return bt.call(ld,n)?!0:bt.call(od,n)?!1:Ab.test(n)?ld[n]=!0:(od[n]=!0,!1)}function Eo(n,r,i){if(Ob(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function To(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function Jn(n,r,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+o)}}function cn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ud(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function xb(n,r,i){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,f=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Uu(n){if(!n._valueTracker){var r=ud(n)?"checked":"value";n._valueTracker=xb(n,r,""+n[r])}}function cd(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),o="";return n&&(o=ud(n)?n.checked?"true":"false":n.value),n=o,n!==i?(r.setValue(n),!0):!1}function Ro(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Cb=/[\n"\\]/g;function hn(n){return n.replace(Cb,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Lu(n,r,i,o,h,f,v,w){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+cn(r)):n.value!==""+cn(r)&&(n.value=""+cn(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?Pu(n,v,cn(r)):i!=null?Pu(n,v,cn(i)):o!=null&&n.removeAttribute("value"),h==null&&f!=null&&(n.defaultChecked=!!f),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+cn(w):n.removeAttribute("name")}function hd(n,r,i,o,h,f,v,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),r!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){Uu(n);return}i=i!=null?""+cn(i):"",r=r!=null?""+cn(r):i,w||r===n.value||(n.value=r),n.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=w?
vendor: 5,194 bytes, line 9
9n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Uu(n)}function Pu(n,r,i){r==="number"&&Ro(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ea(n,r,i,o){if(n=n.options,r){r={};for(var h=0;h<i.length;h++)r["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=r.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&o&&(n[i].defaultSelected=!0)}else{for(i=""+cn(i),r=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,o&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function fd(n,r,i){if(r!=null&&(r=""+cn(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+cn(i):""}function dd(n,r,i,o){if(r==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=""),r=i}i=cn(r),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),Uu(n)}function ta(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var kb=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 pd(n,r,i){var o=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,i):typeof i!="number"||i===0||kb.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function gd(n,r,i){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var h in r)o=r[h],r.hasOwnProperty(h)&&i[h]!==o&&pd(n,h,o)}else for(var f in r)r.hasOwnProperty(f)&&pd(n,f,r[f])}function zu(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 jb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
9-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"]]),Mb=/^[\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 Ao(n){return Mb.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Xn(){}var Bu=null;function Iu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var na=null,ra=null;function md(n){var r=Xs(n);if(r&&(n=r.stateNode)){var i=n[It]||null;e:switch(n=r.stateNode,r.type){case"input":if(Lu(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+hn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var o=i[r];if(o!==n&&o.form===n.form){var h=o[It]||null;if(!h)throw Error(a(90));Lu(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<i.length;r++)o=i[r],o.form===n.form&&cd(o)}break e;case"textarea":fd(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&ea(n,!!i.multiple,r,!1)}}}var Hu=!1;function yd(n,r,i){if(Hu)return n(r,i);Hu=!0;try{var o=n(r);return o}finally{if(Hu=!1,(na!==null||ra!==null)&&(dl(),na&&(r=na,n=ra,ra=na=null,md(r),n)))for(r=0;r<n.length;r++)md(n[r])}}function ti(n,r){var i=n.stateNode;if(i===null)return null;var o=i[It]||null;if(o===null)return null;i=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,r,typeof i));return i}var Zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=!1;if(Zn)try{var ni={};Object.defineProperty(ni,"passive",{get:function(){qu=!0}}),window.addEventListener("test",ni,ni),window.removeEventListener("test",ni,ni)}catch{qu=!1}var Rr=null,$u=null,Oo=null;function vd(){if(Oo)return Oo;var n,r=$u,i=r.length,o,h="value"in Rr?Rr.value:Rr.textContent,f=h.length;for(n=0;n<i&&r[n]===h[n];n++);var v=i-n;for(o=1;o<=v&&r[i-o]===h[f-o];o++);return Oo=h.slice(n,1<o?1-o:void 0)}function xo(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Co(){return!0}function bd(){return!1}function Ht(n){function r(i,o,h,f,v){this._reactName=i,this._targetInst=h,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(i=n[w],this[w]=i?i(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Co:bd,this.isPropagationStopped=bd,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),r}var ms={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ko=Ht(ms),ri=m({},ms,{view:0,detail:0}),Db=Ht(ri),Vu,Gu,si,jo=m({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==si&&(si&&n.type==="mousemove"?(Vu=n.screenX-si.screenX,Gu=n.screenY-si.screenY):Gu=Vu=0,si=n),Vu)},movementY:function(n){return"movementY"in n?n.movementY:Gu}}),_d=Ht(jo),Nb=m({},jo,{dataTransfer:0}),Ub=Ht(Nb),Lb=m({},ri,{relatedTarget:0}),Ku=Ht(Lb),Pb=m({},ms,{animationName:0,elapsedTime:0,pseudoElement:0}),zb=Ht(Pb),Bb=m({},ms,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Ib=Ht(Bb),Hb=m({},ms,{data:0}),wd=Ht(Hb),qb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$b={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"},Vb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gb(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Vb[n])?!!r[n]:!1}function Fu(){return Gb}var Kb=m({},ri,{key:function(n){if(n.key){var r=qb[n.key]||n.key;if(r!=="Unidentified")return r}
vendor: 5,186 bytes, line 9
9return n.type==="keypress"?(n=xo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?$b[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(n){return n.type==="keypress"?xo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?xo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Fb=Ht(Kb),Yb=m({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sd=Ht(Yb),Qb=m({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),Jb=Ht(Qb),Xb=m({},ms,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zb=Ht(Xb),Wb=m({},jo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),e_=Ht(Wb),t_=m({},ms,{newState:0,oldState:0}),n_=Ht(t_),r_=[9,13,27,32],Yu=Zn&&"CompositionEvent"in window,ai=null;Zn&&"documentMode"in document&&(ai=document.documentMode);var s_=Zn&&"TextEvent"in window&&!ai,Ed=Zn&&(!Yu||ai&&8<ai&&11>=ai),Td=" ",Rd=!1;function Ad(n,r){switch(n){case"keyup":return r_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Od(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var sa=!1;function a_(n,r){switch(n){case"compositionend":return Od(r);case"keypress":return r.which!==32?null:(Rd=!0,Td);case"textInput":return n=r.data,n===Td&&Rd?null:n;default:return null}}function i_(n,r){if(sa)return n==="compositionend"||!Yu&&Ad(n,r)?(n=vd(),Oo=$u=Rr=null,sa=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ed&&r.locale!=="ko"?null:r.data;default:return null}}var o_={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 xd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!o_[n.type]:r==="textarea"}function Cd(n,r,i,o){na?ra?ra.push(o):ra=[o]:na=o,r=_l(r,"onChange"),0<r.length&&(i=new ko("onChange","change",null,i,o),n.push({event:i,listeners:r}))}var ii=null,oi=null;function l_(n){hm(n,0)}function Mo(n){var r=ei(n);if(cd(r))return n}function kd(n,r){if(n==="change")return r}var jd=!1;if(Zn){var Qu;if(Zn){var Ju="oninput"in document;if(!Ju){var Md=document.createElement("div");Md.setAttribute("oninput","return;"),Ju=typeof Md.oninput=="function"}Qu=Ju}else Qu=!1;jd=Qu&&(!document.documentMode||9<document.documentMode)}function Dd(){ii&&(ii.detachEvent("onpropertychange",Nd),oi=ii=null)}function Nd(n){if(n.propertyName==="value"&&Mo(oi)){var r=[];Cd(r,oi,n,Iu(n)),yd(l_,r)}}function u_(n,r,i){n==="focusin"?(Dd(),ii=r,oi=i,ii.attachEvent("onpropertychange",Nd)):n==="focusout"&&Dd()}function c_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Mo(oi)}function h_(n,r){if(n==="click")return Mo(r)}function f_(n,r){if(n==="input"||n==="change")return Mo(r)}function d_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Wt=typeof Object.is=="function"?Object.is:d_;function li(n,r){if(Wt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var h=i[o];if(!bt.call(r,h)||!Wt(n[h],r[h]))return!1}return!0}function Ud(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ld(n,r){var i=Ud(n);n=0;for(var o;i;){if(i.nodeType===3){if(o=n+i.textContent.length,n<=r&&o>=r)return{node:i,offset:r-n};n=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ud(i)}}function Pd(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Pd(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function zd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Ro(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=Ro(n.document)}return r}function Xu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var p_=Zn&&"documentMode"in document&&11>=document.documentMode,aa=null,Zu=null,ui=null,Wu=!1;function Bd(n,r,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wu||aa==null||aa!==Ro(o)||(o=aa,"selectionStart"in o&&Xu(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: 15,184 bytes, line 9
9sNode:o.focusNode,focusOffset:o.focusOffset}),ui&&li(ui,o)||(ui=o,o=_l(Zu,"onSelect"),0<o.length&&(r=new ko("onSelect","select",null,r,i),n.push({event:r,listeners:o}),r.target=aa)))}function ys(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var ia={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionrun:ys("Transition","TransitionRun"),transitionstart:ys("Transition","TransitionStart"),transitioncancel:ys("Transition","TransitionCancel"),transitionend:ys("Transition","TransitionEnd")},ec={},Id={};Zn&&(Id=document.createElement("div").style,"AnimationEvent"in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),"TransitionEvent"in window||delete ia.transitionend.transition);function vs(n){if(ec[n])return ec[n];if(!ia[n])return n;var r=ia[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in Id)return ec[n]=r[i];return n}var Hd=vs("animationend"),qd=vs("animationiteration"),$d=vs("animationstart"),g_=vs("transitionrun"),m_=vs("transitionstart"),y_=vs("transitioncancel"),Vd=vs("transitionend"),Gd=new Map,tc="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(" ");tc.push("scrollEnd");function An(n,r){Gd.set(n,r),gs(r,[n])}var Do=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},fn=[],oa=0,nc=0;function No(){for(var n=oa,r=nc=oa=0;r<n;){var i=fn[r];fn[r++]=null;var o=fn[r];fn[r++]=null;var h=fn[r];fn[r++]=null;var f=fn[r];if(fn[r++]=null,o!==null&&h!==null){var v=o.pending;v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}f!==0&&Kd(i,h,f)}}function Uo(n,r,i,o){fn[oa++]=n,fn[oa++]=r,fn[oa++]=i,fn[oa++]=o,nc|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function rc(n,r,i,o){return Uo(n,r,i,o),Lo(n)}function bs(n,r){return Uo(n,null,null,r),Lo(n)}function Kd(n,r,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var h=!1,f=n.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(h=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,h&&r!==null&&(h=31-At(i),n=f.hiddenUpdates,o=n[h],o===null?n[h]=[r]:o.push(r),r.lane=i|536870912),f):null}function Lo(n){if(50<ji)throw ji=0,fh=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var la={};function v_(n,r,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(n,r,i,o){return new v_(n,r,i,o)}function sc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Wn(n,r){var i=n.alternate;return i===null?(i=en(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Fd(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Po(n,r,i,o,h,f){var v=0;if(o=n,typeof n=="function")sc(n)&&(v=1);else if(typeof n=="string")v=Ew(n,i,J.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=en(31,i,r,h),n.elementType=W,n.lanes=f,n;case O:return _s(i.children,h,f,r);case E:v=8,h|=24;break;case A:return n=en(12,i,r,h|2),n.elementType=A,n.lanes=f,n;case X:return n=en(13,i,r,h),n.elementType=X,n.lanes=f,n;case K:return n=en(19,i,r,h),n.elementType=K,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case M:v=9;break e;case N: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 r=en(v,i,r,h),r.elementType=n,r.type=o,r.lanes=f,r}function _s(n,r,i,o){return n=en(7,n,o,r),n.lanes=i,n}function ac(n,r,i){return n=en(6,n,null,r),n.lanes=i,n}function Yd(n){var r=en(18,null,null,0);return r.stateNode=n,r}function ic(n,r,i){return r=en(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Qd=new WeakMap;function dn(n,r){if(typeof n=="object"&&n!==null){var i=Qd.get(n);return i!==void 0?i:(r={value:n,source:r,stack:ln(r)},Qd.set(n,r),r)}return{value:n,source:r,stack:ln(r)}}var ua=[],ca=0,zo=null,ci=0,pn=[],gn=0,Ar=null,Pn=1,zn="";function er(n,r){ua[ca++]=ci,ua[ca++]=zo,zo=n,ci=r}function Jd(n,r,i){pn[gn++]=Pn,pn[gn++]=zn,pn[gn++]=Ar,Ar=n;var o=Pn;n=zn;var h=32-At(o)-1;o&=~(1<<h),i+=1;var f=32-At(r)+h;if(30<f){var v=h-h%5;f=(o&(1<<v)-1).toString(32),o>>=v,h-=v,Pn=1<<32-At(r)+h|i<<h|o,zn=f+n}else Pn=1<<f|i<<h|o,zn=n}function oc(n){n.return!==null&&(er(n,1),Jd(n,1,0))}function lc(n){for(;n===zo;)zo=ua[--ca],ua[ca]=null,ci=ua[--ca],ua[ca]=null;for(;n===Ar;)Ar=pn[--gn],pn[gn]=null,zn=pn[--gn],pn[gn]=null,Pn=pn[--gn],pn[gn]=null}function Xd(n,r){pn[gn++]=Pn,pn[gn++]=zn,pn[gn++]=Ar,Pn=r.id,zn=r.overflow,Ar=n}var wt=null,Ve=null,Oe=!1,Or=null,mn=!1,uc=Error(a(519));function xr(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hi(dn(r,n)),uc}function Zd(n){var r=n.stateNode,i=n.type,o=n.memoizedProps;switch(r[_t]=n,r[It]=o,i){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(i=0;i<Di.length;i++)Te(Di[i],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":Te("invalid",r),hd(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Te("invalid",r);break;case"textarea":Te("invalid",r),dd(r,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||o.suppressHydrationWarning===!0||gm(r.textContent,i)?(o.popover!=null&&(Te("beforetoggle",r),Te("toggle",r)),o.onScroll!=null&&Te("scroll",r),o.onScrollEnd!=null&&Te("scrollend",r),o.onClick!=null&&(r.onclick=Xn),r=!0):r=!1,r||xr(n,!0)}function Wd(n){for(wt=n.return;wt;)switch(wt.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:wt=wt.return}}function ha(n){if(n!==wt)return!1;if(!Oe)return Wd(n),Oe=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Oh(n.type,n.memoizedProps)),i=!i),i&&Ve&&xr(n),Wd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ve=Tm(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ve=Tm(n)}else r===27?(r=Ve,qr(n.type)?(n=Mh,Mh=null,Ve=n):Ve=r):Ve=wt?vn(n.stateNode.nextSibling):null;return!0}function ws(){Ve=wt=null,Oe=!1}function cc(){var n=Or;return n!==null&&(Gt===null?Gt=n:Gt.push.apply(Gt,n),Or=null),n}function hi(n){Or===null?Or=[n]:Or.push(n)}var hc=C(null),Ss=null,tr=null;function Cr(n,r,i){G(hc,r._currentValue),r._currentValue=i}function nr(n){n._currentValue=hc.current,q(hc)}function fc(n,r,i){for(;n!==null;){var o=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),n===i)break;n=n.return}}function dc(n,r,i,o){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var f=h.dependencies;if(f!==null){var v=h.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=h;for(var x=0;x<r.length;x++)if(w.context===r[x]){f.lanes|=i,w=f.alternate,w!==null&&(w.lanes|=i),fc(f.return,i,n),o||(v=null);break e}f=w.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),fc(v,i,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function fa(n,r,i,o){n=null;for(var h=r,f=!1;h!==null;){if(!f){if((h.flags&524288)!==0)f=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var w=h.type;Wt(h.pendingProps.value,v.value)||(n!==null?n.push(w):n=[w])}}else if(h===we.current){if(v=h.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(zi):n=[zi])}h=h.return}n!==null&&dc(r,n,i,o),r.flags|=262144}function Bo(n){for(n=n.firstContext;n!==null;){if(!Wt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Es(n){Ss=n,tr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function St(n){return ep(Ss,n)}function Io(n,r){return Ss===null&&Es(n),ep(n,r)}function ep(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},tr===null){if(n===null)throw Error(a(308));tr=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else tr=tr.next=r;return i}var b_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},__=t.unstable_scheduleCallback,w_=t.unstable_NormalPriority,nt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pc(){return{controller:new b_,data:new Map,refCount:0}}function fi(n){n.refCount--,n.refCount===0&&__(w_,function(){n.controller.abort()})}var di=null,gc=0,da=0,pa=null;function S_(n,r){if(di===null){var i=di=[];gc=0,da=vh(),pa={status:"pending",value:void 0,then:function(o){i.push(o)}}}return gc++,r.then(tp,tp),r}function tp(){if(--gc===0&&di!==null){pa!==null&&(pa.status="fulfilled");var n=di;di=null,da=0,pa=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function E_(n,r){var i=[],o={status:"pending",value:null,reason:null,then:function(h){i.push(h)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<i.length;h++)(0,i[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<i.length;h++)(0,i[h])(void 0)}),o}var np=L.S;L.S=function(n,r){Bg=dt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&S_(n,r),np!==null&&np(n,r)};var Ts=C(null);function mc(){var n=Ts.current;return n!==null?n:Ie.pooledCache}function Ho(n,r){r===null?G(Ts,Ts.current):G(Ts,r.pool)}function rp(){var n=mc();return n===null?null:{parent:nt._currentValue,pool:n}}var ga=Error(a(460)),yc=Error(a(474)),qo=Error(a(542)),$o={then:function(){}};function sp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function ap(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(Xn,Xn),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,op(n),n;default:if(typeof r.status=="string")r.then(Xn,Xn);else{if(n=Ie,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,op(n),n}throw As=r,ga}}function Rs(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(As=i,ga):i}}var As=null;function ip(){if(As===null)throw Error(a(459));var n=As;return As=null,n}function op(n){if(n===ga||n===qo)throw Error(a(483))}var ma=null,pi=0;function Vo(n){var r=pi;return pi+=1,ma===null&&(ma=[]),ap(ma,n,r)}function gi(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Go(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function lp(n){function r(D,k){if(n){var U=D.deletions;U===null?(D.deletions=[k],D.flags|=16):U.push(k)}}function i(D,k){if(!n)return null;for(;k!==null;)r(D,k),k=k.sibling;return null}function o(D){for(var k=new Map;D!==null;)D.key!==null?k.set(D.key,D):k.set(D.index,D),D=D.sibling;return k}function h(D,k){return D=Wn(D,k),D.index=0,D.sibling=null,D}function f(D,k,U){return D.index=U,n?(U=D.alternate,U!==null?(U=U.index,U<k?(D.flags|=67108866,k):U):(D.flags|=67108866,k)):(D.flags|=1048576,k)}function v(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function w(D,k,U,$){return k===null||k.tag!==6?(k=ac(U,D.mode,$),k.return=D,k):(k=h(k,U),k.return=D,k)}function x(D,k,U,$){var ue=U.type;return ue===O?H(D,k,U.props.children,$,U.key):k!==null&&(k.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&Rs(ue)===k.type)?(k=h(k,U.props),gi(k,U),k.return=D,k):(k=Po(U.type,U.key,U.props,null,D.mode,$),gi(k,U),k.return=D,k)}function P(D,k,U,$){return k===null||k.tag!==4||k.stateNode.containerInfo!==U.containerInfo||k.stateNode.implementation!==U.implementation?(k=ic(U,D.mode,$),k.return=D,k):(k=h(k,U.children||[]),k.return=D,k)}function H(D,k,U,$,ue){return k===null||k.tag!==7?(k=_s(U,D.mode,$,ue),k.return=D,k):(k=h(k,U),k.return=D,k)}function V(D,k,U){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ac(""+k,D.mode,U),k.return=D,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _:return U=Po(k.type,k.key,k.props,null,D.mode,U),gi(U,k),U.return=D,U;case S:return k=ic(k,D.mode,U),k.return=D,k;case F:return k=Rs(k),V(D,k,U)}if(Me(k)||me(k))return k=_s(k,D.mode,U,null),k.return=D,k;
vendor: 4,747 bytes, line 9
9if(typeof k.then=="function")return V(D,Vo(k),U);if(k.$$typeof===j)return V(D,Io(D,k),U);Go(D,k)}return null}function z(D,k,U,$){var ue=k!==null?k.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ue!==null?null:w(D,k,""+U,$);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case _:return U.key===ue?x(D,k,U,$):null;case S:return U.key===ue?P(D,k,U,$):null;case F:return U=Rs(U),z(D,k,U,$)}if(Me(U)||me(U))return ue!==null?null:H(D,k,U,$,null);if(typeof U.then=="function")return z(D,k,Vo(U),$);if(U.$$typeof===j)return z(D,k,Io(D,U),$);Go(D,U)}return null}function B(D,k,U,$,ue){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return D=D.get(U)||null,w(k,D,""+$,ue);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return D=D.get($.key===null?U:$.key)||null,x(k,D,$,ue);case S:return D=D.get($.key===null?U:$.key)||null,P(k,D,$,ue);case F:return $=Rs($),B(D,k,U,$,ue)}if(Me($)||me($))return D=D.get(U)||null,H(k,D,$,ue,null);if(typeof $.then=="function")return B(D,k,U,Vo($),ue);if($.$$typeof===j)return B(D,k,U,Io(k,$),ue);Go(k,$)}return null}function ne(D,k,U,$){for(var ue=null,Ce=null,ie=k,be=k=0,Ae=null;ie!==null&&be<U.length;be++){ie.index>be?(Ae=ie,ie=null):Ae=ie.sibling;var ke=z(D,ie,U[be],$);if(ke===null){ie===null&&(ie=Ae);break}n&&ie&&ke.alternate===null&&r(D,ie),k=f(ke,k,be),Ce===null?ue=ke:Ce.sibling=ke,Ce=ke,ie=Ae}if(be===U.length)return i(D,ie),Oe&&er(D,be),ue;if(ie===null){for(;be<U.length;be++)ie=V(D,U[be],$),ie!==null&&(k=f(ie,k,be),Ce===null?ue=ie:Ce.sibling=ie,Ce=ie);return Oe&&er(D,be),ue}for(ie=o(ie);be<U.length;be++)Ae=B(ie,D,be,U[be],$),Ae!==null&&(n&&Ae.alternate!==null&&ie.delete(Ae.key===null?be:Ae.key),k=f(Ae,k,be),Ce===null?ue=Ae:Ce.sibling=Ae,Ce=Ae);return n&&ie.forEach(function(Fr){return r(D,Fr)}),Oe&&er(D,be),ue}function he(D,k,U,$){if(U==null)throw Error(a(151));for(var ue=null,Ce=null,ie=k,be=k=0,Ae=null,ke=U.next();ie!==null&&!ke.done;be++,ke=U.next()){ie.index>be?(Ae=ie,ie=null):Ae=ie.sibling;var Fr=z(D,ie,ke.value,$);if(Fr===null){ie===null&&(ie=Ae);break}n&&ie&&Fr.alternate===null&&r(D,ie),k=f(Fr,k,be),Ce===null?ue=Fr:Ce.sibling=Fr,Ce=Fr,ie=Ae}if(ke.done)return i(D,ie),Oe&&er(D,be),ue;if(ie===null){for(;!ke.done;be++,ke=U.next())ke=V(D,ke.value,$),ke!==null&&(k=f(ke,k,be),Ce===null?ue=ke:Ce.sibling=ke,Ce=ke);return Oe&&er(D,be),ue}for(ie=o(ie);!ke.done;be++,ke=U.next())ke=B(ie,D,be,ke.value,$),ke!==null&&(n&&ke.alternate!==null&&ie.delete(ke.key===null?be:ke.key),k=f(ke,k,be),Ce===null?ue=ke:Ce.sibling=ke,Ce=ke);return n&&ie.forEach(function(Nw){return r(D,Nw)}),Oe&&er(D,be),ue}function Be(D,k,U,$){if(typeof U=="object"&&U!==null&&U.type===O&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case _:e:{for(var ue=U.key;k!==null;){if(k.key===ue){if(ue=U.type,ue===O){if(k.tag===7){i(D,k.sibling),$=h(k,U.props.children),$.return=D,D=$;break e}}else if(k.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&Rs(ue)===k.type){i(D,k.sibling),$=h(k,U.props),gi($,U),$.return=D,D=$;break e}i(D,k);break}else r(D,k);k=k.sibling}U.type===O?($=_s(U.props.children,D.mode,$,U.key),$.return=D,D=$):($=Po(U.type,U.key,U.props,null,D.mode,$),gi($,U),$.return=D,D=$)}return v(D);case S:e:{for(ue=U.key;k!==null;){if(k.key===ue)if(k.tag===4&&k.stateNode.containerInfo===U.containerInfo&&k.stateNode.implementation===U.implementation){i(D,k.sibling),$=h(k,U.children||[]),$.return=D,D=$;break e}else{i(D,k);break}else r(D,k);k=k.sibling}$=ic(U,D.mode,$),$.return=D,D=$}return v(D);case F:return U=Rs(U),Be(D,k,U,$)}if(Me(U))return ne(D,k,U,$);if(me(U)){if(ue=me(U),typeof ue!="function")throw Error(a(150));return U=ue.call(U),he(D,k,U,$)}if(typeof U.then=="function")return Be(D,k,Vo(U),$);if(U.$$typeof===j)return Be(D,k,Io(D,U),$);Go(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,k!==null&&k.tag===6?(i(D,k.sibling),$=h(k,U),$.return=D,D=$):(i(D,k),$=ac(U,D.mode,$),$.return=D,D=$),v(D)):i(D,k)}return function(D,k,U,$){try{pi=0;var ue=Be(D,k,U,$);return ma=null,ue}catch(ie){if(ie===ga||ie===qo)throw ie;var Ce=en(29,ie,null,D.mode);return Ce.lanes=$,Ce.return=D,Ce}}}var Os=lp(!0),up=lp(!1),kr=!1;function vc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function jr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Mr(n,r,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(De&2)!==0){var h=o.pending;
vendor: 7,204 bytes, line 9
9return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=Lo(n),Kd(n,null,i),r}return Uo(n,o,r,i),Lo(n)}function mi(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,zt(n,i)}}function _c(n,r){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var h=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?h=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?h=f=r:f=f.next=r}else h=f=r;i={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var wc=!1;function yi(){if(wc){var n=pa;if(n!==null)throw n}}function vi(n,r,i,o){wc=!1;var h=n.updateQueue;kr=!1;var f=h.firstBaseUpdate,v=h.lastBaseUpdate,w=h.shared.pending;if(w!==null){h.shared.pending=null;var x=w,P=x.next;x.next=null,v===null?f=P:v.next=P,v=x;var H=n.alternate;H!==null&&(H=H.updateQueue,w=H.lastBaseUpdate,w!==v&&(w===null?H.firstBaseUpdate=P:w.next=P,H.lastBaseUpdate=x))}if(f!==null){var V=h.baseState;v=0,H=P=x=null,w=f;do{var z=w.lane&-536870913,B=z!==w.lane;if(B?(Re&z)===z:(o&z)===z){z!==0&&z===da&&(wc=!0),H!==null&&(H=H.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ne=n,he=w;z=r;var Be=i;switch(he.tag){case 1:if(ne=he.payload,typeof ne=="function"){V=ne.call(Be,V,z);break e}V=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=he.payload,z=typeof ne=="function"?ne.call(Be,V,z):ne,z==null)break e;V=m({},V,z);break e;case 2:kr=!0}}z=w.callback,z!==null&&(n.flags|=64,B&&(n.flags|=8192),B=h.callbacks,B===null?h.callbacks=[z]:B.push(z))}else B={lane:z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},H===null?(P=H=B,x=V):H=H.next=B,v|=z;if(w=w.next,w===null){if(w=h.shared.pending,w===null)break;B=w,w=B.next,B.next=null,h.lastBaseUpdate=B,h.shared.pending=null}}while(!0);H===null&&(x=V),h.baseState=x,h.firstBaseUpdate=P,h.lastBaseUpdate=H,f===null&&(h.shared.lanes=0),Pr|=v,n.lanes=v,n.memoizedState=V}}function cp(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function hp(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)cp(i[n],r)}var ya=C(null),Ko=C(0);function fp(n,r){n=hr,G(Ko,n),G(ya,r),hr=n|r.baseLanes}function Sc(){G(Ko,hr),G(ya,ya.current)}function Ec(){hr=Ko.current,q(ya),q(Ko)}var tn=C(null),yn=null;function Dr(n){var r=n.alternate;G(et,et.current&1),G(tn,n),yn===null&&(r===null||ya.current!==null||r.memoizedState!==null)&&(yn=n)}function Tc(n){G(et,et.current),G(tn,n),yn===null&&(yn=n)}function dp(n){n.tag===22?(G(et,et.current),G(tn,n),yn===null&&(yn=n)):Nr()}function Nr(){G(et,et.current),G(tn,tn.current)}function nn(n){q(tn),yn===n&&(yn=null),q(et)}var et=C(0);function Fo(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||kh(i)||jh(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var rr=0,ve=null,Pe=null,rt=null,Yo=!1,va=!1,xs=!1,Qo=0,bi=0,ba=null,T_=0;function Xe(){throw Error(a(321))}function Rc(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Wt(n[i],r[i]))return!1;return!0}function Ac(n,r,i,o,h,f){return rr=f,ve=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,L.H=n===null||n.memoizedState===null?Jp:Hc,xs=!1,f=i(o,h),xs=!1,va&&(f=gp(r,i,o,h)),pp(n),f}function pp(n){L.H=Si;var r=Pe!==null&&Pe.next!==null;if(rr=0,rt=Pe=ve=null,Yo=!1,bi=0,ba=null,r)throw Error(a(300));n===null||st||(n=n.dependencies,n!==null&&Bo(n)&&(st=!0))}function gp(n,r,i,o){ve=n;var h=0;do{if(va&&(ba=null),bi=0,va=!1,25<=h)throw Error(a(301));if(h+=1,rt=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)}L.H=Xp,f=r(i,o)}while(va);return f}function R_(){var n=L.H,r=n.useState()[0];return r=typeof r.then=="function"?_i(r):r,n=n.useState()[0],(Pe!==null?Pe.memoizedState:null)!==n&&(ve.flags|=1024),r}function Oc(){var n=Qo!==0;return Qo=0,n}function xc(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function Cc(n){if(Yo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Yo=!1}rr=0,rt=Pe=ve=null,va=!1,bi=Qo=0,ba=null}function Mt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?ve.memoizedState=rt=n:rt=rt.next=n,rt}function tt(){if(Pe===null){var n=ve.alternate;n=n!==null?n.memoizedState:null}else n=Pe.next;var r=rt===null?ve.memoizedState:rt.next;if(r!==null)rt=r,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},rt===null?ve.memoizedState=rt=n:rt=rt.next=n}return rt}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _i(n){var r=bi;return bi+=1,ba===null&&(ba=[]),n=ap(ba,n,r),r=ve,(rt===null?r.memoizedState:rt.next)===null&&(r=r.alternate,L.H=r===null||r.memoizedState===null?Jp:Hc),n}function Xo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return _i(n);if(n.$$typeof===j)return St(n)}throw Error(a(438,String(n)))}function kc(n){var r=null,i=ve.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var o=ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Jo(),ve.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),o=0;o<n;o++)i[o]=le;return r.index++,i}function sr(n,r){return typeof r=="function"?r(n):r}function Zo(n){var r=tt();return jc(r,Pe,n)}function jc(n,r,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var h=n.baseQueue,f=o.pending;if(f!==null){if(h!==null){var v=h.next;h.next=f.next,f.next=v}r.baseQueue=h=f,o.pending=null}if(f=n.baseState,h===null)n.memoizedState=f;else{r=h.next;var w=v=null,x=null,P=r,H=!1;do{var V=P.lane&-536870913;if(V!==P.lane?(Re&V)===V:(rr&V)===V){var z=P.revertLane;if(z===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),V===da&&(H=!0);else if((rr&z)===z){P=P.next,z===da&&(H=!0);continue}else V={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},x===null?(w=x=V,v=f):x=x.next=V,ve.lanes|=z,Pr|=z;V=P.action,xs&&i(f,V),f=P.hasEagerState?P.eagerState:i(f,V)}else z={lane:V,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},x===null?(w=x=z,v=f):x=x.next=z,ve.lanes|=V,Pr|=V;P=P.next}
vendor: 4,340 bytes, line 9
9while(P!==null&&P!==r);if(x===null?v=f:x.next=w,!Wt(f,n.memoizedState)&&(st=!0,H&&(i=pa,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=x,o.lastRenderedState=f}return h===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function Mc(n){var r=tt(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var o=i.dispatch,h=i.pending,f=r.memoizedState;if(h!==null){i.pending=null;var v=h=h.next;do f=n(f,v.action),v=v.next;while(v!==h);Wt(f,r.memoizedState)||(st=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),i.lastRenderedState=f}return[f,o]}function mp(n,r,i){var o=ve,h=tt(),f=Oe;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!Wt((Pe||h).memoizedState,i);if(v&&(h.memoizedState=i,st=!0),h=h.queue,Uc(bp.bind(null,o,h,n),[n]),h.getSnapshot!==r||v||rt!==null&&rt.memoizedState.tag&1){if(o.flags|=2048,_a(9,{destroy:void 0},vp.bind(null,o,h,i,r),null),Ie===null)throw Error(a(349));f||(rr&127)!==0||yp(o,r,i)}return i}function yp(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=ve.updateQueue,r===null?(r=Jo(),ve.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function vp(n,r,i,o){r.value=i,r.getSnapshot=o,_p(r)&&wp(n)}function bp(n,r,i){return i(function(){_p(r)&&wp(n)})}function _p(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Wt(n,i)}catch{return!0}}function wp(n){var r=bs(n,2);r!==null&&Kt(r,n,2)}function Dc(n){var r=Mt();if(typeof n=="function"){var i=n;if(n=i(),xs){Tn(!0);try{i()}finally{Tn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:n},r}function Sp(n,r,i,o){return n.baseState=i,jc(n,Pe,typeof o=="function"?o:sr)}function A_(n,r,i,o,h){if(tl(n))throw Error(a(485));if(n=r.action,n!==null){var f={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};L.T!==null?i(!0):f.isTransition=!1,o(f),i=r.pending,i===null?(f.next=r.pending=f,Ep(r,f)):(f.next=i.next,r.pending=i.next=f)}}function Ep(n,r){var i=r.action,o=r.payload,h=n.state;if(r.isTransition){var f=L.T,v={};L.T=v;try{var w=i(h,o),x=L.S;x!==null&&x(v,w),Tp(n,r,w)}catch(P){Nc(n,r,P)}finally{f!==null&&v.types!==null&&(f.types=v.types),L.T=f}}else try{f=i(h,o),Tp(n,r,f)}catch(P){Nc(n,r,P)}}function Tp(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Rp(n,r,o)},function(o){return Nc(n,r,o)}):Rp(n,r,i)}function Rp(n,r,i){r.status="fulfilled",r.value=i,Ap(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,Ep(n,i)))}function Nc(n,r,i){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=i,Ap(r),r=r.next;while(r!==o)}n.action=null}function Ap(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Op(n,r){return r}function xp(n,r){if(Oe){var i=Ie.formState;if(i!==null){e:{var o=ve;if(Oe){if(Ve){t:{for(var h=Ve,f=mn;h.nodeType!==8;){if(!f){h=null;break t}if(h=vn(h.nextSibling),h===null){h=null;break t}}f=h.data,h=f==="F!"||f==="F"?h:null}if(h){Ve=vn(h.nextSibling),o=h.data==="F!";break e}}xr(o)}o=!1}o&&(r=i[0])}}return i=Mt(),i.memoizedState=i.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Op,lastRenderedState:r},i.queue=o,i=Fp.bind(null,ve,o),o.dispatch=i,o=Dc(!1),f=Ic.bind(null,ve,!1,o.queue),o=Mt(),h={state:r,dispatch:null,action:n,pending:null},o.queue=h,i=A_.bind(null,ve,h,f,i),h.dispatch=i,o.memoizedState=n,[r,i,!1]}function Cp(n){var r=tt();return kp(r,Pe,n)}function kp(n,r,i){if(r=jc(n,r,Op)[0],n=Zo(sr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=_i(r)}catch(v){throw v===ga?qo:v}else o=r;r=tt();var h=r.queue,f=h.dispatch;return i!==r.memoizedState&&(ve.flags|=2048,_a(9,{destroy:void 0},O_.bind(null,h,i),null)),[o,f,n]}function O_(n,r){n.action=r}function jp(n){var r=tt(),i=Pe;if(i!==null)return kp(r,i,n);tt(),r=r.memoizedState,i=tt();var o=i.queue.dispatch;return i.memoizedState=n,[r,o,!1]}function _a(n,r,i,o){return n={tag:n,create:i,deps:o,inst:r,next:null},r=ve.updateQueue,r===null&&(r=Jo(),ve.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(o=i.next,i.next=n,n.next=o,r.lastEffect=n),n}function Mp(){return tt().memoizedState}function Wo(n,r,i,o){var h=Mt();ve.flags|=n,h.memoizedState=_a(1|r,{destroy:void 0}
vendor: 5,168 bytes, line 9
9,i,o===void 0?null:o)}function el(n,r,i,o){var h=tt();o=o===void 0?null:o;var f=h.memoizedState.inst;Pe!==null&&o!==null&&Rc(o,Pe.memoizedState.deps)?h.memoizedState=_a(r,f,i,o):(ve.flags|=n,h.memoizedState=_a(1|r,f,i,o))}function Dp(n,r){Wo(8390656,8,n,r)}function Uc(n,r){el(2048,8,n,r)}function x_(n){ve.flags|=4;var r=ve.updateQueue;if(r===null)r=Jo(),ve.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function Np(n){var r=tt().memoizedState;return x_({ref:r,nextImpl:n}),function(){if((De&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Up(n,r){return el(4,2,n,r)}function Lp(n,r){return el(4,4,n,r)}function Pp(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function zp(n,r,i){i=i!=null?i.concat([n]):null,el(4,4,Pp.bind(null,r,n),i)}function Lc(){}function Bp(n,r){var i=tt();r=r===void 0?null:r;var o=i.memoizedState;return r!==null&&Rc(r,o[1])?o[0]:(i.memoizedState=[n,r],n)}function Ip(n,r){var i=tt();r=r===void 0?null:r;var o=i.memoizedState;if(r!==null&&Rc(r,o[1]))return o[0];if(o=n(),xs){Tn(!0);try{n()}finally{Tn(!1)}}return i.memoizedState=[o,r],o}function Pc(n,r,i){return i===void 0||(rr&1073741824)!==0&&(Re&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=Hg(),ve.lanes|=n,Pr|=n,i)}function Hp(n,r,i,o){return Wt(i,r)?i:ya.current!==null?(n=Pc(n,i,o),Wt(n,r)||(st=!0),n):(rr&42)===0||(rr&1073741824)!==0&&(Re&261930)===0?(st=!0,n.memoizedState=i):(n=Hg(),ve.lanes|=n,Pr|=n,r)}function qp(n,r,i,o,h){var f=Y.p;Y.p=f!==0&&8>f?f:8;var v=L.T,w={};L.T=w,Ic(n,!1,r,i);try{var x=h(),P=L.S;if(P!==null&&P(w,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var H=E_(x,o);wi(n,r,H,an(n))}else wi(n,r,o,an(n))}catch(V){wi(n,r,{then:function(){},status:"rejected",reason:V},an())}finally{Y.p=f,v!==null&&w.types!==null&&(v.types=w.types),L.T=v}}function C_(){}function zc(n,r,i,o){if(n.tag!==5)throw Error(a(476));var h=$p(n).queue;qp(n,h,r,se,i===null?C_:function(){return Vp(n),i(o)})}function $p(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:se},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Vp(n){var r=$p(n);r.next===null&&(r=n.alternate.memoizedState),wi(n,r.next.queue,{},an())}function Bc(){return St(zi)}function Gp(){return tt().memoizedState}function Kp(){return tt().memoizedState}function k_(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=an();n=jr(i);var o=Mr(r,n,i);o!==null&&(Kt(o,r,i),mi(o,r,i)),r={cache:pc()},n.payload=r;return}r=r.return}}function j_(n,r,i){var o=an();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},tl(n)?Yp(r,i):(i=rc(n,r,i,o),i!==null&&(Kt(i,n,o),Qp(i,r,o)))}function Fp(n,r,i){var o=an();wi(n,r,i,o)}function wi(n,r,i,o){var h={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(tl(n))Yp(r,h);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,w=f(v,i);if(h.hasEagerState=!0,h.eagerState=w,Wt(w,v))return Uo(n,r,h,0),Ie===null&&No(),!1}catch{}if(i=rc(n,r,h,o),i!==null)return Kt(i,n,o),Qp(i,r,o),!0}return!1}function Ic(n,r,i,o){if(o={lane:2,revertLane:vh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},tl(n)){if(r)throw Error(a(479))}else r=rc(n,i,o,2),r!==null&&Kt(r,n,2)}function tl(n){var r=n.alternate;return n===ve||r!==null&&r===ve}function Yp(n,r){va=Yo=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Qp(n,r,i){if((i&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,zt(n,i)}}var Si={readContext:St,use:Xo,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Si.useEffectEvent=Xe;var Jp={readContext:St,use:Xo,useCallback:function(n,r){return Mt().memoizedState=[n,r===void 0?null:r],n},useContext:St,useEffect:Dp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,Wo(4194308,4,Pp.bind(null,r,n),i)},useLayoutEffect:function(n,r){return Wo(4194308,4,n,r)},useInsertionEffect:function(n,r){Wo(4,2,n,r)},useMemo:function(n,r){var i=Mt();r=r===void 0?null:r;var o=n();if(xs){Tn(!0);try{n()}finally{Tn(!1)}}return i.memoizedState=[o,r],o},useReducer:function(n,r,i){var o=Mt();if(i!==void 0){var h=i(r);if(xs){Tn(!0);try{i(r)}finally{Tn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},o.queue=n,n=n.dispatch=j_.bind(null,ve,n),[o.memoizedState,n]}
vendor: 9,443 bytes, line 9
9,useRef:function(n){var r=Mt();return n={current:n},r.memoizedState=n},useState:function(n){n=Dc(n);var r=n.queue,i=Fp.bind(null,ve,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:Lc,useDeferredValue:function(n,r){var i=Mt();return Pc(i,n,r)},useTransition:function(){var n=Dc(!1);return n=qp.bind(null,ve,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var o=ve,h=Mt();if(Oe){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Ie===null)throw Error(a(349));(Re&127)!==0||yp(o,r,i)}h.memoizedState=i;var f={value:i,getSnapshot:r};return h.queue=f,Dp(bp.bind(null,o,f,n),[n]),o.flags|=2048,_a(9,{destroy:void 0},vp.bind(null,o,f,i,r),null),i},useId:function(){var n=Mt(),r=Ie.identifierPrefix;if(Oe){var i=zn,o=Pn;i=(o&~(1<<32-At(o)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Qo++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=T_++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Bc,useFormState:xp,useActionState:xp,useOptimistic:function(n){var r=Mt();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Ic.bind(null,ve,!0,i),i.dispatch=r,[n,r]},useMemoCache:kc,useCacheRefresh:function(){return Mt().memoizedState=k_.bind(null,ve)},useEffectEvent:function(n){var r=Mt(),i={impl:n};return r.memoizedState=i,function(){if((De&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Hc={readContext:St,use:Xo,useCallback:Bp,useContext:St,useEffect:Uc,useImperativeHandle:zp,useInsertionEffect:Up,useLayoutEffect:Lp,useMemo:Ip,useReducer:Zo,useRef:Mp,useState:function(){return Zo(sr)},useDebugValue:Lc,useDeferredValue:function(n,r){var i=tt();return Hp(i,Pe.memoizedState,n,r)},useTransition:function(){var n=Zo(sr)[0],r=tt().memoizedState;return[typeof n=="boolean"?n:_i(n),r]},useSyncExternalStore:mp,useId:Gp,useHostTransitionStatus:Bc,useFormState:Cp,useActionState:Cp,useOptimistic:function(n,r){var i=tt();return Sp(i,Pe,n,r)},useMemoCache:kc,useCacheRefresh:Kp};Hc.useEffectEvent=Np;var Xp={readContext:St,use:Xo,useCallback:Bp,useContext:St,useEffect:Uc,useImperativeHandle:zp,useInsertionEffect:Up,useLayoutEffect:Lp,useMemo:Ip,useReducer:Mc,useRef:Mp,useState:function(){return Mc(sr)},useDebugValue:Lc,useDeferredValue:function(n,r){var i=tt();return Pe===null?Pc(i,n,r):Hp(i,Pe.memoizedState,n,r)},useTransition:function(){var n=Mc(sr)[0],r=tt().memoizedState;return[typeof n=="boolean"?n:_i(n),r]},useSyncExternalStore:mp,useId:Gp,useHostTransitionStatus:Bc,useFormState:jp,useActionState:jp,useOptimistic:function(n,r){var i=tt();return Pe!==null?Sp(i,Pe,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:kc,useCacheRefresh:Kp};Xp.useEffectEvent=Np;function qc(n,r,i,o){r=n.memoizedState,i=i(o,r),i=i==null?r:m({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var $c={enqueueSetState:function(n,r,i){n=n._reactInternals;var o=an(),h=jr(o);h.payload=r,i!=null&&(h.callback=i),r=Mr(n,h,o),r!==null&&(Kt(r,n,o),mi(r,n,o))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var o=an(),h=jr(o);h.tag=1,h.payload=r,i!=null&&(h.callback=i),r=Mr(n,h,o),r!==null&&(Kt(r,n,o),mi(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=an(),o=jr(i);o.tag=2,r!=null&&(o.callback=r),r=Mr(n,o,i),r!==null&&(Kt(r,n,i),mi(r,n,i))}};function Zp(n,r,i,o,h,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,f,v):r.prototype&&r.prototype.isPureReactComponent?!li(i,o)||!li(h,f):!0}function Wp(n,r,i,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,o),r.state!==n&&$c.enqueueReplaceState(r,r.state,null)}function Cs(n,r){var i=r;if("ref"in r){i={};for(var o in r)o!=="ref"&&(i[o]=r[o])}if(n=n.defaultProps){i===r&&(i=m({},i));for(var h in n)i[h]===void 0&&(i[h]=n[h])}return i}function eg(n){Do(n)}function tg(n){console.error(n)}function ng(n){Do(n)}function nl(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function rg(n,r,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Vc(n,r,i){return i=jr(i),i.tag=3,i.payload={element:null},i.callback=function(){nl(n,r)},i}function sg(n){return n=jr(n),n.tag=3,n}function ag(n,r,i,o){var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var f=o.value;n.payload=function(){return h(f)},n.callback=function(){rg(r,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){rg(r,i,o),typeof h!="function"&&(zr===null?zr=new Set([this]):zr.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function M_(n,r,i,o,h){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=i.alternate,r!==null&&fa(r,i,h,!0),i=tn.current,i!==null){switch(i.tag){case 31:case 13:return yn===null?pl():i.alternate===null&&Ze===0&&(Ze=3),i.flags&=-257,i.flags|=65536,i.lanes=h,o===$o?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([o]):r.add(o),gh(n,o,h)),!1;case 22:return i.flags|=65536,o===$o?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([o]):i.add(o)),gh(n,o,h)),!1}throw Error(a(435,i.tag))}return gh(n,o,h),pl(),!1}if(Oe)return r=tn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==uc&&(n=Error(a(422),{cause:o}),hi(dn(n,i)))):(o!==uc&&(r=Error(a(423),{cause:o}),hi(dn(r,i))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,o=dn(o,i),h=Vc(n.stateNode,o,h),_c(n,h),Ze!==4&&(Ze=2)),!1;var f=Error(a(520),{cause:o});if(f=dn(f,i),ki===null?ki=[f]:ki.push(f),Ze!==4&&(Ze=2),r===null)return!0;o=dn(o,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=h&-h,i.lanes|=n,n=Vc(i.stateNode,o,n),_c(i,n),!1;case 1:if(r=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(zr===null||!zr.has(f))))return i.flags|=65536,h&=-h,i.lanes|=h,h=sg(h),ag(h,n,i,o),_c(i,h),!1}i=i.return}while(i!==null);return!1}var Gc=Error(a(461)),st=!1;function Et(n,r,i,o){r.child=n===null?up(r,null,i,o):Os(r,n.child,i,o)}function ig(n,r,i,o,h){i=i.render;var f=r.ref;if("ref"in o){var v={};for(var w in o)w!=="ref"&&(v[w]=o[w])}else v=o;return Es(r),o=Ac(n,r,i,v,f,h),w=Oc(),n!==null&&!st?(xc(n,r,h),ar(n,r,h)):(Oe&&w&&oc(r),r.flags|=1,Et(n,r,o,h),r.child)}function og(n,r,i,o,h){if(n===null){var f=i.type;return typeof f=="function"&&!sc(f)&&f.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=f,lg(n,r,f,o,h)):(n=Po(i.type,null,o,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(f=n.child,!Wc(n,h)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:li,i(v,o)&&n.ref===r.ref)return ar(n,r,h)}return r.flags|=1,n=Wn(f,o),n.ref=r.ref,n.return=r,r.child=n}function lg(n,r,i,o,h){if(n!==null){var f=n.memoizedProps;if(li(f,o)&&n.ref===r.ref)if(st=!1,r.pendingProps=o=f,Wc(n,h))(n.flags&131072)!==0&&(st=!0);else return r.lanes=n.lanes,ar(n,r,h)}return Kc(n,r,i,o,h)}function ug(n,r,i,o){var h=o.children,f=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(o=r.child=n.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~f}else o=0,r.child=null;return cg(n,r,f,i,o)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ho(r,f!==null?f.cachePool:null),f!==null?fp(r,f):Sc(),dp(r);else return o=r.lanes=536870912,cg(n,r,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(Ho(r,f.cachePool),fp(r,f),Nr(),r.memoizedState=null):(n!==null&&Ho(r,null),Sc(),Nr());return Et(n,r,h,i),r.child}function Ei(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function cg(n,r,i,o,h){var f=mc();return f=f===null?null:{parent:nt._currentValue,pool:f},r.memoizedState={baseLanes:i,cachePool:f},n!==null&&Ho(r,null),Sc(),dp(r),n!==null&&fa(n,r,o,!0),r.childLanes=h,null}function rl(n,r){return r=al({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function hg(n,r,i){return Os(r,n.child,null,i),n=rl(r,r.pendingProps),n.flags|=2,nn(r),r.memoizedState=null,n}function D_(n,r,i){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Oe){if(o.mode==="hidden")return n=rl(r,o),r.lanes=536870912,Ei(null,n);if(Tc(r),(n=Ve)?(n=Em(n,mn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ar!==null?{id:Pn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=Yd(n),i.return=r,r.child=i,wt=r,Ve=null)):n=null,n===null)throw xr(r);return r.lanes=536870912,null}return rl(r,o)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(Tc(r),h)if(r.flags&256)r.flags&=-257,r=hg(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(st||fa(n,r,i,!1),h=(i&n.childLanes)!==0,st||h){if(o=Ie,o!==null&&(v=Bt(o,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,bs(n,v),Kt(o,n,v),Gc;pl(),r=hg(n,r,i)}
vendor: 5,020 bytes, line 9
9else n=f.treeContext,Ve=vn(v.nextSibling),wt=r,Oe=!0,Or=null,mn=!1,n!==null&&Xd(r,n),r=rl(r,o),r.flags|=4096;return r}return n=Wn(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function sl(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function Kc(n,r,i,o,h){return Es(r),i=Ac(n,r,i,o,void 0,h),o=Oc(),n!==null&&!st?(xc(n,r,h),ar(n,r,h)):(Oe&&o&&oc(r),r.flags|=1,Et(n,r,i,h),r.child)}function fg(n,r,i,o,h,f){return Es(r),r.updateQueue=null,i=gp(r,o,i,h),pp(n),o=Oc(),n!==null&&!st?(xc(n,r,f),ar(n,r,f)):(Oe&&o&&oc(r),r.flags|=1,Et(n,r,i,f),r.child)}function dg(n,r,i,o,h){if(Es(r),r.stateNode===null){var f=la,v=i.contextType;typeof v=="object"&&v!==null&&(f=St(v)),f=new i(o,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=$c,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=o,f.state=r.memoizedState,f.refs={},vc(r),v=i.contextType,f.context=typeof v=="object"&&v!==null?St(v):la,f.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(qc(r,i,v,o),f.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&$c.enqueueReplaceState(f,f.state,null),vi(r,o,f,h),yi(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){f=r.stateNode;var w=r.memoizedProps,x=Cs(i,w);f.props=x;var P=f.context,H=i.contextType;v=la,typeof H=="object"&&H!==null&&(v=St(H));var V=i.getDerivedStateFromProps;H=typeof V=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||P!==v)&&Wp(r,f,o,v),kr=!1;var z=r.memoizedState;f.state=z,vi(r,o,f,h),yi(),P=r.memoizedState,w||z!==P||kr?(typeof V=="function"&&(qc(r,i,V,o),P=r.memoizedState),(x=kr||Zp(r,i,x,o,z,P,v))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=P),f.props=o,f.state=P,f.context=v,o=x):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{f=r.stateNode,bc(n,r),v=r.memoizedProps,H=Cs(i,v),f.props=H,V=r.pendingProps,z=f.context,P=i.contextType,x=la,typeof P=="object"&&P!==null&&(x=St(P)),w=i.getDerivedStateFromProps,(P=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==V||z!==x)&&Wp(r,f,o,x),kr=!1,z=r.memoizedState,f.state=z,vi(r,o,f,h),yi();var B=r.memoizedState;v!==V||z!==B||kr||n!==null&&n.dependencies!==null&&Bo(n.dependencies)?(typeof w=="function"&&(qc(r,i,w,o),B=r.memoizedState),(H=kr||Zp(r,i,H,o,z,B,x)||n!==null&&n.dependencies!==null&&Bo(n.dependencies))?(P||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,B,x),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,B,x)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=B),f.props=o,f.state=B,f.context=x,o=H):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),o=!1)}return f=o,sl(n,r),o=(r.flags&128)!==0,f||o?(f=r.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,n!==null&&o?(r.child=Os(r,n.child,null,h),r.child=Os(r,null,i,h)):Et(n,r,i,h),r.memoizedState=f.state,n=r.child):n=ar(n,r,h),n}function pg(n,r,i,o){return ws(),r.flags|=256,Et(n,r,i,o),r.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yc(n){return{baseLanes:n,cachePool:rp()}}function Qc(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=sn),n}function gg(n,r,i){var o=r.pendingProps,h=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(et.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(Oe){if(h?Dr(r):Nr
vendor: 5,112 bytes, line 9
9(),(n=Ve)?(n=Em(n,mn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ar!==null?{id:Pn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=Yd(n),i.return=r,r.child=i,wt=r,Ve=null)):n=null,n===null)throw xr(r);return jh(n)?r.lanes=32:r.lanes=536870912,null}var w=o.children;return o=o.fallback,h?(Nr(),h=r.mode,w=al({mode:"hidden",children:w},h),o=_s(o,h,i,null),w.return=r,o.return=r,w.sibling=o,r.child=w,o=r.child,o.memoizedState=Yc(i),o.childLanes=Qc(n,v,i),r.memoizedState=Fc,Ei(null,o)):(Dr(r),Jc(r,w))}var x=n.memoizedState;if(x!==null&&(w=x.dehydrated,w!==null)){if(f)r.flags&256?(Dr(r),r.flags&=-257,r=Xc(n,r,i)):r.memoizedState!==null?(Nr(),r.child=n.child,r.flags|=128,r=null):(Nr(),w=o.fallback,h=r.mode,o=al({mode:"visible",children:o.children},h),w=_s(w,h,i,null),w.flags|=2,o.return=r,w.return=r,o.sibling=w,r.child=o,Os(r,n.child,null,i),o=r.child,o.memoizedState=Yc(i),o.childLanes=Qc(n,v,i),r.memoizedState=Fc,r=Ei(null,o));else if(Dr(r),jh(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var P=v.dgst;v=P,o=Error(a(419)),o.stack="",o.digest=v,hi({value:o,source:null,stack:null}),r=Xc(n,r,i)}else if(st||fa(n,r,i,!1),v=(i&n.childLanes)!==0,st||v){if(v=Ie,v!==null&&(o=Bt(v,i),o!==0&&o!==x.retryLane))throw x.retryLane=o,bs(n,o),Kt(v,n,o),Gc;kh(w)||pl(),r=Xc(n,r,i)}else kh(w)?(r.flags|=192,r.child=n.child,r=null):(n=x.treeContext,Ve=vn(w.nextSibling),wt=r,Oe=!0,Or=null,mn=!1,n!==null&&Xd(r,n),r=Jc(r,o.children),r.flags|=4096);return r}return h?(Nr(),w=o.fallback,h=r.mode,x=n.child,P=x.sibling,o=Wn(x,{mode:"hidden",children:o.children}),o.subtreeFlags=x.subtreeFlags&65011712,P!==null?w=Wn(P,w):(w=_s(w,h,i,null),w.flags|=2),w.return=r,o.return=r,o.sibling=w,r.child=o,Ei(null,o),o=r.child,w=n.child.memoizedState,w===null?w=Yc(i):(h=w.cachePool,h!==null?(x=nt._currentValue,h=h.parent!==x?{parent:x,pool:x}:h):h=rp(),w={baseLanes:w.baseLanes|i,cachePool:h}),o.memoizedState=w,o.childLanes=Qc(n,v,i),r.memoizedState=Fc,Ei(n.child,o)):(Dr(r),i=n.child,n=i.sibling,i=Wn(i,{mode:"visible",children:o.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}function Jc(n,r){return r=al({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function al(n,r){return n=en(22,n,null,r),n.lanes=0,n}function Xc(n,r,i){return Os(r,n.child,null,i),n=Jc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function mg(n,r,i){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),fc(n.return,r,i)}function Zc(n,r,i,o,h,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:h,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=h,v.treeForkCount=f)}function yg(n,r,i){var o=r.pendingProps,h=o.revealOrder,f=o.tail;o=o.children;var v=et.current,w=(v&2)!==0;if(w?(v=v&1|2,r.flags|=128):v&=1,G(et,v),Et(n,r,o,i),o=Oe?ci:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&mg(n,i,r);else if(n.tag===19)mg(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(i=r.child,h=null;i!==null;)n=i.alternate,n!==null&&Fo(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=r.child,r.child=null):(h=i.sibling,i.sibling=null),Zc(r,!1,h,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&Fo(n)===null){r.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}Zc(r,!0,i,null,f,o);break;case"together":Zc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function ar(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),Pr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(fa(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,i=Wn(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=Wn(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function Wc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Bo(n)))}function N_(n,r,i){switch(r.tag){case 3:de(r,r.stateNode.containerInfo),Cr(r,nt,n.memoizedState.cache),ws();break;case 27:case 5:Nt(r);break;case 4:de(r,r.stateNode.containerInfo);break;case 10:Cr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Tc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(Dr(r),r.flags|=128,null):(i&r.child.childLanes)!==0?gg(n,r,i):(Dr(r),n=ar(n,r,i),n!==null?n.sibling:null);Dr(r);break;case 19:var h=(n.flags&128)!==0;if(o=(i&r.childLanes)!==0,o||(fa(n,r,i,!1),o=(i&r.childLanes)!==0),h){if(o)return yg(n,r,i);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),G(et,et.current),o)break;return null;case 22:return r.lanes=0,ug(n,r,i,r.pendingProps);
vendor: 6,496 bytes, line 9
9case 24:Cr(r,nt,n.memoizedState.cache)}return ar(n,r,i)}function vg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)st=!0;else{if(!Wc(n,i)&&(r.flags&128)===0)return st=!1,N_(n,r,i);st=(n.flags&131072)!==0}else st=!1,Oe&&(r.flags&1048576)!==0&&Jd(r,ci,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Rs(r.elementType),r.type=n,typeof n=="function")sc(n)?(o=Cs(n,o),r.tag=1,r=dg(null,r,n,o,i)):(r.tag=0,r=Kc(null,r,n,o,i));else{if(n!=null){var h=n.$$typeof;if(h===N){r.tag=11,r=ig(null,r,n,o,i);break e}else if(h===I){r.tag=14,r=og(null,r,n,o,i);break e}}throw r=qe(n)||n,Error(a(306,r,""))}}return r;case 0:return Kc(n,r,r.type,r.pendingProps,i);case 1:return o=r.type,h=Cs(o,r.pendingProps),dg(n,r,o,h,i);case 3:e:{if(de(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var f=r.memoizedState;h=f.element,bc(n,r),vi(r,o,null,i);var v=r.memoizedState;if(o=v.cache,Cr(r,nt,o),o!==f.cache&&dc(r,[nt],i,!0),yi(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=pg(n,r,o,i);break e}else if(o!==h){h=dn(Error(a(424)),r),hi(h),r=pg(n,r,o,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ve=vn(n.firstChild),wt=r,Oe=!0,Or=null,mn=!0,i=up(r,null,o,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ws(),o===h){r=ar(n,r,i);break e}Et(n,r,o,i)}r=r.child}return r;case 26:return sl(n,r),n===null?(i=Cm(r.type,null,r.pendingProps,null))?r.memoizedState=i:Oe||(i=r.type,n=r.pendingProps,o=wl(ce.current).createElement(i),o[_t]=r,o[It]=n,Tt(o,i,n),gt(o),r.stateNode=o):r.memoizedState=Cm(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Nt(r),n===null&&Oe&&(o=r.stateNode=Am(r.type,r.pendingProps,ce.current),wt=r,mn=!0,h=Ve,qr(r.type)?(Mh=h,Ve=vn(o.firstChild)):Ve=h),Et(n,r,r.pendingProps.children,i),sl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Oe&&((h=o=Ve)&&(o=cw(o,r.type,r.pendingProps,mn),o!==null?(r.stateNode=o,wt=r,Ve=vn(o.firstChild),mn=!1,h=!0):h=!1),h||xr(r)),Nt(r),h=r.type,f=r.pendingProps,v=n!==null?n.memoizedProps:null,o=f.children,Oh(h,f)?o=null:v!==null&&Oh(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=Ac(n,r,R_,null,null,i),zi._currentValue=h),sl(n,r),Et(n,r,o,i),r.child;case 6:return n===null&&Oe&&((n=i=Ve)&&(i=hw(i,r.pendingProps,mn),i!==null?(r.stateNode=i,wt=r,Ve=null,n=!0):n=!1),n||xr(r)),null;case 13:return gg(n,r,i);case 4:return de(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Os(r,null,o,i):Et(n,r,o,i),r.child;case 11:return ig(n,r,r.type,r.pendingProps,i);case 7:return Et(n,r,r.pendingProps,i),r.child;case 8:return Et(n,r,r.pendingProps.children,i),r.child;case 12:return Et(n,r,r.pendingProps.children,i),r.child;case 10:return o=r.pendingProps,Cr(r,r.type,o.value),Et(n,r,o.children,i),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Es(r),h=St(h),o=o(h),r.flags|=1,Et(n,r,o,i),r.child;case 14:return og(n,r,r.type,r.pendingProps,i);case 15:return lg(n,r,r.type,r.pendingProps,i);case 19:return yg(n,r,i);case 31:return D_(n,r,i);case 22:return ug(n,r,i,r.pendingProps);case 24:return Es(r),o=St(nt),n===null?(h=mc(),h===null&&(h=Ie,f=pc(),h.pooledCache=f,f.refCount++,f!==null&&(h.pooledCacheLanes|=i),h=f),r.memoizedState={parent:o,cache:h},vc(r),Cr(r,nt,h)):((n.lanes&i)!==0&&(bc(n,r),vi(r,null,null,i),yi()),h=n.memoizedState,f=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),Cr(r,nt,o)):(o=f.cache,Cr(r,nt,o),o!==h.cache&&dc(r,[nt],i,!0))),Et(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ir(n){n.flags|=4}function eh(n,r,i,o,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Gg())n.flags|=8192;else throw As=$o,yc}else n.flags&=-16777217}function bg(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Nm(r))if(Gg())n.flags|=8192;else throw As=$o,yc}function il(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Ot():536870912,n.lanes|=r,Ta|=r)}function Ti(n,r){if(!Oe)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function Ge(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(r)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=o,n.childLanes=i,r}function U_(n,r,i){var o=r.pendingProps;switch(lc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(r),null;case 1:return Ge(r),null;case 3:return i=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),nr(nt),xe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(ha(r)?ir(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,cc())),Ge(r),null;case 26:var h=r.type,f=r.memoizedState;return n===null?(ir(r),f!==null?(Ge(r),bg(r,f)):(Ge(r),eh(r,h,null,o,i))):f?f!==n.memoizedState?(ir(r),Ge(r),bg(r,f)):(Ge(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&ir(r),Ge(r),eh(r,h,n,o,i)),null;case 27:if(Ut(r),i=ce.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&ir(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ge(r),null}n=J.current,ha(r)?Zd(r):(n=Am(h,o,i),r.stateNode=n,ir(r))}return Ge(r),null;case 5:if(Ut(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&ir(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ge(r),null}if(f=J.current,ha(r))Zd(r);else{var v=wl(ce.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
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(h,{is:o.is}):v.createElement(h)}}f[_t]=r,f[It]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=f;e:switch(Tt(f,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ir(r)}}return Ge(r),eh(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&ir(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=ce.current,ha(r)){if(n=r.stateNode,i=r.memoizedProps,o=null,h=wt,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}n[_t]=r,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||gm(n.nodeValue,i)),n||xr(r,!0)}else n=wl(n).createTextNode(o),n[_t]=r,r.stateNode=n}return Ge(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(o=ha(r),i!==null){if(n===null){if(!o)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[_t]=r}else ws(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ge(r),n=!1}else i=cc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(nn(r),r):(nn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Ge(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=ha(r),o!==null&&o.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[_t]=r}else ws(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ge(r),h=!1}else h=cc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(nn(r),r):(nn(r),null)}return nn(r),(r.flags&128)!==0?(r.lanes=i,r):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==h&&(o.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),il(r,r.updateQueue),Ge(r),null);case 4:return xe(),n===null&&Sh(r.stateNode.containerInfo),Ge(r),null;case 10:return nr(r.type),Ge(r),null;case 19:if(q(et),o=r.memoizedState,o===null)return Ge(r),null;if(h=(r.flags&128)!==0,f=o.rendering,f===null)if(h)Ti(o,!1);else{if(Ze!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(f=Fo(n),f!==null){for(r.flags|=128,Ti(o,!1),n=f.updateQueue,r.updateQueue=n,il(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)Fd(i,n),i=i.sibling;return G(et,et.current&1|2),Oe&&er(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&dt()>hl&&(r.flags|=128,h=!0,Ti(o,!1),r.lanes=4194304)}else{if(!h)if(n=Fo(f),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,il(r,n),Ti(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Oe)return Ge(r),null}else 2*dt()-o.renderingStartTime>hl&&i!==536870912&&(r.flags|=128,h=!0,Ti(o,!1),r.lanes=4194304);o.isBackwards?(f.sibling=r.child,r.child=f):(n=o.last,n!==null?n.sibling=f:r.child=f,o.last=f)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=dt(),n.sibling=null,i=et.current,G(et,h?i&1|2:i&1),Oe&&er(r,o.treeForkCount),n):(Ge(r),null);case 22:case 23:return nn(r),Ec(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(i&536870912)!==0&&(r.flags&128)===0&&(Ge(r),r.subtreeFlags&6&&(r.flags|=8192)):Ge(r),i=r.updateQueue,i!==null&&il(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048),n!==null&&q(Ts),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),nr(nt),Ge(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function L_(n,r){switch(lc(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return nr(nt),xe(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Ut(r),null;case 31:if(r.memoizedState!==null){if(nn(r),r.alternate===null)throw Error(a(340));ws()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(nn(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));ws()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return q(et),null;case 4:return xe(),null;case 10:return nr(r.type),null;case 22:case 23:return nn(r),Ec(),n!==null&&q(Ts),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return nr(nt),null;case 25:return null;default:return null}}function _g(n,r){switch(lc(r),r.tag){case 3:nr(nt),xe();break;case 26:case 27:case 5:Ut(r);break;case 4:xe();break;case 31:r.memoizedState!==null&&nn(r);break;case 13:nn(r);break;case 19:q(et);break;case 10:nr(r.type);break;case 22:case 23:nn(r),Ec(),n!==null&&q(Ts);break;case 24:nr(nt)}}function Ri(n,r){try{var i=r.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var h=o.next;i=h;do{if((i.tag&n)===n){o=void 0;var f=i.create,v=i.inst;o=f(),v.destroy=o}i=i.next}while(i!==h)}}catch(w){Ue(r,r.return,w)}}function Ur(n,r,i){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var f=h.next;o=f;do{if((o.tag&n)===n){var v=o.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,h=r;var x=i,P=w;try{P()}catch(H){Ue(h,x,H)}}}o=o.next}while(o!==f)}}catch(H){Ue(r,r.return,H)}}function wg(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{hp(r,i)}catch(o){Ue(n,n.return,o)}}}function Sg(n,r,i){i.props=Cs(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 18,839 bytes, line 9
9try{i.componentWillUnmount()}catch(o){Ue(n,r,o)}}function Ai(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof i=="function"?n.refCleanup=i(o):i.current=o}}catch(h){Ue(n,r,h)}}function Bn(n,r){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(h){Ue(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(h){Ue(n,r,h)}else i.current=null}function Eg(n){var r=n.type,i=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(h){Ue(n,n.return,h)}}function th(n,r,i){try{var o=n.stateNode;sw(o,n.type,i,r),o[It]=r}catch(h){Ue(n,n.return,h)}}function Tg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&qr(n.type)||n.tag===4}function nh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Tg(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&&qr(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 rh(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Xn));else if(o!==4&&(o===27&&qr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(rh(n,r,i),n=n.sibling;n!==null;)rh(n,r,i),n=n.sibling}function ol(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(o!==4&&(o===27&&qr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(ol(n,r,i),n=n.sibling;n!==null;)ol(n,r,i),n=n.sibling}function Rg(n){var r=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Tt(r,o,i),r[_t]=n,r[It]=i}catch(f){Ue(n,n.return,f)}}var or=!1,at=!1,sh=!1,Ag=typeof WeakSet=="function"?WeakSet:Set,mt=null;function P_(n,r){if(n=n.containerInfo,Rh=xl,n=zd(n),Xu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var h=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,w=-1,x=-1,P=0,H=0,V=n,z=null;t:for(;;){for(var B;V!==i||h!==0&&V.nodeType!==3||(w=v+h),V!==f||o!==0&&V.nodeType!==3||(x=v+o),V.nodeType===3&&(v+=V.nodeValue.length),(B=V.firstChild)!==null;)z=V,V=B;for(;;){if(V===n)break t;if(z===i&&++P===h&&(w=v),z===f&&++H===o&&(x=v),(B=V.nextSibling)!==null)break;V=z,z=V.parentNode}V=B}i=w===-1||x===-1?null:{start:w,end:x}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ah={focusedElem:n,selectionRange:i},xl=!1,mt=r;mt!==null;)if(r=mt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,mt=n;else for(;mt!==null;){switch(r=mt,f=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)h=n[i],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=r,h=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var ne=Cs(i.type,h);n=o.getSnapshotBeforeUpdate(ne,f),o.__reactInternalSnapshotBeforeUpdate=n}catch(he){Ue(i,i.return,he)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)Ch(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Ch(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,mt=n;break}mt=r.return}}function Og(n,r,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:ur(n,i),o&4&&Ri(5,i);break;case 1:if(ur(n,i),o&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){Ue(i,i.return,v)}else{var h=Cs(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Ue(i,i.return,v)}}o&64&&wg(i),o&512&&Ai(i,i.return);break;case 3:if(ur(n,i),o&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{hp(n,r)}catch(v){Ue(i,i.return,v)}}break;case 27:r===null&&o&4&&Rg(i);case 26:case 5:ur(n,i),r===null&&o&4&&Eg(i),o&512&&Ai(i,i.return);break;case 12:ur(n,i);break;case 31:ur(n,i),o&4&&kg(n,i);break;case 13:ur(n,i),o&4&&jg(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=K_.bind(null,i),fw(n,i))));break;case 22:if(o=i.memoizedState!==null||or,!o){r=r!==null&&r.memoizedState!==null||at,h=or;var f=at;or=o,(at=r)&&!f?cr(n,i,(i.subtreeFlags&8772)!==0):ur(n,i),or=h,at=f}break;case 30:break;default:ur(n,i)}}function xg(n){var r=n.alternate;r!==null&&(n.alternate=null,xg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Nu(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Fe=null,qt=!1;function lr(n,r,i){for(i=i.child;i!==null;)Cg(n,r,i),i=i.sibling}function Cg(n,r,i){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(fs,i)}catch{}switch(i.tag){case 26:at||Bn(i,r),lr(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:at||Bn(i,r);var o=Fe,h=qt;qr(i.type)&&(Fe=i.stateNode,qt=!1),lr(n,r,i),Ui(i.stateNode),Fe=o,qt=h;break;case 5:at||Bn(i,r);case 6:if(o=Fe,h=qt,Fe=null,lr(n,r,i),Fe=o,qt=h,Fe!==null)if(qt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(i.stateNode)}catch(f){Ue(i,r,f)}else try{Fe.removeChild(i.stateNode)}catch(f){Ue(i,r,f)}break;case 18:Fe!==null&&(qt?(n=Fe,wm(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Ma(n)):wm(Fe,i.stateNode));break;case 4:o=Fe,h=qt,Fe=i.stateNode.containerInfo,qt=!0,lr(n,r,i),Fe=o,qt=h;break;case 0:case 11:case 14:case 15:Ur(2,i,r),at||Ur(4,i,r),lr(n,r,i);break;case 1:at||(Bn(i,r),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Sg(i,r,o)),lr(n,r,i);break;case 21:lr(n,r,i);break;case 22:at=(o=at)||i.memoizedState!==null,lr(n,r,i),at=o;break;default:lr(n,r,i)}}function kg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ma(n)}catch(i){Ue(r,r.return,i)}}}function jg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ma(n)}catch(i){Ue(r,r.return,i)}}function z_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Ag),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Ag),r;default:throw Error(a(435,n.tag))}}function ll(n,r){var i=z_(n);r.forEach(function(o){if(!i.has(o)){i.add(o);var h=F_.bind(null,n,o);o.then(h,h)}})}function $t(n,r){var i=r.deletions;if(i!==null)for(var o=0;o<i.length;o++){var h=i[o],f=n,v=r,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(qr(w.type)){Fe=w.stateNode,qt=!1;break e}break;case 5:Fe=w.stateNode,qt=!1;break e;case 3:case 4:Fe=w.stateNode.containerInfo,qt=!0;break e}w=w.return}if(Fe===null)throw Error(a(160));Cg(f,v,h),Fe=null,qt=!1,f=h.alternate,f!==null&&(f.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Mg(r,n),r=r.sibling}var On=null;function Mg(n,r){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:$t(r,n),Vt(n),o&4&&(Ur(3,n,n.return),Ri(3,n),Ur(5,n,n.return));break;case 1:$t(r,n),Vt(n),o&512&&(at||i===null||Bn(i,i.return)),o&64&&or&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var h=On;if($t(r,n),Vt(n),o&512&&(at||i===null||Bn(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=n.memoizedState,i===null)if(o===null)if(n.stateNode===null){e:{o=n.type,i=n.memoizedProps,h=h.ownerDocument||h;t:switch(o){case"title":f=h.getElementsByTagName("title")[0],(!f||f[Wa]||f[_t]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=h.createElement(o),h.head.insertBefore(f,h.querySelector("head > title"))),Tt(f,o,i),f[_t]=n,gt(f),o=f;break e;case"link":var v=Mm("link","href",h).get(o+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(f=v[w],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(w,1);break t}}f=h.createElement(o),Tt(f,o,i),h.head.appendChild(f);break;case"meta":if(v=Mm("meta","content",h).get(o+(i.content||""))){for(w=0;w<v.length;w++)if(f=v[w],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(w,1);break t}}f=h.createElement(o),Tt(f,o,i),h.head.appendChild(f);break;default:throw Error(a(468,o))}f[_t]=n,gt(f),o=f}n.stateNode=o}else Dm(h,n.type,n.stateNode);else n.stateNode=jm(h,o,n.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?Dm(h,n.type,n.stateNode):jm(h,o,n.memoizedProps)):o===null&&n.stateNode!==null&&th(n,n.memoizedProps,i.memoizedProps)}break;case 27:$t(r,n),Vt(n),o&512&&(at||i===null||Bn(i,i.return)),i!==null&&o&4&&th(n,n.memoizedProps,i.memoizedProps);break;case 5:if($t(r,n),Vt(n),o&512&&(at||i===null||Bn(i,i.return)),n.flags&32){h=n.stateNode;try{ta(h,"")}catch(ne){Ue(n,n.return,ne)}}o&4&&n.stateNode!=null&&(h=n.memoizedProps,th(n,h,i!==null?i.memoizedProps:h)),o&1024&&(sh=!0);break;case 6:if($t(r,n),Vt(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(ne){Ue(n,n.return,ne)}}break;case 3:if(Tl=null,h=On,On=Sl(r.containerInfo),$t(r,n),On=h,Vt(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Ma(r.containerInfo)}catch(ne){Ue(n,n.return,ne)}sh&&(sh=!1,Dg(n));break;case 4:o=On,On=Sl(n.stateNode.containerInfo),$t(r,n),Vt(n),On=o;break;case 12:$t(r,n),Vt(n);break;case 31:$t(r,n),Vt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,ll(n,o)));break;case 13:$t(r,n),Vt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(cl=dt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,ll(n,o)));break;case 22:h=n.memoizedState!==null;var x=i!==null&&i.memoizedState!==null,P=or,H=at;if(or=P||h,at=H||x,$t(r,n),at=H,or=P,Vt(n),o&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(i===null||x||or||at||ks(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){x=i=r;try{if(f=x.stateNode,h)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=x.stateNode;var V=x.memoizedProps.style,z=V!=null&&V.hasOwnProperty("display")?V.display:null;w.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ne){Ue(x,x.return,ne)}}}else if(r.tag===6){if(i===null){x=r;try{x.stateNode.nodeValue=h?"":x.memoizedProps}catch(ne){Ue(x,x.return,ne)}}}else if(r.tag===18){if(i===null){x=r;try{var B=x.stateNode;h?Sm(B,!0):Sm(x.stateNode,!1)}catch(ne){Ue(x,x.return,ne)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,ll(n,i))));break;case 19:$t(r,n),Vt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,ll(n,o)));break;case 30:break;case 21:break;default:$t(r,n),Vt(n)}}function Vt(n){var r=n.flags;if(r&2){try{for(var i,o=n.return;o!==null;){if(Tg(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var h=i.stateNode,f=nh(n);ol(n,f,h);break;case 5:var v=i.stateNode;i.flags&32&&(ta(v,""),i.flags&=-33);var w=nh(n);ol(n,w,v);break;case 3:case 4:var x=i.stateNode.containerInfo,P=nh(n);rh(n,P,x);break;default:throw Error(a(161))}}catch(H){Ue(n,n.return,H)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Dg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Dg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function ur(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Og(n,r.alternate,r),r=r.sibling}function ks(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Ur(4,r,r.return),ks(r);break;case 1:Bn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&Sg(r,r.return,i),ks(r);break;case 27:Ui(r.stateNode);case 26:case 5:Bn(r,r.return),ks(r);break;case 22:r.memoizedState===null&&ks(r);break;case 30:ks(r);break;default:ks(r)}n=n.sibling}}function cr(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=n,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:cr(h,f,i),Ri(4,f);break;case 1:if(cr(h,f,i),o=f,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(P){Ue(o,o.return,P)}if(o=f,h=o.updateQueue,h!==null){var w=o.stateNode;try{var x=h.shared.hiddenCallbacks;if(x!==null)for(h.shared.hiddenCallbacks=null,h=0;h<x.length;h++)cp(x[h],w)}catch(P){Ue(o,o.return,P)}}i&&v&64&&wg(f),Ai(f,f.return);break;case 27:Rg(f);case 26:case 5:cr(h,f,i),i&&o===null&&v&4&&Eg(f),Ai(f,f.return);break;case 12:cr(h,f,i);break;case 31:cr(h,f,i),i&&v&4&&kg(h,f);break;case 13:cr(h,f,i),i&&v&4&&jg(h,f);break;case 22:f.memoizedState===null&&cr(h,f,i),Ai(f,f.return);break;case 30:break;default:cr(h,f,i)}r=r.sibling}}function ah(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&fi(i))}function ih(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&fi(n))}function xn(n,r,i,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ng(n,r,i,o),r=r.sibling}function Ng(n,r,i,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:xn(n,r,i,o),h&2048&&Ri(9,r);break;case 1:xn(n,r,i,o);break;case 3:xn(n,r,i,o),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&fi(n)));break;case 12:if(h&2048){xn(n,r,i,o),n=r.stateNode;try{var f=r.memoizedProps,v=f.id,w=f.onPostCommit;typeof w=="function"&&w(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(x){Ue(r,r.return,x)}}else xn(n,r,i,o);break;case 31:xn(n,r,i,o);break;case 13:xn(n,r,i,o);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?xn(n,r,i,o):Oi(n,r):f._visibility&2?xn(n,r,i,o):(f._visibility|=2,wa(n,r,i,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&ah(v,r);break;case 24:xn(n,r,i,o),h&2048&&ih(r.alternate,r);break;default:xn(n,r,i,o)}}function wa(n,r,i,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=n,v=r,w=i,x=o,P=v.flags;switch(v.tag){case 0:case 11:case 15:wa(f,v,w,x,h),Ri(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?wa(f,v,w,x,h):Oi(f,v):(H._visibility|=2,wa(f,v,w,x,h)),h&&P&2048&&ah(v.alternate,v);break;case 24:wa(f,v,w,x,h),h&&P&2048&&ih(v.alternate,v);break;default:wa(f,v,w,x,h)}r=r.sibling}}function Oi(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,o=r,h=o.flags;switch(o.tag){case 22:Oi(i,o),h&2048&&ah(o.alternate,o);break;case 24:Oi(i,o),h&2048&&ih(o.alternate,o);break;default:Oi(i,o)}r=r.sibling}}var xi=8192;function Sa(n,r,i){if(n.subtreeFlags&xi)for(n=n.child;n!==null;)Ug(n,r,i),n=n.sibling}function Ug(n,r,i){switch(n.tag){case 26:Sa(n,r,i),n.flags&xi&&n.memoizedState!==null&&Tw(i,On,n.memoizedState,n.memoizedProps);break;case 5:Sa(n,r,i);break;case 3:case 4:var o=On;On=Sl(n.stateNode.containerInfo),Sa(n,r,i),On=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=xi,xi=16777216,Sa(n,r,i),xi=o):Sa(n,r,i));break;default:Sa(n,r,i)}}function Lg(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Ci(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];mt=o,zg(o,n)}Lg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pg(n),n=n.sibling}function Pg(n){switch(n.tag){case 0:case 11:case 15:Ci(n),n.flags&2048&&Ur(9,n,n.return);break;case 3:Ci(n);break;case 12:Ci(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,ul(n)):Ci(n);break;default:Ci(n)}}function ul(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];mt=o,zg(o,n)}Lg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Ur(8,r,r.return),ul(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,ul(r));break;default:ul(r)}n=n.sibling}}function zg(n,r){for(;mt!==null;){var i=mt;switch(i.tag){case 0:case 11:case 15:Ur(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:fi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,mt=o;else e:for(i=n;mt!==null;){o=mt;var h=o.sibling,f=o.return;if(xg(o),o===i){mt=null;break e}if(h!==null){h.return=f,mt=h;break e}mt=f}}}var B_={getCacheForType:function(n){var r=St(nt),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i},cacheSignal:function(){return St(nt).controller.signal}},I_=typeof WeakMap=="function"?WeakMap:Map,De=0,Ie=null,Ee=null,Re=0,Ne=0,rn=null,Lr=!1,Ea=!1,oh=!1,hr=0,Ze=0,Pr=0,js=0,lh=0,sn=0,Ta=0,ki=null,Gt=null,uh=!1,cl=0,Bg=0,hl=1/0,fl=null,zr=null,lt=0,Br=null,Ra=null,fr=0,ch=0,hh=null,Ig=null,ji=0,fh=null;function an(){return(De&2)!==0&&Re!==0?Re&-Re:L.T!==null?vh():Mu()}function Hg(){if(sn===0)if((Re&536870912)===0||Oe){var n=Fs;Fs<<=1,(Fs&3932160)===0&&(Fs=262144),sn=n}else sn=536870912;return n=tn.current,n!==null&&(n.flags|=32),sn}function Kt(n,r,i){(n===Ie&&(Ne===2||Ne===9)||n.cancelPendingCommit!==null)&&(Aa(n,0),Ir(n,Re,sn,!1)),Qe(n,i),((De&2)===0||n!==Ie)&&(n===Ie&&((De&2)===0&&(js|=i),Ze
vendor: 14,189 bytes, line 9
9===4&&Ir(n,Re,sn,!1)),In(n))}function qg(n,r,i){if((De&6)!==0)throw Error(a(327));var o=!i&&(r&127)===0&&(r&n.expiredLanes)===0||Ke(n,r),h=o?$_(n,r):ph(n,r,!0),f=o;do{if(h===0){Ea&&!o&&Ir(n,r,0,!1);break}else{if(i=n.current.alternate,f&&!H_(i)){h=ph(n,r,!1),f=!1;continue}if(h===2){if(f=r,n.errorRecoveryDisabledLanes&f)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var w=n;h=ki;var x=w.current.memoizedState.isDehydrated;if(x&&(Aa(w,v).flags|=256),v=ph(w,v,!1),v!==2){if(oh&&!x){w.errorRecoveryDisabledLanes|=f,js|=f,h=4;break e}f=Gt,Gt=h,f!==null&&(Gt===null?Gt=f:Gt.push.apply(Gt,f))}h=v}if(f=!1,h!==2)continue}}if(h===1){Aa(n,0),Ir(n,r,0,!0);break}e:{switch(o=n,f=h,f){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ir(o,r,sn,!Lr);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=cl+300-dt(),10<h)){if(Ir(o,r,sn,!Lr),pe(o,0,!0)!==0)break e;fr=r,o.timeoutHandle=bm($g.bind(null,o,i,Gt,fl,uh,r,sn,js,Ta,Lr,f,"Throttled",-0,0),h);break e}$g(o,i,Gt,fl,uh,r,sn,js,Ta,Lr,f,null,-0,0)}}break}while(!0);In(n)}function $g(n,r,i,o,h,f,v,w,x,P,H,V,z,B){if(n.timeoutHandle=-1,V=r.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},Ug(r,f,V);var ne=(f&62914560)===f?cl-dt():(f&4194048)===f?Bg-dt():0;if(ne=Rw(V,ne),ne!==null){fr=f,n.cancelPendingCommit=ne(Xg.bind(null,n,r,f,i,o,h,v,w,x,H,V,null,z,B)),Ir(n,f,v,!P);return}}Xg(n,r,f,i,o,h,v,w,x)}function H_(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var h=i[o],f=h.getSnapshot;h=h.value;try{if(!Wt(f(),h))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ir(n,r,i,o){r&=~lh,r&=~js,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var h=r;0<h;){var f=31-At(h),v=1<<f;o[f]=-1,h&=~v}i!==0&&ps(n,i,r)}function dl(){return(De&6)===0?(Mi(0),!1):!0}function dh(){if(Ee!==null){if(Ne===0)var n=Ee.return;else n=Ee,tr=Ss=null,Cc(n),ma=null,pi=0,n=Ee;for(;n!==null;)_g(n.alternate,n),n=n.return;Ee=null}}function Aa(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,ow(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),fr=0,dh(),Ie=n,Ee=i=Wn(n.current,null),Re=r,Ne=0,rn=null,Lr=!1,Ea=Ke(n,r),oh=!1,Ta=sn=lh=js=Pr=Ze=0,Gt=ki=null,uh=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var h=31-At(o),f=1<<h;r|=n[h],o&=~f}return hr=r,No(),i}function Vg(n,r){ve=null,L.H=Si,r===ga||r===qo?(r=ip(),Ne=3):r===yc?(r=ip(),Ne=4):Ne=r===Gc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,rn=r,Ee===null&&(Ze=1,nl(n,dn(r,n.current)))}function Gg(){var n=tn.current;return n===null?!0:(Re&4194048)===Re?yn===null:(Re&62914560)===Re||(Re&536870912)!==0?n===yn:!1}function Kg(){var n=L.H;return L.H=Si,n===null?Si:n}function Fg(){var n=L.A;return L.A=B_,n}function pl(){Ze=4,Lr||(Re&4194048)!==Re&&tn.current!==null||(Ea=!0),(Pr&134217727)===0&&(js&134217727)===0||Ie===null||Ir(Ie,Re,sn,!1)}function ph(n,r,i){var o=De;De|=2;var h=Kg(),f=Fg();(Ie!==n||Re!==r)&&(fl=null,Aa(n,r)),r=!1;var v=Ze;e:do try{if(Ne!==0&&Ee!==null){var w=Ee,x=rn;switch(Ne){case 8:dh(),v=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(r=!0);var P=Ne;if(Ne=0,rn=null,Oa(n,w,x,P),i&&Ea){v=0;break e}break;default:P=Ne,Ne=0,rn=null,Oa(n,w,x,P)}}q_(),v=Ze;break}catch(H){Vg(n,H)}while(!0);return r&&n.shellSuspendCounter++,tr=Ss=null,De=o,L.H=h,L.A=f,Ee===null&&(Ie=null,Re=0,No()),v}function q_(){for(;Ee!==null;)Yg(Ee)}function $_(n,r){var i=De;De|=2;var o=Kg(),h=Fg();Ie!==n||Re!==r?(fl=null,hl=dt()+500,Aa(n,r)):Ea=Ke(n,r);e:do try{if(Ne!==0&&Ee!==null){r=Ee;var f=rn;t:switch(Ne){case 1:Ne=0,rn=null,Oa(n,r,f,1);break;case 2:case 9:if(sp(f)){Ne=0,rn=null,Qg(r);break}r=function(){Ne!==2&&Ne!==9||Ie!==n||(Ne=7),In(n)},f.then(r,r);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:sp(f)?(Ne=0,rn=null,Qg(r)):(Ne=0,rn=null,Oa(n,r,f,7));break;case 5:var v=null;switch(Ee.tag){case 26:v=Ee.memoizedState;case 5:case 27:var w=Ee;if(v?Nm(v):w.stateNode.complete){Ne=0,rn=null;var x=w.sibling;if(x!==null)Ee=x;else{var P=w.return;P!==null?(Ee=P,gl(P)):Ee=null}break t}}Ne=0,rn=null,Oa(n,r,f,5);break;case 6:Ne=0,rn=null,Oa(n,r,f,6);break;case 8:dh(),Ze=6;break e;default:throw Error(a(462))}}V_();break}catch(H){Vg(n,H)}while(!0);return tr=Ss=null,L.H=o,L.A=h,De=i,Ee!==null?0:(Ie=null,Re=0,No(),Ze)}function V_(){for(;Ee!==null&&!ft();)Yg(Ee)}function Yg(n){var r=vg(n.alternate,n,hr);n.memoizedProps=n.pendingProps,r===null?gl(n):Ee=r}function Qg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=fg(i,r,r.pendingProps,r.type,void 0,Re);break;case 11:r=fg(i,r,r.pendingProps,r.type.render,r.ref,Re);break;case 5:Cc(r);default:_g(i,r),r=Ee=Fd(r,hr),r=vg(i,r,hr)}n.memoizedProps=n.pendingProps,r===null?gl(n):Ee=r}function Oa(n,r,i,o){tr=Ss=null,Cc(r),ma=null,pi=0;var h=r.return;try{if(M_(n,h,r,i,Re)){Ze=1,nl(n,dn(i,n.current)),Ee=null;return}}catch(f){if(h!==null)throw Ee=h,f;Ze=1,nl(n,dn(i,n.current)),Ee=null;return}r.flags&32768?(Oe||o===1?n=!0:Ea||(Re&536870912)!==0?n=!1:(Lr=n=!0,(o===2||o===9||o===3||o===6)&&(o=tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Jg(r,n)):gl(r)}function gl(n){var r=n;do{if((r.flags&32768)!==0){Jg(r,Lr);return}n=r.return;var i=U_(r.alternate,r,hr);if(i!==null){Ee=i;return}if(r=r.sibling,r!==null){Ee=r;return}Ee=r=n}while(r!==null);Ze===0&&(Ze=5)}function Jg(n,r){do{var i=L_(n.alternate,n);if(i!==null){i.flags&=32767,Ee=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){Ee=n;return}Ee=n=i}while(n!==null);Ze=6,Ee=null}function Xg(n,r,i,o,h,f,v,w,x){n.cancelPendingCommit=null;do ml();while(lt!==0);if((De&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(f=r.lanes|r.childLanes,f|=nc,Pt(n,i,f,v,w,x),n===Ie&&(Ee=Ie=null,Re=0),Ra=r,Br=n,fr=i,ch=f,hh=h,Ig=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Y_(Yn,function(){return nm(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=L.T,L.T=null,h=Y.p,Y.p=2,v=De,De|=4;try{P_(n,r,i)}finally{De=v,Y.p=h,L.T=o}}lt=1,Zg(),Wg(),em()}}function Zg(){if(lt===1){lt=0;var n=Br,r=Ra,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=L.T,L.T=null;var o=Y.p;Y.p=2;var h=De;De|=4;try{Mg(r,n);var f=Ah,v=zd(n.containerInfo),w=f.focusedElem,x=f.selectionRange;if(v!==w&&w&&w.ownerDocument&&Pd(w.ownerDocument.documentElement,w)){if(x!==null&&Xu(w)){var P=x.start,H=x.end;if(H===void 0&&(H=P),"selectionStart"in w)w.selectionStart=P,w.selectionEnd=Math.min(H,w.value.length);else{var V=w.ownerDocument||document,z=V&&V.defaultView||window;if(z.getSelection){var B=z.getSelection(),ne=w.textContent.length,he=Math.min(x.start,ne),Be=x.end===void 0?he:Math.min(x.end,ne);!B.extend&&he>Be&&(v=Be,Be=he,he=v);var D=Ld(w,he),k=Ld(w,Be);if(D&&k&&(B.rangeCount!==1||B.anchorNode!==D.node||B.anchorOffset!==D.offset||B.focusNode!==k.node||B.focusOffset!==k.offset)){var U=V.createRange();U.setStart(D.node,D.offset),B.removeAllRanges(),he>Be?(B.addRange(U),B.extend(k.node,k.offset)):(U.setEnd(k.node,k.offset),B.addRange(U))}}}}for(V=[],B=w;B=B.parentNode;)B.nodeType===1&&V.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<V.length;w++){var $=V[w];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}xl=!!Rh,Ah=Rh=null}finally{De=h,Y.p=o,L.T=i}}n.current=r,lt=2}}function Wg(){if(lt===2){lt=0;var n=Br,r=Ra,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=L.T,L.T=null;var o=Y.p;Y.p=2;var h=De;De|=4;try{Og(n,r.alternate,r)}finally{De=h,Y.p=o,L.T=i}}lt=3}}function em(){if(lt===4||lt===3){lt=0,Nn();var n=Br,r=Ra,i=fr,o=Ig;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?lt=5:(lt=0,Ra=Br=null,tm(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(zr=null),Rn(i),r=r.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(fs,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=L.T,h=Y.p,Y.p=2,L.T=null;try{for(var f=n.onRecoverableError,v=0;v<o.length;v++){var w=o[v];f(w.value,{componentStack:w.stack})}}finally{L.T=r,Y.p=h}}(fr&3)!==0&&ml(),In(n),h=n.pendingLanes,(i&261930)!==0&&(h&42)!==0?n===fh?ji++:(ji=0,fh=n):ji=0,Mi(0)}}function tm(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,fi(r)))}function ml(){return Zg(),Wg(),em(),nm()}function nm(){if(lt!==5)return!1;var n=Br,r=ch;ch=0;var i=Rn(fr),o=L.T,h=Y.p;try{Y.p=32>i?32:i,L.T=null,i=hh,hh=null;var f=Br,v=fr;if(lt=0,Ra=Br=null,fr=0,(De&6)!==0)throw Error(a(331));var w=De;if(De|=4,Pg(f.current),Ng(f,f.current,v,i),De=w,Mi(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(fs,f)}catch{}return!0}finally{Y.p=h,L.T=o,tm(n,r)}}function rm(n,r,i){r=dn(i,r),r=Vc(n.stateNode,r,2),n=Mr(n,r,2),n!==null&&(Qe(n,2),In(n))}function Ue(n,r,i){if(n.tag===3)rm(n,n,i);else for(;r!==null;){if(r.tag===3){rm(r,n,i);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(zr===null||!zr.has(o))){n=dn(i,n),i=sg(2),o=Mr(r,i,2),o!==null&&(ag(i,o,r,n),Qe(o,2),In(o));break}}r=r.return}}function gh(n,r,i){var o=n.pingCache;if(o===null){o=n.pingCache=new I_;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(i)||(oh=!0,h.add(i),n=G_.bind(null,n,r,i),r.then(n,n))}function G_(n,r,i){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ie===n&&(Re&i)===i&&(Ze===4||Ze===3&&(Re&62914560)===Re&&300>dt()-cl?(De&2)===0&&Aa(n,0):lh|=i,Ta===Re&&(Ta=0)),In(n)}function sm(n,r){r===0&&(r=Ot()),n=bs(n,r),n!==null&&(Qe(n,r),In(n))}function K_(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),sm(n,i)}function F_(n,r){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,h=n.memoizedState;h!==null&&(i=h.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),sm(n,i)}function Y_(n,r){return Zt(n,r)}var yl=null,xa=null,mh=!1,vl=!1,yh=!1,Hr=0;function In(n){n!==xa&&n.next===null&&(xa===null?yl=xa=n:xa=xa.next=n),vl=!0,mh||(mh=!0,J_())}function Mi(n,r){if(!yh&&vl){yh=!0;do for(var i=!1,o=yl;o!==null;){if(n!==0){var h=o.pendingLanes;if(h===0)var f=0;else{var v=o.suspendedLanes,w=o.pingedLanes;f=(1<<31-At(42|n)+1)-1,f&=h&~(v&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,lm(o,f))}else f=Re,f=pe(o,o===Ie?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ke(o,f)||(i=!0,lm(o,f));o=o.next}while(i);yh=!1}}function Q_(){am()}function am(){vl=mh=!1;var n=0;Hr!==0&&iw()&&(n=Hr);for(var r=dt(),i=null,o=yl;o!==null;){var h=o.next,f=im(o,r);f===0?(o.next=null,i===null?yl=h:i.next=h,h===null&&(xa=i)):(i=o,(n!==0||(f&3)!==0)&&(vl=!0)),o=h}lt!==0&<!==5||Mi(n),Hr!==0&&(Hr=0)}function im(n,r){for(var i=n.suspendedLanes,o=n.pingedLanes,h=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-At(f),w=1<<v,x=h[v];x===-1?((w&i)===0||(w&o)!==0)&&(h[v]=pt(w,r)):x<=r&&(n.expiredLanes|=w),f&=~w}if(r=Ie,i=Re,i=pe(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===r&&(Ne===2||Ne===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&hs(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Ke(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(o!==null&&hs(o),Rn(i)){case 2:case 8:i=un;break;case 32:i=Yn;break;case 268435456:i=Qn;break;default:i=Yn}return o=om.bind(null,n),i=Zt(i,o),n.callbackPriority=r,n.callbackNode=i,r}return o!==null&&o!==null&&hs(o),n.callbackPriority=2,n.callbackNode=null,2}function om(n,r){if(lt!==0&<!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(ml()&&n.callbackNode!==i)return null;var o=Re;return o=pe(n,n===Ie?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(qg(n,o,r),im(n,dt()),n.callbackNode!=null&&n.callbackNode===i?om.bind(null,n):null)}function lm(n,r){if(ml())return null;qg(n,r,!0)}function J_(){lw(function(){(De&6)!==0?Zt(Je,Q_):am()})}function vh(){if(Hr===0){var n=da;n===0&&(n=Ks,Ks<<=1,(Ks&261888)===0&&(Ks=256)),Hr=n}return Hr}function um(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ao(""+n)}function cm(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function X_(n,r,i,o,h){if(r==="submit"&&i&&i.stateNode===h){var f=um((h[It]||null).action),v=o.submitter;v&&(r=(r=v[It]||null)?um(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var w=new ko("action","action",null,o,h);n.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Hr!==0){var x=v?cm(h,v):new FormData(h);zc(i,{pending:!0,data:x,method:h.method,action:f},null,x)}}else typeof f=="function"&&(w.preventDefault(),x=v?cm(h,v):new FormData(h),zc(i,{pending:!0,data:x,method:h.method,action:f},f,x))},currentTarget:h}]})}}for(var bh=0;bh<tc.length;bh++){var _h=tc[bh],Z_=_h.toLowerCase(),W_=_h[0].toUpperCase()+_h.slice(1);An(Z_,"on"+W_)}An(Hd,"onAnimationEnd"),An(qd,"onAnimationIteration"),An($d,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(g_,"onTransitionRun"),An(m_,"onTransitionStart"),An(y_,"onTransitionCancel"),An(Vd,"onTransitionEnd"),Ws("onMouseEnter",["mouseout","mouseover"]),Ws("onMouseLeave",["mouseout","mouseover"]),Ws("onPointerEnter",["pointerout","pointerover"]),Ws("onPointerLeave",["pointerout","pointerover"]),gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gs("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),gs("onBeforeInput",["compositionend","keypress","textInput","paste"]),gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="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(" "),ew=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Di));function hm(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],h=o.event;o=o.listeners;e:{var f=void 0;if(r)for(var v=o.length-1;0<=v;v--){var w=o[v],x=w.instance,P=w.currentTarget;if(w=w.listener,x!==f&&h.isPropagationStopped())break e;f=w,h.currentTarget=P;try{f(h)}catch(H){Do(H)}h.currentTarget=null,f=x}else for(v=0;v<o.length;v++){if(w=o[v],x=w.instance,P=w.currentTarget,w=w.listener,x!==f&&h.isPropagationStopped())break e;f=w,h.currentTarget=P;try{f(h)}catch(H){Do(H)}h.currentTarget=null,f=x}}}}function Te(n,r){var i=r[Du];i===void 0&&(i=r[Du]=new Set);var o=n+"__bubble";i.has(o)||(fm(r,n,2,!1),i.add(o))}function wh(n,r,i){var o=0;r&&(o|=4),fm(i,n,o,r)}var bl="_reactListening"+Math.random().toString(36).slice(2);function Sh(n){if(!n[bl]){n[bl]=!0,ad.forEach(function(i){i!=="selectionchange"&&(ew.has(i)||wh(i,!1,n),wh(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[bl]||(r[bl]=!0,wh("selectionchange",!1,r))}}function fm(n,r,i,o){switch(Hm(r)){case 2:var h=xw;break;case 8:h=Cw;break;default:h=Ph}i=h.bind(null,r,i,n),h=void 0,!qu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?n.addEventListener(r,i,{capture:!0,passive:h}):n.addEventListener(r,i,!0):h!==void 0?n.addEventListener(r,i,{passive:h}):n.addEventListener(r,i,!1)}function Eh(n,r,i,o,h){var f=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var w=o.stateNode.containerInfo;if(w===h)break;if(v===4)for(v=o.return;v!==null;){var x=v.tag;if((x===3||x===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;w!==null;){if(v=Js(w),v===null)return;if(x=v.tag,x===5||x===6||x===26||x===27){o=f=v;continue e}w=w.parentNode}}o=o.return}yd(function(){var P=f,H=Iu(i),V=[];e:{var z=Gd.get(n);if(z!==void 0){var B=ko,ne=n;switch(n){case"keypress":if(xo(i)===0)break e;case"keydown":case"keyup":B=Fb;break;case"focusin":ne="focus",B=Ku;break;case"focusout":ne="blur",B=Ku;break;case"beforeblur":case"afterblur":B=Ku;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=_d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Ub;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Jb;break;case Hd:case qd:case $d:B=zb;break;case Vd:B=Zb;break;case"scroll":case"scrollend":B=Db;break;case"wheel":B=e_;break;case"copy":case"cut":case"paste":B=Ib;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Sd;break;case"toggle":case"beforetoggle":B=n_}var he=(r&4)!==0,Be=!he&&(n==="scroll"||n==="scrollend"),D=he?z!==null?z+"Capture":null:z;he=[];for(var k=P,U;k!==null;){var $=k;if(U=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||U===null||D===null||($=ti(k,D),$!=null&&he.push(Ni(k,$,U))),Be)break;k=k.return}0<he.length&&(z=new B(z,ne,null,i,H),V.push({event:z,listeners:he}))}}if((r&7)===0){e:{if(z=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",z&&i!==Bu&&(ne=i.relatedTarget||i.fromElement)&&(Js(ne)||ne[Qs]))break e;if((B||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,B?(ne=i.relatedTarget||i.toElement,B=P,ne=ne?Js(ne):null,ne!==null&&(Be=u(ne),he=ne.tag,ne!==Be||he!==5&&he!==27&&he!==6)&&(ne=null)):(B=null,ne=P),B!==ne)){if(he=_d,$="onMouseLeave",D="onMouseEnter",k="mouse",(n==="pointerout"||n==="pointerover")&&(he=Sd,$="onPointerLeave",D="onPointerEnter",k="pointer"),Be=B==null?z:ei(B),U=ne==null?z:ei(ne),z=new he($,k+"leave",B,i,H),z.target=Be,z.relatedTarget=U,$=null,Js(H)===P&&(he=new he(D,k+"enter",ne,i,H),he.target=U,he.relatedTarget=Be,$=he),Be=$,B&&ne)t:{for(he=tw,D=B,k=ne,U=0,$=D;$;$=he($))U++;$=0;for(var ue=k;ue;ue=he(ue))$++;for(;0<U-$;)D=he(D),U--;for(;0<$-U;)k=he(k),$--;for(;U--;){if(D===k||k!==null&&D===k.alternate){he=D;break t}D=he(D),k=he(k)}he=null}else he=null;B!==null&&dm(V,z,B,he,!1),ne!==null&&Be!==null&&dm(V,Be,ne,he,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(z=P?ei(P):window,B=z.nodeName&&z.nodeName.toLowerCase(),B==="select"||B==="input"&&z.type==="file")var Ce=kd;else if(xd(z))if(jd)Ce=f_;else{Ce=c_;var ie=u_}else B=z.nodeName,!B||B.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?P&&zu(P.elementType)&&(Ce=kd):Ce=h_;if(Ce&&(Ce=Ce(n,P))){Cd(V,Ce,i,H);break e}ie&&ie(n,z,P),n==="focusout"&&P&&z.type==="number"&&P.memoizedProps.value!=null&&Pu(z,"number",z.value)}switch(ie=P?ei(P):window,n){case"focusin":(xd(ie)||ie.contentEditable==="true")&&(aa=ie,Zu=P,ui=null);break;case"focusout":ui=Zu=aa=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,Bd(V,i,H);break;case"selectionchange":if(p_)break;case"keydown":case"keyup":Bd(V,i,H)}var be;if(Yu)e:{switch(n){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else sa?Ad(n,i)&&(Ae="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Ae="onCompositionStart");Ae&&(Ed&&i.locale!=="ko"&&(sa||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&sa&&(be=vd()):(Rr=H,$u="value"in Rr?Rr.value:Rr.textContent,sa=!0)),ie=_l(P,Ae),0<ie.length&&(Ae=new wd(Ae,n,null,i,H),V.push({event:Ae,listeners:ie}),be?Ae.data=be:(be=Od(i),be!==null&&(Ae.data=be)))),(be=s_?a_(n,i):i_(n,i))&&(Ae=_l(P,"onBeforeInput"),0<Ae.length&&(ie=new wd("onBeforeInput","beforeinput",null,i,H),V.push({event:ie,listeners:Ae}),ie.data=be)),X_(V,n,P,i,H)}hm(V,r)})}function Ni(n,r,i){return{instance:n,listener:r,currentTarget:i}}function _l(n,r){for(var i=r+"Capture",o=[];n!==null;){var h=n,f=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||f===null||(h=ti(n,i),h!=null&&o.unshift(Ni(n,h,f)),h=ti(n,r),h!=null&&o.push(Ni(n,h,f))),n.tag===3)return o;n=n.return}return[]}function tw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function dm(n,r,i,o,h){for(var f=r._reactName,v=[];i!==null&&i!==o;){var w=i,x=w.alternate,P=w.stateNode;if(w=w.tag,x!==null&&x===o)break;w!==5&&w!==26&&w!==27||P===null||(x=P,h?(P=ti(i,f),P!=null&&v.unshift(Ni(i,P,x))):h||(P=ti(i,f),P!=null&&v.push(Ni(i,P,x)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var nw=/\r\n?/g,rw=/\u0000|\uFFFD/g;function pm(n){return(typeof n=="string"?n:""+n).replace(nw,` 10`).replace(rw,"")}function gm(n,r){return r=pm(r),pm(n)===r}function ze(n,r,i,o,h,f){switch(i){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||ta(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&ta(n,""+o);break;case"className":To(n,"class",o);break;case"tabIndex":To(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":To(n,i,o);break;case"style":gd(n,o,f);break;case"data":if(r!=="object"){To(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=Ao(""+o),n.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(r!=="input"&&ze(n,r,"name",h.name,h,null),ze(n,r,"formEncType",h.formEncType,h,null),ze(n,r,"formMethod",h.formMethod,h,null),ze(n,r,"formTarget",h.formTarget,h,null)):(ze(n,r,"encType",h.encType,h,null),ze(n,r,"method",h.method,h,null),ze(n,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=Ao(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=Xn);break;case"onScroll":o!=null&&Te("scroll",n);break;case"onScrollEnd":o!=null&&Te("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){n.removeAttribute("xlink:href");break}i=Ao(""+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":Te("beforetoggle",n),Te("toggle",n),Eo(n,"popover",o);break;case"xlinkActuate":Jn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Jn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Jn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Jn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Jn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Jn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Jn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Jn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Jn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Eo(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=jb.get(i)||i,Eo(n,i,o))}}function Th(n,r,i,o,h,f){switch(i){case"style":gd(n,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof o=="string"?ta(n,o):(typeof o=="number"||typeof o=="bigint")&&ta(n,""+o);break;case"onScroll":o!=null&&Te("scroll",n);break;case"onScrollEnd":o!=null&&Te("scrollend",n);break;case"onClick":o!=null&&(n.onclick=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!id.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(h=i.endsWith("Capture"),r=i.slice(2,h?i.length-7:void 0),f=n[It]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(r,f,h),typeof o=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,o,h);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):Eo(n,i,o)}}}function Tt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",n),Te("load",n);var o=!1,h=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:ze(n,r,f,v,i,null)}}h&&ze(n,r,"srcSet",i.srcSet,i,null),o&&ze(n,r,"src",i.src,i,null);return;case"input":Te("invalid",n);var w=f=v=h=null,x=null,P=null;for(o in i)if(i.hasOwnProperty(o)){var H=i[o];if(H!=null)switch(o){case"name":h=H;break;case"type":v=H;break;case"checked":x=H;break;case"defaultChecked":P=H;break;case"value":f=H;break;case"defaultValue":w=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,r));break;default:ze(n,r,o,H,i,null)}}hd(n,f,w,x,P,v,h,!1);return;case"select":Te("invalid",n),o=v=f=null;for(h in i)if(i.hasOwnProperty(h)&&(w=i[h],w!=null))switch(h){case"value":f=w;break;case"defaultValue":v=w;break;case"multiple":o=w;default:ze(n,r,h,w,i,null)}r=f,i=v,n.multiple=!!o,r!=null?ea(n,!!o,r,!1):i!=null&&ea(n,!!o,i,!0);return;case"textarea":Te("invalid",n),f=h=o=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":o=w;break;case"defaultValue":h=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:ze(n,r,v,w,i,null)}dd(n,o,h,f);return;case"option":for(x in i)i.hasOwnProperty(x)&&(o=i[x],o!=null)&&(x==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":ze(n,r,x,o,i,null));return;case"dialog":Te("beforetoggle",n),Te("toggle",n),Te("cancel",n),Te("close",n);break;case"iframe":case"object":Te("load",n);break;case"video":case"audio":for(o=0;o<Di.length;o++)Te(Di[o],n);break;case"image":Te("error",n),Te("load",n);break;case"details":Te("toggle",n);break;case"embed":case"source":case"link":Te("error",n),Te("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,r));default:ze(n,r,P,o,i,null)}return;default:if(zu(r)){for(H in i)i.hasOwnProperty(H)&&(o=i[H],o!==void 0&&Th(n,r,H,o,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(o=i[w],o!=null&&ze(n,r,w,o,i,null))}function sw(n,r,i,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,f=null,v=null,w=null,x=null,P=null,H=null;for(B in i){var V=i[B];if(i.hasOwnProperty(B)&&V!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":x=V;default:o.hasOwnProperty(B)||ze(n,r,B,null,o,V)}}for(var z in o){var B=o[z];if(V=i[z],o.hasOwnProperty(z)&&(B!=null||V!=null))switch(z){case"type":f=B;break;case"name":h=B;break;case"checked":P=B;break;case"defaultChecked":H=B;break;case"value":v=B;break;case"defaultValue":w=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,r));break;default:B!==V&&ze(n,r,z,B,o,V)}}Lu(n,v,w,x,P,H,f,h);return;case"select":B=v=w=z=null;for(f in i)if(x=i[f],i.hasOwnProperty(f)&&x!=null)switch(f){case"value":break;case"multiple":B=x;default:o.hasOwnProperty(f)||ze(n,r,f,null,o,x)}for(h in o)if(f=o[h],x=i[h],o.hasOwnProperty(h)&&(f!=null||x!=null))switch(h){case"value":z=f;break;case"defaultValue":w=f;break;case"multiple":v=f;default:f!==x&&ze(n,r,h,f,o,x)}r=w,i=v,o=B,z!=null?ea(n,!!i,z,!1):!!o!=!!i&&(r!=null?ea(n,!!i,r,!0):ea(n,!!i,i?[]:"",!1));return;case"textarea":B=z=null;for(w in i)if(h=i[w],i.hasOwnProperty(w)&&h!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ze(n,r,w,null,o,h)}for(v in o)if(h=o[v],f=i[v],o.hasOwnProperty(v)&&(h!=null||f!=null))switch(v){case"value":z=h;break;case"defaultValue":B=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==f&&ze(n,r,v,h,o,f)}fd(n,z,B);return;case"option":for(var ne in i)z=i[ne],i.hasOwnProperty(ne)&&z!=null&&!o.hasOwnProperty(ne)&&(ne==="selected"?n.selected=!1:ze(n,r,ne,null,o,z));for(x in o)z=o[x],B=i[x],o.hasOwnProperty(x)&&z!==B&&(z!=null||B!=null)&&(x==="selected"?n.selected=z&&typeof z!="function"&&typeof z!="symbol":ze(n,r,x,z,o,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in i)z=i[he],i.hasOwnProperty(he)&&z!=null&&!o.hasOwnProperty(he)&&ze(n,r,he,null,o,z);for(P in o)if(z=o[P],B=i[P],o.hasOwnProperty(P)&&z!==B&&(z!=null||B!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(137,r));break;default:ze(n,r,P,z,o,B)}return;default:if(zu(r)){for(var Be in i)z=i[Be],i.hasOwnProperty(Be)&&z!==void 0&&!o.hasOwnProperty(Be)&&Th(n,r,Be,void 0,o,z);for(H in o)z=o[H],B=i[H],!o.hasOwnProperty(H)||z===B||z===void 0&&B===void 0||Th(n,r,H,z,o,B);return}}for(var D in i)z=i[D],i.hasOwnProperty(D)&&z!=null&&!o.hasOwnProperty(D)&&ze(n,r,D,null,o,z);for(V in o)z=o[V],B=i[V],!o.hasOwnProperty(V)||z===B||z==null&&B==null||ze(n,r,V,z,o,B)}function mm(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aw(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var h=i[o],f=h.transferSize,v=h.initiatorType,w=h.duration;if(f&&w&&mm(v)){for(v=0,w=h.responseEnd,o+=1;o<i.length;o++){var x=i[o],P=x.startTime;if(P>w)break;var H=x.transferSize,V=x.initiatorType;H&&mm(V)&&(x=x.responseEnd,v+=H*(x<w?1:(w-P)/(x-P)))}if(--o,r+=8*(f+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,435 bytes, line 10
10n:5}var Rh=null,Ah=null;function wl(n){return n.nodeType===9?n:n.ownerDocument}function ym(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vm(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Oh(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var xh=null;function iw(){var n=window.event;return n&&n.type==="popstate"?n===xh?!1:(xh=n,!0):(xh=null,!1)}var bm=typeof setTimeout=="function"?setTimeout:void 0,ow=typeof clearTimeout=="function"?clearTimeout:void 0,_m=typeof Promise=="function"?Promise:void 0,lw=typeof queueMicrotask=="function"?queueMicrotask:typeof _m<"u"?function(n){return _m.resolve(null).then(n).catch(uw)}:bm;function uw(n){setTimeout(function(){throw n})}function qr(n){return n==="head"}function wm(n,r){var i=r,o=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(h),Ma(r);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Ui(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Ui(i);for(var f=i.firstChild;f;){var v=f.nextSibling,w=f.nodeName;f[Wa]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&Ui(n.ownerDocument.body);i=h}while(i);Ma(r)}function Sm(n,r){var i=n;n=0;do{var o=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=o}while(i)}function Ch(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Ch(i),Nu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function cw(n,r,i,o){for(;n.nodeType===1;){var h=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Wa])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var f=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=vn(n.nextSibling),n===null)break}return null}function hw(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=vn(n.nextSibling),n===null))return null;return n}function Em(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=vn(n.nextSibling),n===null))return null;return n}function kh(n){return n.data==="$?"||n.data==="$~"}function jh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function fw(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var o=function(){r(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function vn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var Mh=null;function Tm(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return vn(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function Rm(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function Am(n,r,i){switch(r=wl(i),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Ui(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Nu(n)}var bn=new Map,Om=new Set;function Sl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var dr=Y.d;Y.d={f:dw,r:pw,D:gw,C:mw,L:yw,m:vw,X:_w,S:bw,M:ww};function dw(){var n=dr.f(),r=dl();return n||r}function pw(n){var r=Xs(n);r!==null&&r.tag===5&&r.type==="form"?Vp(r):dr.r(n)}var Ca=typeof document>"u"?null:document;function xm(n,r,i){var o=Ca;if(o&&typeof r=="string"&&r){var h=hn(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof i=="string"&&(h+='[crossorigin="'+i+'"]'),Om.has(h)||(Om.add(h),n={rel:n,crossOrigin:i,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),Tt(r,"link",n),gt(r),o.head.appendChild(r)))}}function gw(n){dr.D(n),xm("dns-prefetch",n,null)}function mw(n,r){dr.C(n,r),xm("preconnect",n,r)}function yw(n,r,i){dr.L(n,r,i);var o=Ca;if(o&&n&&r){var h='link[rel="preload"][as="'+hn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(h+='[imagesrcset="'+hn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(h+='[imagesizes="'+hn(i.imageSizes)+'"]')):h+='[href="'+hn(n)+'"]';var f=h;switch(r){case"style":f=ka(n);break;case"script":f=ja(n)}bn.has(f)||(n=m({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),bn.set(f,n),o.querySelector(h)!==null||r==="style"&&o.querySelector(Li(f))||r==="script"&&o.querySelector(Pi(f))||(r=o.createElement("link"),Tt(r,"link",n),gt(r),o.head.appendChild(r)))}}function vw(n,r){dr.m(n,r);var i=Ca;if(i&&n){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+hn(o)+'"][href="'+hn(n)+'"]',f=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=ja(n)}if(!bn.has(f)&&(n=m({rel:"modulepreload",href:n},r),bn.set(f,n),i.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Pi(f)))return}o=i.createElement("link"),Tt(o,"link",n),gt(o),i.head.appendChild(o)}}}function bw(n,r,i){dr.S(n,r,i);var o=Ca;if(o&&n){var h=Zs(o).hoistableStyles,f=ka(n);r=r||"default";var v=h.get(f);if(!v){var w={loading:0,preload:null};if(v=o.querySelector(Li(f)))w.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},i),(i=bn.get(f))&&Dh(n,i);var x=v=o.createElement("link");gt(x),Tt(x,"link",n),x._p=new Promise(function(P,H){x.onload=P,x.onerror=H}),x.addEventListener("load",function(){w.loading|=1}),x.addEventListener("error",function(){w.loading|=2}),w.loading|=4,El(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:w},h.set(f,v)}}}function _w(n,r){dr.X(n,r);var i=Ca;if(i&&n){var o=Zs(i).hoistableScripts,h=ja(n),f=o.get(h);f||(f=i.querySelector(Pi(h)),f||(n=m({src:n,async:!0},r),(r=bn.get(h))&&Nh(n,r),f=i.createElement("script"),gt(f),Tt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function ww(n,r){dr.M(n,r);var i=Ca;if(i&&n){var o=Zs(i).hoistableScripts,h=ja(n),f=o.get(h);f||(f=i.querySelector(Pi(h)),f||(n=m({src:n,async:!0,type:"module"},r),(r=bn.get(h))&&Nh(n,r),f=i.createElement("script"),gt(f),Tt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function Cm(n,r,i,o){var h=(h=ce.current)?Sl(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=ka(i.href),i=Zs(h).hoistableStyles,o=i.get(r),o||(o={type:"style",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=ka(i.href);var f=Zs(h).hoistableStyles,v=f.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=h.querySelector(Li(n)))&&!f._p&&(v.instance=f,v.state.loading=5),bn.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},bn.set(n,i),f||Sw(h,n,i,v.state))),r&&o===null)throw Error(a(528,""));return v}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?
vendor: 8,424 bytes, line 10
10(r=ja(i),i=Zs(h).hoistableScripts,o=i.get(r),o||(o={type:"script",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function ka(n){return'href="'+hn(n)+'"'}function Li(n){return'link[rel="stylesheet"]['+n+"]"}function km(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function Sw(n,r,i,o){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=n.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),Tt(r,"link",i),gt(r),n.head.appendChild(r))}function ja(n){return'[src="'+hn(n)+'"]'}function Pi(n){return"script[async]"+n}function jm(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+hn(i.href)+'"]');if(o)return r.instance=o,gt(o),o;var h=m({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),gt(o),Tt(o,"style",h),El(o,i.precedence,n),r.instance=o;case"stylesheet":h=ka(i.href);var f=n.querySelector(Li(h));if(f)return r.state.loading|=4,r.instance=f,gt(f),f;o=km(i),(h=bn.get(h))&&Dh(o,h),f=(n.ownerDocument||n).createElement("link"),gt(f);var v=f;return v._p=new Promise(function(w,x){v.onload=w,v.onerror=x}),Tt(f,"link",o),r.state.loading|=4,El(f,i.precedence,n),r.instance=f;case"script":return f=ja(i.src),(h=n.querySelector(Pi(f)))?(r.instance=h,gt(h),h):(o=i,(h=bn.get(f))&&(o=m({},i),Nh(o,h)),n=n.ownerDocument||n,h=n.createElement("script"),gt(h),Tt(h,"link",o),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,El(o,i.precedence,n));return r.instance}function El(n,r,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,f=h,v=0;v<o.length;v++){var w=o[v];if(w.dataset.precedence===r)f=w;else if(f!==h)break}f?f.parentNode.insertBefore(n,f.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function Dh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Nh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Tl=null;function Mm(n,r,i){if(Tl===null){var o=new Map,h=Tl=new Map;h.set(i,o)}else h=Tl,o=h.get(i),o||(o=new Map,h.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),h=0;h<i.length;h++){var f=i[h];if(!(f[Wa]||f[_t]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=n+v;var w=o.get(v);w?w.push(f):o.set(v,[f])}}return o}function Dm(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function Ew(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Nm(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Tw(n,r,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 h=ka(o.href),f=r.querySelector(Li(h));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Rl.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=f,gt(f);return}f=r.ownerDocument||r,o=km(o),(h=bn.get(h))&&Dh(o,h),f=f.createElement("link"),gt(f);var v=f;v._p=new Promise(function(w,x){v.onload=w,v.onerror=x}),Tt(f,"link",o),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Rl.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var Uh=0;function Rw(n,r){return n.stylesheets&&n.count===0&&Ol(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&Ol(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+r);0<n.imgBytes&&Uh===0&&(Uh=62500*aw());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ol(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>Uh?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function Rl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ol(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Al=null;function Ol(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Al=new Map,r.forEach(Aw,n),Al=null,Rl.call(n))}function Aw(n,r){if(!(r.state.loading&4)){var i=Al.get(n);if(i)var o=i.get(null);else{i=new Map,Al.set(n,i);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<h.length;f++){var v=h[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),f=i.get(v)||o,f===o&&i.set(null,h),i.set(v,h),this.count++,o=Rl.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),f?f.parentNode.insertBefore(h,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var zi={$$typeof:j,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Ow(n,r,i,o,h,f,v,w,x){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=Er(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Er(0),this.hiddenUpdates=Er(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Um(n,r,i,o,h,f,v,w,x,P,H,V){return n=new Ow(n,r,i,v,x,P,H,V,w),r=1,f===!0&&(r|=24),f=en(3,null,null,r),n.current=f,f.stateNode=n,r=pc(),r.refCount++,n.pooledCache=r,r.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:r},vc(f),n}function Lm(n){return n?(n=la,n):la}function Pm(n,r,i,o,h,f){h=Lm(h),o.context===null?o.context=h:o.pendingContext=h,o=jr(r),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=Mr(n,o,r),i!==null&&(Kt(i,n,r),mi(i,n,r))}function zm(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function Lh(n,r){zm(n,r),(n=n.alternate)&&zm(n,r)}function Bm(n){if(n.tag===13||n.tag===31){var r=bs(n,67108864);r!==null&&Kt(r,n,67108864),Lh(n,67108864)}}function Im(n){if(n.tag===13||n.tag===31){var r=an();r=Ys(r);var i=bs(n,r);i!==null&&Kt(i,n,r),Lh(n,r)}}var xl=!0;function xw(n,r,i,o){var h=L.T;L.T=null;var f=Y.p;try{Y.p=2,Ph(n,r,i,o)}finally{Y.p=f,L.T=h}}function Cw(n,r,i,o){var h=L.T;L.T=null;var f=Y.p;try{Y.p=8,Ph(n,r,i,o)}finally{Y.p=f,L.T=h}}function Ph(n,r,i,o){if(xl){var h=zh(o);if(h===null)Eh(n,r,o,Cl,i),qm(n,o);else if(jw(h,n,r,i,o))o.stopPropagation();else if(qm(n,o),r&4&&-1<kw.indexOf(n)){for(;h!==null;){var f=Xs(h);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Ln(f.pendingLanes);if(v!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var x=1<<31-At(v);w.entanglements[1]|=x,v&=~x}In(f),(De&6)===0&&(hl=dt()+500,Mi(0))}}break;case 31:case 13:w=bs(f,2),w!==null&&Kt(w,f,2),dl(),Lh(f,2)}if(f=zh(o),f===null&&Eh(n,r,o,Cl,i),f===h)break;h=f}h!==null&&o.stopPropagation()}else Eh(n,r,o,null,i)}}function zh(n){return n=Iu(n),Bh(n)}var Cl=null;
vendor: 6,683 bytes, line 10
10function Bh(n){if(Cl=null,n=Js(n),n!==null){var r=u(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=c(r),n!==null)return n;n=null}else if(i===31){if(n=d(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Cl=n,null}function Hm(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(Le()){case Je:return 2;case un:return 8;case Yn:case Xa:return 32;case Qn:return 268435456;default:return 32}default:return 32}}var Ih=!1,$r=null,Vr=null,Gr=null,Bi=new Map,Ii=new Map,Kr=[],kw="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 qm(n,r){switch(n){case"focusin":case"focusout":$r=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Gr=null;break;case"pointerover":case"pointerout":Bi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ii.delete(r.pointerId)}}function Hi(n,r,i,o,h,f){return n===null||n.nativeEvent!==f?(n={blockedOn:r,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[h]},r!==null&&(r=Xs(r),r!==null&&Bm(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function jw(n,r,i,o,h){switch(r){case"focusin":return $r=Hi($r,n,r,i,o,h),!0;case"dragenter":return Vr=Hi(Vr,n,r,i,o,h),!0;case"mouseover":return Gr=Hi(Gr,n,r,i,o,h),!0;case"pointerover":var f=h.pointerId;return Bi.set(f,Hi(Bi.get(f)||null,n,r,i,o,h)),!0;case"gotpointercapture":return f=h.pointerId,Ii.set(f,Hi(Ii.get(f)||null,n,r,i,o,h)),!0}return!1}function $m(n){var r=Js(n.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){n.blockedOn=r,rd(n.priority,function(){Im(i)});return}}else if(r===31){if(r=d(i),r!==null){n.blockedOn=r,rd(n.priority,function(){Im(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function kl(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=zh(n.nativeEvent);if(i===null){i=n.nativeEvent;var o=new i.constructor(i.type,i);Bu=o,i.target.dispatchEvent(o),Bu=null}else return r=Xs(i),r!==null&&Bm(r),n.blockedOn=i,!1;r.shift()}return!0}function Vm(n,r,i){kl(n)&&i.delete(r)}function Mw(){Ih=!1,$r!==null&&kl($r)&&($r=null),Vr!==null&&kl(Vr)&&(Vr=null),Gr!==null&&kl(Gr)&&(Gr=null),Bi.forEach(Vm),Ii.forEach(Vm)}function jl(n,r){n.blockedOn===r&&(n.blockedOn=null,Ih||(Ih=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mw)))}var Ml=null;function Gm(n){Ml!==n&&(Ml=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ml===n&&(Ml=null);for(var r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],h=n[r+2];if(typeof o!="function"){if(Bh(o||i)===null)continue;break}var f=Xs(i);f!==null&&(n.splice(r,3),r-=3,zc(f,{pending:!0,data:h,method:i.method,action:o},o,h))}}))}function Ma(n){function r(x){return jl(x,n)}$r!==null&&jl($r,n),Vr!==null&&jl(Vr,n),Gr!==null&&jl(Gr,n),Bi.forEach(r),Ii.forEach(r);for(var i=0;i<Kr.length;i++){var o=Kr[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Kr.length&&(i=Kr[0],i.blockedOn===null);)$m(i),i.blockedOn===null&&Kr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var h=i[o],f=i[o+1],v=h[It]||null;if(typeof f=="function")v||Gm(i);else if(v){var w=null;if(f&&f.hasAttribute("formAction")){if(h=f,v=f[It]||null)w=v.formAction;else if(Bh(h)!==null)continue}else w=v.action;typeof w=="function"?i[o+1]=w:(i.splice(o,3),o-=3),Gm(i)}}}function Km(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function Hh(n){this._internalRoot=n}Dl.prototype.render=Hh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,o=an();Pm(i,o,n,r,null,null)},Dl.prototype.unmount=Hh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Pm(n.current,2,null,n,null,null),dl(),r[Qs]=null}};function Dl(n){this._internalRoot=n}Dl.prototype.unstable_scheduleHydration=function(n){if(n){var r=Mu();n={blockedOn:null,target:n,priority:r};for(var i=0;i<Kr.length&&r!==0&&r<Kr[i].priority;i++);Kr.splice(i,0,n),i===0&&$m(n)}};var Fm=e.version;if(Fm!=="19.2.5")throw Error(a(527,Fm,"19.2.5"));Y.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var Dw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nl.isDisabled&&Nl.supportsFiber)try{fs=Nl.inject(Dw),jt=Nl}catch{}}return $i.createRoot=function(n,r){if(!l(n))throw Error(a(299));var i=!1,o="",h=eg,f=tg,v=ng;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Um(n,1,!1,null,null,i,o,null,h,f,v,Km),n[Qs]=r.current,Sh(n),new Hh(r)},$i.hydrateRoot=function(n,r,i){if(!l(n))throw Error(a(299));var o=!1,h="",f=eg,v=tg,w=ng,x=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(x=i.formState)),r=Um(n,1,!0,r,i??null,o,h,x,f,v,w,Km),r.context=Lm(null),i=r.current,o=an(),o=Ys(o),h=jr(o),h.callback=null,Mr(i,h,o),i=o,r.current.lanes=i,Qe(r,i),In(r),n[Qs]=r.current,Sh(n),new Dl(r)},$i.version="19.2.5",$i}var ry;function $w(){if(ry)return Vh.exports;ry=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Vh.exports=qw(),Vh.exports}var Vw=$w(),Gw="__TSS_CONTEXT",yf=Symbol.for("TSS_SERVER_FUNCTION"),p2=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),Kw="application/x-tss-framed",pr={JSON:0,CHUNK:1,END:2,ERROR:3},Fw=/;\s*v=(\d+)/;function Yw(t){const e=t.match(Fw);return e?parseInt(e[1],10):void 0}function Qw(t){const e=Yw(t);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var zv=()=>window.__TSS_START_OPTIONS__,Bv=!1;function so(t){return t[t.length-1]}function Jw(t){return typeof t=="function"}function Wr(t,e){return Jw(t)?t(e):t}var Xw=Object.prototype.hasOwnProperty,sy=Object.prototype.propertyIsEnumerable,Zw=()=>Object.create(null),Ms=(t,e)=>Us(t,e,Zw);function Us(t,e,s=()=>({}),a=0){if(t===e)return t;if(a>500)return e;const l=e,u=oy(t)&&oy(l);if(!u&&!(Qa(t)&&Qa(l)))return l;const c=u?t:ay(t);if(!c)return l;const d=u?l:ay(l);if(!d)return l;const p=c.length,g=d.length,y=u?new Array(g):s();let m=0;for(let b=0;b<g;b++){const _=u?b:d[b],S=t[_],O=l[_];if(S===O){y[_]=S,(u?b<p:Xw.call(t,_))&&m++;continue}if(S===null||O===null||typeof S!="object"||typeof O!="object"){y[_]=O;continue}const E=Us(S,O,s,a+1);y[_]=E,E===S&&m++}return p===g&&m===p?t:y}function ay(t){const e=Object.getOwnPropertyNames(t);for(const l of e)if(!sy.call(t,l))return!1;const s=Object.getOwnPropertySymbols(t);if(s.length===0)return e;const a=e;for(const l of s){if(!sy.call(t,l))return!1;a.push(l)}return a}function Qa(t){if(!iy(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const s=e.prototype;return!(!iy(s)||!s.hasOwnProperty("isPrototypeOf"))}function iy(t){return Object.prototype.toString.call(t)==="[object Object]"}function oy(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Qt(t,e,s){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let a=0,l=t.length;a<l;a++)if(!Qt(t[a],e[a],s))return!1;return!0}if(Qa(t)&&Qa(e)){const a=s?.ignoreUndefined??!0;if(s?.partial){for(const c in e)if((!a||e[c]!==void 0)&&!Qt(t[c],e[c],s))return!1;return!0}let l=0;if(!a)l=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&l++;let u=0;for(const c in e)if((!a||e[c]!==void 0)&&(u++,u>l||!Qt(t[c],e[c],s)))return!1;return l===u}return!1}function qs(t){let e,s;const a=new Promise((l,u)=>{e=l,s=u});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,e(l),t?.(l)},a.reject=l=>{a.status="rejected",s(l)},a}function Ww(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function ao(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function eS(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function ly(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return eS(e)}var tS=["http:","https:","mailto:","tel:"];function nu(t,e){if(!t)return!1;try{const s=new URL(t);return!e.has(s.protocol)}catch{return!1}}var nS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},rS=/[&><\u2028\u2029]/g;function sS(t){return t.replace(rS,e=>nS[e])}function Vi(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let s=0,a="",l;for(;(l=e.exec(t))!==null;)a+=ly(t.slice(s,l.index))+l[0],s=e.lastIndex;a=a+ly(s?t.slice(s):t);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function aS(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function iS(t,e){if(t===e)return!0;
10if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}function Xt(){throw new Error("Invariant failed")}function io(t){const e=new Map;let s,a;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,a&&(a.next=u,u.prev=a)):(u.next.prev=void 0,s=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=e.get(u);if(c)return l(c),c.value},set(u,c){if(e.size>=t&&s){const p=s;e.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const d=e.get(u);if(d)d.value=c,l(d);else{const p={key:u,value:c,prev:a};a&&(a.next=p),a=p,s||(s=p),e.set(u,p)}},clear(){e.clear(),s=void 0,a=void 0}}}var es=4,Iv=5;function oS(t){const e=t.indexOf("{");if(e===-1)return null;const s=t.indexOf("}",e);return s===-1||e+1>=t.length?null:[e,s]}function Hf(t,e,s=new Uint16Array(6)){const a=t.indexOf("/",e),l=a===-1?t.length:a,u=t.substring(e,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=e,s[2]=e,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const d=t.length;return s[0]=2,s[1]=e,s[2]=e,s[3]=d,s[4]=d,s[5]=d,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=e,s[2]=e+1,s[3]=l,s[4]=l,s[5]=l,s;const c=oS(u);if(c){const[d,p]=c,g=u.charCodeAt(d+1);if(g===45){if(d+2<u.length&&u.charCodeAt(d+2)===36){const y=d+3,m=p;if(y<m)return s[0]=3,s[1]=e+d,s[2]=e+y,s[3]=e+m,s[4]=e+p+1,s[5]=l,s}}else if(g===36){const y=d+1,m=d+2;return m===p?(s[0]=2,s[1]=e+d,s[2]=e+y,s[3]=e+m,s[4]=e+p+1,s[5]=t.length,s):(s[0]=1,s[1]=e+d,s[2]=e+m,s[3]=e+p,s[4]=e+p+1,s[5]=l,s)}}return s[0]=0,s[1]=e,s[2]=e,s[3]=l,s[4]=l,s[5]=l,s}function vu(t,e,s,a,l,u,c){c?.(s);let d=a;{const p=s.fullPath??s.from,g=p.length,y=s.options?.caseSensitive??t,m=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<g;){const _=Hf(p,d,e);let S;const O=d,E=_[5];switch(d=E+1,u++,_[0]){case 0:{const A=p.substring(_[2],_[3]);if(y){const M=l.static?.get(A);if(M)S=M;else{l.static??=new Map;const j=Ls(s.fullPath??s.from);j.parent=l,j.depth=u,S=j,l.static.set(A,j)}}else{const M=A.toLowerCase(),j=l.staticInsensitive?.get(M);if(j)S=j;else{l.staticInsensitive??=new Map;const N=Ls(s.fullPath??s.from);N.parent=l,N.depth=u,S=N,l.staticInsensitive.set(M,N)}}break}case 1:{const A=p.substring(O,_[1]),M=p.substring(_[4],E),j=y&&!!(A||M),N=A?j?A:A.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,K=!m&&l.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===j&&I.prefix===N&&I.suffix===X);if(K)S=K;else{const I=Qh(1,s.fullPath??s.from,j,N,X);S=I,I.depth=u,I.parent=l,l.dynamic??=[],l.dynamic.push(I)}break}case 3:{const A=p.substring(O,_[1]),M=p.substring(_[4],E),j=y&&!!(A||M),N=A?j?A:A.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,K=!m&&l.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===j&&I.prefix===N&&I.suffix===X);if(K)S=K;else{const I=Qh(3,s.fullPath??s.from,j,N,X);S=I,I.parent=l,I.depth=u,l.optional??=[],l.optional.push(I)}break}case 2:{const A=p.substring(O,_[1]),M=p.substring(_[4],E),j=y&&!!(A||M),N=A?j?A:A.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,K=Qh(2,s.fullPath??s.from,j,N,X);S=K,K.parent=l,K.depth=u,l.wildcard??=[],l.wildcard.push(K)}}l=S}if(m&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=Ls(s.fullPath??s.from);_.kind=Iv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=Ls(s.fullPath??s.from);_.kind=es,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=m,l.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=s,l.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)vu(t,e,p,d,l,u,c)}function Yh(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function Qr(t){if(t.pathless)for(const e of t.pathless)Qr(e);if(t.static)for(const e of t.static.values())Qr(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())Qr(e);if(t.dynamic?.length){t.dynamic.sort(Yh);for(const e of t.dynamic)Qr(e)}if(t.optional?.length){t.optional.sort(Yh);for(const e of t.optional)Qr(e)}if(t.wildcard?.length){t.wildcard.sort(Yh);for(const e of t.wildcard)Qr(e)}}function Ls(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Qh(t,e,s,a,l){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:a,suffix:l}}function lS(t,e){const s=Ls("/"),a=new Uint16Array(6);for(const l of t)vu(!1,a,l,1,s,0);Qr(s),e.masksTree=s,e.flatCache=io(1e3)}function uS(t,e){t||="/";const s=e.flatCache.get(t);if(s)return s;const a=qf(t,e.masksTree);return e.flatCache.set(t,a),a}function cS(t,e,s,a,l){t||="/",a||="/";const u=e?`case\0${t}`:t;let c=l.singleCache.get(u);return c||(c=Ls("/"),vu(e,new Uint16Array(6),{from:t},1,c,0),l.singleCache.set(u,c)),qf(a,c,s)}function hS(t,e,s=!1){const a=s?t:`nofuzz\0${t}`,l=e.matchCache.get(a);if(l!==void 0)return l;t||="/";let u;
10try{u=qf(t,e.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=pS(u.route)),e.matchCache.set(a,u),u}function fS(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function dS(t,e=!1,s){const a=Ls(t.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return vu(e,l,t,1,a,0,p=>{if(s?.(p,d),p.id in u&&Xt(),u[p.id]=p,d!==0&&p.path){const g=fS(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}d++}),Qr(a),{processedTree:{segmentTree:a,singleCache:io(1e3),matchCache:io(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function qf(t,e,s=!1){const a=t.split("/"),l=mS(t,a,e,s);if(!l)return null;const[u]=Hv(t,a,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function Hv(t,e,s){const a=gS(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,d=s.extract?.node??0,p=s.extract?.path??0,g=s.extract?.segment??0;for(;d<a.length;c++,d++,p++,g++){const y=a[d];if(y.kind===es)break;if(y.kind===Iv){g--,c--,p--;continue}const m=e[c],b=p;if(m&&(p+=m.length),y.kind===1){l??=s.node.fullPath.split("/");const _=l[g],S=y.prefix?.length??0;if(_.charCodeAt(S)===123){const O=y.suffix?.length??0,E=_.substring(S+2,_.length-O-1),A=m.substring(S,m.length-O);u[E]=decodeURIComponent(A)}else{const O=_.substring(1);u[O]=decodeURIComponent(m)}}else if(y.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],S=y.prefix?.length??0,O=y.suffix?.length??0,E=_.substring(S+3,_.length-O-1),A=y.suffix||y.prefix?m.substring(S,m.length-O):m;A&&(u[E]=decodeURIComponent(A))}else if(y.kind===2){const _=y,S=t.substring(b+(_.prefix?.length??0),t.length-(_.suffix?.length??0)),O=decodeURIComponent(S);u["*"]=O,u._splat=O;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:g}]}function pS(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function gS(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function mS(t,e,s,a){if(t==="/"&&s.index)return{node:s.index,skipped:0};const l=!so(e),u=l&&t!=="/",c=e.length-(l?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;d.length;){const y=d.pop(),{node:m,index:b,skipped:_,depth:S,statics:O,dynamics:E,optionals:A}=y;let{extract:M,rawParams:j,parsedParams:N}=y;if(m.kind===2&&m.route&&!Ll(g,y))continue;if(m.skipOnParamError){if(!uy(t,e,y))continue;j=y.rawParams,M=y.extract,N=y.parsedParams}a&&m.route&&m.kind!==es&&Ll(p,y)&&(p=y);const X=b===c;if(X&&(m.route&&(!u||m.kind===es||m.kind===2)&&Ll(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const K=X?void 0:e[b];let I;if(X&&m.index){const F={node:m.index,index:b,skipped:_,depth:S+1,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N};let W=!0;if(m.index.skipOnParamError&&(uy(t,e,F)||(W=!1)),W){if(!E&&!A&&!_&&yS(O,c))return F;Ll(g,F)&&(g=F)}}if(m.wildcard)for(let F=m.wildcard.length-1;F>=0;F--){const W=m.wildcard[F],{prefix:le,suffix:ae}=W;if(!(le&&(X||!(W.caseSensitive?K:I??=K.toLowerCase()).startsWith(le)))){if(ae){if(X)continue;const me=e.slice(b).join("/").slice(-ae.length);if((W.caseSensitive?me:me.toLowerCase())!==ae)continue}d.push({node:W,index:c,skipped:_,depth:S+1,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}}if(m.optional){const F=_|1<<S,W=S+1;for(let le=m.optional.length-1;le>=0;le--){const ae=m.optional[le];d.push({node:ae,index:b,skipped:F,depth:W,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}if(!X)for(let le=m.optional.length-1;le>=0;le--){const ae=m.optional[le],{prefix:me,suffix:_e}=ae;if(me||_e){const qe=ae.caseSensitive?K:I??=K.toLowerCase();if(me&&!qe.startsWith(me)||_e&&!qe.endsWith(_e))continue}d.push({node:ae,index:b+1,skipped:_,depth:W,statics:O,dynamics:E,optionals:A+Ul(c,b),extract:M,rawParams:j,parsedParams:N})}}if(!X&&m.dynamic&&K)for(let F=m.dynamic.length-1;F>=0;F--){const W=m.dynamic[F],{prefix:le,suffix:ae}=W;if(le||ae){const me=W.caseSensitive?K:I??=K.toLowerCase();if(le&&!me.startsWith(le)||ae&&!me.endsWith(ae))continue}d.push({node:W,index:b+1,skipped:_,depth:S+1,statics:O,dynamics:E+Ul(c,b),optionals:A,extract:M,rawParams:j,parsedParams:N})}if(!X&&m.staticInsensitive){const F=m.staticInsensitive.get(I??=K.toLowerCase());F&&d.push({node:F,index:b+1,skipped:_,depth:S+1,statics:O+Ul(c,b),dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}if(!X&&m.static){const F=m.static.get(K);F&&d.push({node:F,index:b+1,skipped:_,depth:S+1,statics:O+Ul(c,b),dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}if(m.pathless){const F=S+1;for(let W=m.pathless.length-1;W>=0;W--){const le=m.pathless[W];d.push({node:le,index:b,skipped:_,depth:F,statics:O,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:N})}}}if(g)return g;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=e[b].length;const m=y===t.length?"/":t.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function Ul(t,e){return 2**(t-e-1)}function yS(t,e){return t===2**(e-1)-1}function uy(t,e,s){try{const[a,l]=Hv(t,e,s);s.rawParams=a,s.extract=l;const u=s.node.parse(a);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function Ll(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===es)>(t.node.kind===es)||e.node.kind===es==(t.node.kind===es)&&e.depth>t.depth))):!0}function Jl(t){return $f(t.filter(e=>e!==void 0).join("/"))}function $f(t){return t.replace(/\/{2,}/g,"/")}function qv(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function ns(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function $v(t){return ns(qv(t))}function ru(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function vS(t,e,s){return ru(t,s)===ru(e,s)}function bS({base:t,to:e,trailingSlash:s="never",cache:a}){const l=e.startsWith("/"),u=!l&&e===".";let c;if(a){c=l?e:u?t:t+"\0"+e;const m=a.get(c);if(m)return m}let d;if(u)d=t.split("/");else if(l)d=e.split("/");else{for(d=t.split("/");d.length>1&&so(d)==="";)d.pop();const m=e.split("/");for(let b=0,_=m.length;b<_;b++){const S=m[b];S===""?b?b===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(so(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,g="";for(let m=0;m<d.length;m++){m>0&&(g+="/");const b=d[m];if(!b)continue;p=Hf(b,0,p);const _=p[0];if(_===0){g+=b;continue}const S=p[5],O=b.substring(0,p[1]),E=b.substring(p[4],S),A=b.substring(p[2],p[3]);_===1?g+=O||E?`${O}{$${A}}${E}`:`$${A}`:_===2?g+=O||E?`${O}{$}${E}`:"$":g+=`${O}{-$${A}}${E}`}g=$f(g);const y=g||"/";return c&&a&&a.set(c,y),y}function _S(t){const e=new Map(t.map(l=>[encodeURIComponent(l),l])),s=Array.from(e.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(s,"g");return l=>l.replace(a,u=>e.get(u)??u)}function Jh(t,e,s){const a=e[t];return typeof a!="string"?a:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>hy(l,s)).join("/"):hy(a,s)}function cy({path:t,params:e,decoder:s,...a}){let l=!1;const u=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!t.includes("$"))return{interpolatedPath:t,usedParams:u,isMissingParams:l};const c=t.length;let d=0,p,g="";for(;d<c;){const y=d;p=Hf(t,y,p);const m=p[5];if(d=m+1,y===m)continue;const b=p[0];if(b===0){g+="/"+t.substring(y,m);continue}if(b===2){const _=e._splat;u._splat=_,u["*"]=_;const S=t.substring(y,p[1]),O=t.substring(p[4],m);
10if(!_){l=!0,(S||O)&&(g+="/"+S+O);continue}const E=Jh("_splat",e,s);g+="/"+S+E+O;continue}if(b===1){const _=t.substring(p[2],p[3]);!l&&!(_ in e)&&(l=!0),u[_]=e[_];const S=t.substring(y,p[1]),O=t.substring(p[4],m),E=Jh(_,e,s)??"undefined";g+="/"+S+E+O;continue}if(b===3){const _=t.substring(p[2],p[3]),S=e[_];if(S==null)continue;u[_]=S;const O=t.substring(y,p[1]),E=t.substring(p[4],m),A=Jh(_,e,s)??"";g+="/"+O+A+E;continue}}return t.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function hy(t,e){const s=encodeURIComponent(t);return e?.(s)??s}function vt(t){return t?.isNotFound===!0}function wS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var SS="tsr-scroll-restoration-v1_3";function ES(){const t=wS();if(!t)return null;let e={};try{const a=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");Qa(a)&&(e=a)}catch{}return{get state(){return e},set:a=>{e=Wr(a,e)||e},persist:()=>{try{t.setItem(SS,JSON.stringify(e))}catch{}}}}var fy=ES(),TS=t=>t.state.__TSR_key||t.href;function RS(t){const e=[];let s;for(;s=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,t)+1})`),t=s;return`${e.reverse().join(" > ")}`.toLowerCase()}var Pl=!1,Gi="window",dy="data-scroll-restoration-id";function AS(t,e){if(!fy)return;const s=fy;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!s)return;t.isScrollRestorationSetup=!0,Pl=!1;const a=t.options.getScrollRestorationKey||TS,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(Pl||!t.isScrollRestoring))if(d.target===document||d.target===window)l.set(Gi,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=d.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=d=>{if(!t.isScrollRestoring||!d||l.size===0||!s)return;const p=s.state[d]||={};for(const[g,y]of l){let m;if(g===Gi)m=Gi;else if(g.isConnected){const b=g.getAttribute(dy);m=b?`[${dy}="${b}"]`:RS(g)}m&&(p[m]=y)}};document.addEventListener("scroll",u,!0),t.subscribe("onBeforeLoad",d=>{c(d.fromLocation?a(d.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(a(t.stores.resolvedLocation.get()??t.stores.location.get())),s.persist()}),t.subscribe("onRendered",d=>{const p=a(d.toLocation),g=t.options.scrollRestorationBehavior,y=t.options.scrollToTopSelectors;if(l.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){Pl=!0;try{const m=t.isScrollRestoring?s.state[p]:void 0;let b=!1;if(m)for(const _ in m){const S=m[_];if(!Qa(S))continue;const{scrollX:O,scrollY:E}=S;if(!(!Number.isFinite(O)||!Number.isFinite(E))){if(_===Gi)window.scrollTo({top:E,left:O,behavior:g}),b=!0;else if(_){let A;try{A=document.querySelector(_)}catch{continue}A&&(A.scrollLeft=O,A.scrollTop=E,b=!0)}}}if(!b){const _=t.history.location.hash.slice(1);if(_){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const O=document.getElementById(_);O&&O.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:g};if(window.scrollTo(S),y)for(const O of y){if(O===Gi)continue;const E=typeof O=="function"?O():document.querySelector(O);E&&E.scrollTo(S)}}}}finally{Pl=!1}t.isScrollRestoring&&s.set(m=>(m[p]||={},m))}})}function Vv(t,e=String){const s=new URLSearchParams;for(const a in t){const l=t[a];l!==void 0&&s.set(a,e(l))}return s.toString()}function Xh(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function OS(t){const e=new URLSearchParams(t),s=Object.create(null);for(const[a,l]of e.entries()){const u=s[a];u==null?s[a]=Xh(l):Array.isArray(u)?u.push(Xh(l)):s[a]=[u,Xh(l)]}return s}var xS=kS(JSON.parse),CS=jS(JSON.stringify,JSON.parse);function kS(t){return e=>{e[0]==="?"&&(e=e.substring(1));const s=OS(e);for(const a in s){const l=s[a];if(typeof l=="string")try{s[a]=t(l)}catch{}}return s}}function jS(t,e){const s=typeof e=="function";function a(l){if(typeof l=="object"&&l!==null)try{return t(l)}catch{}else if(s&&typeof l=="string")try{return e(l),t(l)}catch{}return l}return l=>{const u=Vv(l,a);return u?`?${u}
10`:""}}var Is="__root__";function Vf(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:e});if(s.options=t,t.throw)throw s;return s}function Jt(t){return t instanceof Response&&!!t.options}function MS(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return Vf(t)}function DS(t){return{input:({url:e})=>{for(const s of t)e=vf(s,e);return e},output:({url:e})=>{for(let s=t.length-1;s>=0;s--)e=Gv(t[s],e);return e}}}function NS(t){const e=$v(t.basepath),s=`/${e}`,a=`${s}/`,l=t.caseSensitive?s:s.toLowerCase(),u=t.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const d=t.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===l?c.pathname="/":d.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Jl(["/",e,c.pathname]),c)}}function vf(t,e){const s=t?.input?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function Gv(t,e){const s=t?.output?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function US(t,e){const{createMutableStore:s,createReadonlyStore:a,batch:l,init:u}=e,c=new Map,d=new Map,p=new Map,g=s(t.status),y=s(t.loadedAt),m=s(t.isLoading),b=s(t.isTransitioning),_=s(t.location),S=s(t.resolvedLocation),O=s(t.statusCode),E=s(t.redirect),A=s([]),M=s([]),j=s([]),N=a(()=>Zh(c,A.get())),X=a(()=>Zh(d,M.get())),K=a(()=>Zh(p,j.get())),I=a(()=>A.get()[0]),F=a(()=>A.get().some(Y=>c.get(Y)?.get().status==="pending")),W=a(()=>({locationHref:_.get().href,resolvedLocationHref:S.get()?.href,status:g.get()})),le=a(()=>({status:g.get(),loadedAt:y.get(),isLoading:m.get(),isTransitioning:b.get(),matches:N.get(),location:_.get(),resolvedLocation:S.get(),statusCode:O.get(),redirect:E.get()})),ae=io(64);function me(Y){let se=ae.get(Y);return se||(se=a(()=>{const Se=A.get();for(const ye of Se){const C=c.get(ye);if(C&&C.routeId===Y)return C.get()}}),ae.set(Y,se)),se}const _e={status:g,loadedAt:y,isLoading:m,isTransitioning:b,location:_,resolvedLocation:S,statusCode:O,redirect:E,matchesId:A,pendingIds:M,cachedIds:j,matches:N,pendingMatches:X,cachedMatches:K,firstId:I,hasPending:F,matchRouteDeps:W,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:le,getRouteMatchStore:me,setMatches:qe,setPending:Me,setCached:L};qe(t.matches),u?.(_e);function qe(Y){Wh(Y,c,A,s,l)}function Me(Y){Wh(Y,d,M,s,l)}function L(Y){Wh(Y,p,j,s,l)}return _e}function Zh(t,e){const s=[];for(const a of e){const l=t.get(a);l&&s.push(l.get())}return s}function Wh(t,e,s,a,l){const u=t.map(d=>d.id),c=new Set(u);l(()=>{for(const d of e.keys())c.has(d)||e.delete(d);for(const d of t){const p=e.get(d.id);if(!p){const g=a(d);g.routeId=d.routeId,e.set(d.id,g);continue}p.routeId=d.routeId,p.get()!==d&&p.set(d)}iS(s.get(),u)||s.set(u)})}var bf=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},LS=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),bu=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Hs=(t,e,s=!0)=>{const a={...t.router.options.context??{}},l=s?e:e-1;for(let u=0;u<=l;u++){const c=t.matches[u];if(!c)continue;const d=t.router.getMatch(c.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},py=(t,e)=>{if(!t.matches.length)return;const s=e.routeId,a=t.matches.findIndex(c=>c.routeId===t.router.routeTree.id),l=a>=0?a:0;let u=s?t.matches.findIndex(c=>c.routeId===s):t.firstBadMatchIndex??t.matches.length-1;u<0&&(u=l);for(let c=u;c>=0;c--){const d=t.matches[c];if(t.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return s?u:l},ts=(t,e,s)=>{if(!(!Jt(s)&&!vt(s)))throw Jt(s)&&s.redirectHandled&&!s.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=s,t.updateMatch(e.id,a=>({...a,status:Jt(s)?"redirected":vt(s)?"notFound":a.status==="pending"?"success":a.status,context:Hs(t,e.index),isFetching:!1,error:s})),vt(s)&&!s.routeId&&(s.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Jt(s)&&(t.rendered=!0,s.options._fromLocation=t.location,s.redirectHandled=!0,s=t.router.resolveRedirect(s))),s},Kv=(t,e)=>{const s=t.router.getMatch(e);return!!(!s||s._nonReactive.dehydrated)},gy=(t,e,s)=>{const a=Hs(t,s);t.updateMatch(e,l=>({...l,context:a}))},Ki=(t,e,s,a)=>{const{id:l,routeId:u}=t.matches[e],c=t.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=a,t.firstBadMatchIndex??=e,ts(t,t.router.getMatch(l),s);try{c.options.onError?.(s)}catch(d){s=d,ts(t,t.router.getMatch(l),s)}t.updateMatch(l,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Jt(s)&&!vt(s)&&(t.serialError??=s)},Fv=(t,e,s,a)=>
10{if(a._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!bu(t,e)&&(s.options.loader||s.options.beforeLoad||Qv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??t.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{bf(t)},l);a._nonReactive.pendingTimeout=u}},PS=(t,e,s)=>{const a=t.router.getMatch(e);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Fv(t,e,s,a);const l=()=>{const u=t.router.getMatch(e);u.preload&&(u.status==="redirected"||u.status==="notFound")&&ts(t,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},zS=(t,e,s,a)=>{const l=t.router.getMatch(e);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=qs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&Ki(t,s,c,"PARSE_PARAMS"),d&&Ki(t,s,d,"VALIDATE_SEARCH"),Fv(t,e,a,l);const p=new AbortController;let g=!1;const y=()=>{g||(g=!0,t.updateMatch(e,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:p})))},m=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,N=>({...N,isFetching:!1}))};if(!a.options.beforeLoad){t.router.batch(()=>{y(),m()});return}l._nonReactive.beforeLoadPromise=qs();const b={...Hs(t,s,!1),...l.__routeContext},{search:_,params:S,cause:O}=l,E=bu(t,e),A={search:_,abortController:p,params:S,preload:E,context:b,location:t.location,navigate:N=>t.router.navigate({...N,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:E?"preload":O,matches:t.matches,routeId:a.id,...t.router.options.additionalContext},M=N=>{if(N===void 0){t.router.batch(()=>{y(),m()});return}(Jt(N)||vt(N))&&(y(),Ki(t,s,N,"BEFORE_LOAD")),t.router.batch(()=>{y(),t.updateMatch(e,X=>({...X,__beforeLoadContext:N})),m()})};let j;try{if(j=a.options.beforeLoad(A),ao(j))return y(),j.catch(N=>{Ki(t,s,N,"BEFORE_LOAD")}).then(M)}catch(N){y(),Ki(t,s,N,"BEFORE_LOAD")}M(j)},BS=(t,e)=>{const{id:s,routeId:a}=t.matches[e],l=t.router.looseRoutesById[a],u=()=>d(),c=()=>zS(t,s,e,l),d=()=>{if(Kv(t,s))return;const p=PS(t,s,l);return ao(p)?p.then(c):c()};return u()},IS=(t,e,s)=>{const a=t.router.getMatch(e);if(!a||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:t.router.options.ssr,matches:t.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,d])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:d,scripts:c,styles:u?.styles}))},Yv=(t,e,s,a,l)=>{const u=e[a-1],{params:c,loaderDeps:d,abortController:p,cause:g}=t.router.getMatch(s),y=Hs(t,a),m=bu(t,s);return{params:c,deps:d,preload:!!m,parentMatchPromise:u,abortController:p,context:y,location:t.location,navigate:b=>t.router.navigate({...b,_fromLocation:t.location}),cause:m?"preload":g,route:l,...t.router.options.additionalContext}},my=async(t,e,s,a,l)=>{try{const u=t.router.getMatch(s);try{(!(Bv??t.router.isServer)||u.ssr===!0)&&oo(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(Yv(t,e,s,a,l)),g=!!d&&ao(p);if((g||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&t.updateMatch(s,m=>({...m,isFetching:"loader"})),d){const m=g?await p:p;ts(t,t.router.getMatch(s),m),m!==void 0&&t.updateMatch(s,b=>({...b,loaderData:m}))}l._lazyPromise&&await l._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,l._componentsPromise&&await l._componentsPromise,t.updateMatch(s,m=>({...m,error:void 0,context:Hs(t,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}t.updateMatch(s,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:Hs(t,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,vt(c)&&await l.options.notFoundComponent?.preload?.(),ts(t,t.router.getMatch(s),c);try{l.options.onError?.(c)}catch(g){d=g,ts(t,t.router.getMatch(s),g)}!Jt(d)&&!vt(d)&&await oo(l,["errorComponent"]),t.updateMatch(s,g=>
10({...g,error:d,context:Hs(t,a),status:"error",isFetching:!1}))}}catch(u){const c=t.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),ts(t,c,u)}},HS=async(t,e,s)=>{async function a(_,S,O,E,A){const M=Date.now()-S.updatedAt,j=_?A.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??t.router.options.defaultStaleTime??0,N=A.options.shouldReload,X=typeof N=="function"?N(Yv(t,e,l,s,A)):N,{status:K,invalid:I}=E,F=M>=j&&(!!t.forceStaleReload||E.cause==="enter"||O!==void 0&&O!==E.id);c=K==="success"&&(I||(X??F)),_&&A.options.preload===!1||(c&&!t.sync&&y?(d=!0,(async()=>{try{await my(t,e,l,s,A);const W=t.router.getMatch(l);W._nonReactive.loaderPromise?.resolve(),W._nonReactive.loadPromise?.resolve(),W._nonReactive.loaderPromise=void 0,W._nonReactive.loadPromise=void 0}catch(W){Jt(W)&&await t.router.navigate(W.options)}})()):K!=="success"||c?await my(t,e,l,s,A):gy(t,l,s))}const{id:l,routeId:u}=t.matches[s];let c=!1,d=!1;const p=t.router.looseRoutesById[u],g=p.options.loader,y=((typeof g=="function"?void 0:g?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Kv(t,l)){if(!t.router.getMatch(l))return t.matches[s];gy(t,l,s)}else{const _=t.router.getMatch(l),S=t.router.stores.matchesId.get()[s],O=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===u?S:t.router.stores.matches.get().find(A=>A.routeId===u)?.id,E=bu(t,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!t.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const A=t.router.getMatch(l),M=A._nonReactive.error||A.error;M&&ts(t,A,M),A.status==="pending"&&await a(E,_,O,A,p)}else{const A=E&&!t.router.stores.matchStores.has(l),M=t.router.getMatch(l);M._nonReactive.loaderPromise=qs(),A!==M.preload&&t.updateMatch(l,j=>({...j,preload:A})),await a(E,_,O,M,p)}}const m=t.router.getMatch(l);d||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,d||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const b=d?m.isFetching:!1;return b!==m.isFetching||m.invalid!==!1?(t.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),t.router.getMatch(l)):m};async function yy(t){const e=t,s=[];LS(e.router)&&bf(e);let a;for(let b=0;b<e.matches.length;b++){try{const _=BS(e,b);ao(_)&&await _}catch(_){if(Jt(_))throw _;if(vt(_))a=_;else if(!e.preload)throw _;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const l=e.firstBadMatchIndex??e.matches.length,u=a&&!e.preload?py(e,a):void 0,c=a&&e.preload?0:u!==void 0?Math.min(u+1,l):l;let d,p;for(let b=0;b<c;b++)s.push(HS(e,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const S=_.reason;if(Jt(S))throw S;vt(S)?d??=S:p??=S}if(p!==void 0)throw p}const g=d??(a&&!e.preload?a:void 0);let y=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!g&&a&&e.preload)return e.matches;if(g){const b=py(e,g);b===void 0&&Xt();const _=e.matches[b],S=e.router.looseRoutesById[_.routeId],O=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&O&&(S.options.notFoundComponent=O),g.routeId=_.routeId;const E=_.routeId===e.router.routeTree.id;e.updateMatch(_.id,A=>({...A,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),y=b,await oo(S,["notFoundComponent"])}else if(!e.preload){const b=e.matches[0];b.globalNotFound||e.router.getMatch(b.id)?.globalNotFound&&e.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const b=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await oo(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:S}=e.matches[b],O=e.router.looseRoutesById[S];try{const E=IS(e,_,O);if(E){const A=await E;e.updateMatch(_,M=>({...M,...A}))}}catch(E){console.error(`Error executing head for route ${S}:`,E)}}const m=bf(e);if(ao(m)&&await m,g)throw g;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function vy(t,e){const s=e.map(a=>
10t.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function oo(t,e=Xl){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(a=>{const{id:l,...u}=a.options;Object.assign(t.options,u),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const s=()=>t._componentsLoaded?void 0:e===Xl?(()=>{if(t._componentsPromise===void 0){const a=vy(t,Xl);a?t._componentsPromise=a.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():vy(t,e);return t._lazyPromise?t._lazyPromise.then(s):s()}function Qv(t){for(const e of Xl)if(t.options[e]?.preload)return!0;return!1}var Xl=["component","errorComponent","pendingComponent","notFoundComponent"],rs="__TSR_index",by="popstate",_y="beforeunload";function qS(t){let e=t.getLocation();const s=new Set,a=c=>{e=t.getLocation(),s.forEach(d=>d({location:e,action:c}))},l=c=>{t.notifyOnIndexChange??!0?a(c):e=t.getLocation()},u=async({task:c,navigateOpts:d,...p})=>{if(d?.ignoreBlocker??!1){c();return}const g=t.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const m of g){const b=su(p.path,p.state);if(await m.blockerFn({currentLocation:e,nextLocation:b,action:p.type})){t.onBlocked?.();return}}c()};return{get location(){return e},get length(){return t.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,d,p)=>{const g=e.state[rs];d=wy(g+1,d),u({task:()=>{t.pushState(c,d),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:d})},replace:(c,d,p)=>{const g=e.state[rs];d=wy(g,d),u({task:()=>{t.replaceState(c,d),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:d})},go:(c,d)=>{u({task:()=>{t.go(c),l({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{u({task:()=>{t.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{t.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>e.state[rs]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const d=t.getBlockers?.()??[];return t.setBlockers([...d,c]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:a}}function wy(t,e){e||(e={});const s=Gf();return{...e,key:s,__TSR_key:s,[rs]:t}}function $S(t){const e=typeof document<"u"?window:void 0,s=e.history.pushState,a=e.history.replaceState;let l=[];const u=()=>l,c=F=>l=F,d=(F=>F),p=(()=>su(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const F=Gf();e.history.replaceState({[rs]:0,key:F,__TSR_key:F},"")}let g=p(),y,m=!1,b=!1,_=!1,S=!1;const O=()=>g;let E,A;const M=()=>{E&&(I._ignoreSubscribers=!0,(E.isPush?e.history.pushState:e.history.replaceState)(E.state,"",E.href),I._ignoreSubscribers=!1,E=void 0,A=void 0,y=void 0)},j=(F,W,le)=>{const ae=d(W);A||(y=g),g=su(W,le),E={href:ae,state:le,isPush:E?.isPush||F==="push"},A||(A=Promise.resolve().then(()=>M()))},N=F=>{g=p(),I.notify({type:F})},X=async()=>{if(b){b=!1;return}const F=p(),W=F.state[rs]-g.state[rs],le=W===1,ae=W===-1,me=!le&&!ae||m;m=!1;const _e=me?"GO":ae?"BACK":"FORWARD",qe=me?{type:"GO",index:W}:{type:ae?"BACK":"FORWARD"};if(_)_=!1;else{const Me=u();if(typeof document<"u"&&Me.length){for(const L of Me)if(await L.blockerFn({currentLocation:g,nextLocation:F,action:_e})){b=!0,e.history.go(1),I.notify(qe);return}}}g=p(),I.notify(qe)},K=F=>{if(S){S=!1;return}let W=!1;const le=u();if(typeof document<"u"&&le.length)for(const ae of le){const me=ae.enableBeforeUnload??!0;if(me===!0){W=!0;break}if(typeof me=="function"&&me()===!0){W=!0;break}}if(W)return F.preventDefault(),F.returnValue=""},I=qS({getLocation:O,getLength:()=>e.history.length,pushState:(F,W)=>j("push",F,W),replaceState:(F,W)=>j("replace",F,W),back:F=>(F&&(_=!0),S=!0,e.history.back()),forward:F=>{F&&(_=!0),S=!0,e.history.forward()},go:F=>{m=!0,e.history.go(F)},createHref:F=>d(F),flush:M,destroy:()=>{e.history.pushState=s,e.history.replaceState=a,e.removeEventListener(_y,K,{capture:!0}),e.removeEventListener(by,X)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return e.addEventListener(_y,K,{capture:!0}),e.addEventListener(by,X),e.history.pushState=function(...F){const W=s.apply(e.history,F);return I._ignoreSubscribers||N("PUSH"),W},e.history.replaceState=function(...F){const W=a.apply(e.history,F);return I._ignoreSubscribers||N("REPLACE"),W},I}function VS(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function su(t,e){const s=VS(t),a=s.indexOf("#"),l=s.indexOf("?"),u=Gf();return{href:s,pathname:s.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:s.length),hash:a>-1?s.substring(a):"",search:l>-1?s.slice(l,a===-1?void 0:a):"",state:e||{[rs]:0,key:u,__TSR_key:u}}}function Gf(){return(Math.random()+1).toString(36).substring(7)}function GS(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function Ga(t,e){const s=e,a=t;return{fromLocation:s,toLocation:a,pathChanged:s?.pathname!==a.pathname,hrefChanged:s?.href!==a.href,hashChanged:s?.hash!==a.hash}}var KS=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{const a=this.options,l=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=_S(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=$S()),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=io(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=US(YS(this.latestLocation),y),AS(this)}let d=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const y=[],m=$v(p);m&&m!=="/"&&y.push(NS({basepath:p})),g&&y.push(g),this.rewrite=y.length===0?void 0:y.length===1?y[0]:DS(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=dS(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&lS(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,a)=>{const l={eventType:s,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>
10{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const l=({pathname:p,search:g,hash:y,href:m,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(g),M=this.options.stringifySearch(A);return{href:p+M+y,publicHref:p+M+y,pathname:Vi(p).path,external:!1,searchStr:M,search:Ms(a?.search,A),hash:Vi(y.slice(1)).path,state:Us(a?.state,b)}}const _=new URL(m,this.origin),S=vf(this.rewrite,_),O=this.options.parseSearch(S.search),E=this.options.stringifySearch(O);return S.search=E,{href:S.href.replace(S.origin,""),publicHref:m,pathname:Vi(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:E,search:Ms(a?.search,O),hash:Vi(S.hash.slice(1)).path,state:Us(a?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:d}=u.state;if(c&&(!d||d===this.tempLocationKey)){const p=l(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(s,a)=>bS({base:s,to:$f(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,a,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:a},l):this.matchRoutesInternal(s,a),this.getMatchedRoutes=s=>QS({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const a=this.stores.matchStores.get(s)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??d.fullPath,g=this.resolvePathWithBase(p,"."),y=d.search,m=Object.assign(Object.create(null),d.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?m:Object.assign(m,Wr(u.params,m)),S=this.getMatchedRoutes(b);let O=S.matchedRoutes;if((!S.foundRoute||S.foundRoute.path!=="/"&&S.routeParams["**"])&&this.options.notFoundRoute&&(O=[...O,this.options.notFoundRoute]),Object.keys(_).length>0)for(const le of O){const ae=le.options.params?.stringify??le.options.stringifyParams;if(ae)try{Object.assign(_,ae(_))}catch{}}const E=s.leaveParams?b:Vi(cy({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(s._includeValidateSearch&&this.options.search?.strict){const le={};O.forEach(ae=>{if(ae.options.validateSearch)try{Object.assign(le,Zl(ae.options.validateSearch,{...le,...A}))}catch{}}),A=le}A=JS({search:A,dest:u,destRoutes:O,_includeValidateSearch:s._includeValidateSearch}),A=Ms(y,A);const M=this.options.stringifySearch(A),j=u.hash===!0?c.hash:u.hash?Wr(u.hash,c.hash):void 0,N=j?`#${j}`:"";let X=u.state===!0?c.state:u.state?Wr(u.state,c.state):{};X=Us(c.state,X);const K=`${E}${M}${N}`;let I,F,W=!1;if(this.rewrite){const le=new URL(K,this.origin),ae=Gv(this.rewrite,le);I=le.href.replace(le.origin,""),ae.origin!==this.origin?(F=ae.href,W=!0):F=ae.pathname+ae.search+ae.hash}else I=aS(K),F=I;return{publicHref:F,href:I,pathname:E,search:A,searchStr:M,state:X,hash:j??"",external:W,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const d=a(u);let p=c?a(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const y=uS(d.pathname,this.processedTree);if(y){Object.assign(g,y.rawParams);const{from:m,params:b,..._}=y.route,S=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Wr(b,g));c={from:s.from,..._,params:S},p=a(c)}}}return p&&(d.maskedLocation=p),d};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:a,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{l.state[y]=this.latestLocation.state[y]});const g=Qt(l.state,this.latestLocation.state);return p.forEach(y=>{delete l.state[y]}),g},c=ns(this.latestLocation.href)===ns(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=qs(()=>{d?.resolve(),d=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...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=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,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:s,resetScroll:a,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:d,...p}={})=>
10{if(d){const m=this.history.location.state.__TSR_index,b=su(d,{__TSR_index:s?m:m+1}),_=new URL(b.pathname,this.origin);p.to=vf(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const g=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=g;const y=this.commitLocation({...g,viewTransition:u,replace:s,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:s,reloadDocument:a,href:l,publicHref:u,...c})=>{let d=!1;if(l)try{new URL(`${l}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(s!==void 0||!l){const g=this.buildLocation({to:s,...c});l=l??g.publicHref,u=u??g.publicHref}const p=!d&&u?u:l;if(nu(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const y of g)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:l,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(l=>!s.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(a)})},this.load=async s=>{let a,l,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,y=Ga(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await yy({router:this,sync:s?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,b=null,_=null,S=null;this.batch(()=>{const O=this.stores.pendingMatches.get(),E=O.length,A=this.stores.matches.get();m=E?A.filter(N=>!this.stores.pendingMatchStores.has(N.id)):null;const M=new Set;for(const N of this.stores.pendingMatchStores.values())N.routeId&&M.add(N.routeId);const j=new Set;for(const N of this.stores.matchStores.values())N.routeId&&j.add(N.routeId);b=E?A.filter(N=>!M.has(N.routeId)):null,_=E?O.filter(N=>!j.has(N.routeId)):null,S=E?O.filter(N=>j.has(N.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(O),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(N=>N.status!=="error"&&N.status!=="notFound"&&N.status!=="redirected")]),this.clearExpiredCache())});for(const[O,E]of[[b,"onLeave"],[_,"onEnter"],[S,"onStay"]])if(O)for(const A of O)this.looseRoutesById[A.routeId].options[E]?.(A)})})}})}catch(g){Jt(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):vt(g)&&(l=g);const y=a?a.status:l?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(p=>p.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=s=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof a.types=="function"?a.types(Ga(u,c)):a.types;if(d===!1){s();return}l={update:s,types:d}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,a)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(a);return}const u=this.stores.matchStores.get(s);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(s);if(c){const d=a(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==s)):c.set(d)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const a=l=>s?.filter?.(l)??!0?{...l,invalid:!0,...s?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const a=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const l=s.options._builtLocation??this.buildLocation(s.options),u=this.getParsedLocationHref(l);s.options.href=u,s.headers.set("Location",u)}else if(a)try{const l=new URL(a);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;s.options.href=u,s.headers.set("Location",u)}}catch{}if(s.options.href&&!s.options._builtLocation&&nu(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const a=s?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!a(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),a=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const c=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:s-l.updatedAt>=c};this.clearCache({filter:a})},this.loadRouteChunk=oo,this.preloadRoute=async s=>{const a=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:s});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),d=l.filter(p=>!c.has(p.id));if(d.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...d])}try{return l=await yy({router:this,matches:l,location:a,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(y=>y.id===p?g(y):y):this.updateMatch(p,g)}}),l}catch(p){if(Jt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});vt(p)||console.error(p);return}},this.matchRoute=(s,a)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const c=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=cS(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!Qt(d.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?Qt(c.search,u.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??CS,parseSearch:t.parseSearch??xS,protocolAllowlist:t.protocolAllowlist??tS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:s}){this.routesById=t,this.routesByPath=e,this.processedTree=s;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const s=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParam
10s:l,parsedParams:u}=s;let{matchedRoutes:c}=s,d=!1;(a?a.path!=="/"&&l["**"]:ns(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const p=d?ZS(this.options.notFoundMode,c):void 0,g=new Array(c.length),y=new Map;for(const m of this.stores.matchStores.values())m.routeId&&y.set(m.routeId,m.get());for(let m=0;m<c.length;m++){const b=c[m],_=g[m-1];let S,O,E;{const _e=_?.search??t.search,qe=_?._strictSearch??void 0;try{const Me=Zl(b.options.validateSearch,{..._e})??void 0;S={..._e,...Me},O={...qe,...Me},E=void 0}catch(Me){let L=Me;if(Me instanceof au||(L=new au(Me.message,{cause:Me})),e?.throwOnError)throw L;S=_e,O={},E=L}}const A=b.options.loaderDeps?.({search:S})??"",M=A?JSON.stringify(A):"",{interpolatedPath:j,usedParams:N}=cy({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),X=b.id+j+M,K=this.getMatch(X),I=y.get(b.id),F=K?._strictParams??N;let W;if(!K)try{Sy(b,N,u,F)}catch(_e){if(vt(_e)||Jt(_e)?W=_e:W=new FS(_e.message,{cause:_e}),e?.throwOnError)throw W}Object.assign(l,F);const le=I?"stay":"enter";let ae;if(K)ae={...K,cause:le,params:I?.params??l,_strictParams:F,search:Ms(I?I.search:K.search,S),_strictSearch:O};else{const _e=b.options.loader||b.options.beforeLoad||b.lazyFn||Qv(b)?"pending":"success";ae={id:X,ssr:b.options.ssr,index:m,routeId:b.id,params:I?.params??l,_strictParams:F,pathname:j,updatedAt:Date.now(),search:I?Ms(I.search,S):S,_strictSearch:O,searchError:void 0,status:_e,isFetching:!1,error:void 0,paramsError:W,__routeContext:void 0,_nonReactive:{loadPromise:qs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:I?Us(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}}e?.preload||(ae.globalNotFound=p===b.id),ae.searchError=E;const me=this.getParentContext(_);ae.context={...me,...ae.__routeContext,...ae.__beforeLoadContext},g[m]=ae}for(let m=0;m<g.length;m++){const b=g[m],_=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),O=y.get(b.routeId);if(b.params=O?Ms(O.params,l):l,!S){const E=g[m-1],A=this.getParentContext(E);if(_.options.context){const M={deps:b.loaderDeps,params:b.params,context:A??{},location:t,navigate:j=>this.navigate({...j,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(M)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:s,parsedParams:a}=this.getMatchedRoutes(t.pathname),l=so(e),u={...t.search};for(const y of e)try{Object.assign(u,Zl(y.options.validateSearch,u))}catch{}const c=so(this.stores.matchesId.get()),d=c&&this.stores.matchStores.get(c)?.get(),p=d&&d.routeId===l.id&&d.pathname===t.pathname;let g;if(p)g=d.params;else{const y=Object.assign(Object.create(null),s);for(const m of e)try{Sy(m,s,a??{},y)}catch{}g=y}return{matchedRoutes:e,fullPath:l.fullPath,search:u,params:g}}},au=class extends Error{},FS=class extends Error{};function YS(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Zl(t,e){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(e);if(s instanceof Promise)throw new au("Async validation not supported");if(s.issues)throw new au(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function QS({pathname:t,routesById:e,processedTree:s}){const a=Object.create(null),l=ns(t);let u,c;const d=hS(l,s,!0);return d&&(u=d.route,Object.assign(a,d.rawParams),c=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[e.__root__],routeParams:a,foundRoute:u,parsedParams:c}}function JS({search:t,dest:e,destRoutes:s,_includeValidateSearch:a}){return XS(s)(t,e,a??!1)}function XS(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of t){if("search"in l.options)l.options.search?.middlewares&&e.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:d})=>{let p=c;
10"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,m)=>m(y),c));const g=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,m)=>m(y),g):g};e.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:d})=>{const p=d(c);if(!e._includeValidateSearch)return p;try{return{...p,...Zl(l.options.validateSearch,p)??void 0}}catch{return p}};e.middlewares.push(u)}}const s=({search:l})=>{const u=e.dest;return u.search?u.search===!0?l:Wr(u.search,l):{}};e.middlewares.push(s);const a=(l,u,c)=>{if(l>=c.length)return u;const d=c[l];return d({search:u,next:g=>a(l+1,g,c)})};return function(u,c,d){return e.dest=c,e._includeValidateSearch=d,a(0,u,e.middlewares)}}function ZS(t,e){if(t!=="root")for(let s=e.length-1;s>=0;s--){const a=e[s];if(a.children)return a.id}return Is}function Sy(t,e,s,a){const l=t.options.params?.parse??t.options.parseParams;if(l)if(t.options.skipRouteOnParseError)for(const u in e)u in s&&(a[u]=s[u]);else{const u=l(a);Object.assign(a,u)}}var Vn=Symbol.for("TSR_DEFERRED_PROMISE");function WS(t,e){const s=t;return s[Vn]||(s[Vn]={status:"pending"},s.then(a=>{s[Vn].status="success",s[Vn].data=a}).catch(a=>{s[Vn].status="error",s[Vn].error={data:GS(a),__isServerError:!0}})),s}var eE="Error preloading route! âï¸";function Ey(t,e){if(t)return typeof t=="string"?t:t[e]}function tE(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function nE(t){if(t.tag!=="link")return;const e=t.attrs?.rel,s=t.attrs?.href;if(typeof s=="string"&&(typeof e=="string"?e.split(/\s+/):[]).includes("stylesheet"))return s}function rE(t,e){const s=nE(e);return!!s&&t?.inlineCss?.styles[s]!==void 0}var Jv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Is:this.parentRoute||Xt();let l=a?Is:s?.path;l&&l!=="/"&&(l=qv(l));const u=s?.id||l;let c=a?Is:Jl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=Jl(["/",c]));const d=c==="__root__"?"/":Jl([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=d,this._to=ns(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Vf({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},sE=class extends Jv{constructor(t){super(t)}};function aE(t){if(typeof document<"u"&&document.querySelector){const e=t.stores.location.get(),s=e.state.__hashScrollIntoViewOptions??!0;if(s&&e.hash!==""){const a=document.getElementById(e.hash);a&&a.scrollIntoView(s)}}}var iE=(t=>(t[t.AggregateError=1]="AggregateError",t[t.ArrowFunction=2]="ArrowFunction",t[t.ErrorPrototypeStack=4]="ErrorPrototypeStack",t[t.ObjectAssign=8]="ObjectAssign",t[t.BigIntTypedArray=16]="BigIntTypedArray",t[t.RegExp=32]="RegExp",t))(iE||{}),br=Symbol.asyncIterator,Xv=Symbol.hasInstance,Ka=Symbol.isConcatSpreadable,_r=Symbol.iterator,Zv=Symbol.match,Wv=Symbol.matchAll,e0=Symbol.replace,t0=Symbol.search,n0=Symbol.species,r0=Symbol.split,s0=Symbol.toPrimitive,Fa=Symbol.toStringTag,a0=Symbol.unscopables,i0={[br]:0,[Xv]:1,[Ka]:2,[_r]:3,[Zv]:4,[Wv]:5,[e0]:6,[t0]:7,[n0]:8,[r0]:9,[s0]:10,[Fa]:11,[a0]:12},oE={0:br,1:Xv,2:Ka,3:_r,4:Zv,5:Wv,6:e0,7:t0,8:n0,9:r0,10:s0,11:Fa,12:a0},R=void 0,lE={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},uE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},cE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function je(t,e,s,a,l,u,c,d,p,g,y,m){return{t,i:e,s,c:a,m:l,p:u,e:c,a:d,f:p,b:g,o:y,l:m}}function ss(t){return je(2,R,t,R,R,R,R,R,R,R,R,R)}var o0=ss(2),l0=ss(3),hE=ss(1),fE=ss(0),dE=ss(4),pE=ss(5),gE=ss(6),mE=ss(7);function yE(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return R}}function as(t){let e="",s=0,a;for(let l=0,u=t.length;l<u;l++)a=yE(t[l]),a&&(e+=t.slice(s,l)+a,s=l+1);return s===0?e=t:e+=t.slice(s),e}function vE(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function is(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,vE)}var zl="__SEROVAL_REFS__",u0=new Map,$a=new Map;function c0(t){return u0.has(t)}function bE(t){return $a.has(t)}function _E(t){if(c0(t))return u0.get(t);throw new XE(t)}function wE(t){if(bE(t))return $a.get(t);throw new ZE(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,zl,{value:$a,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,zl,{value:$a,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,zl,{value:$a,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,zl,{value:$a,configurable:!0,writable:!1,enumerable:!1});function Kf(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function SE(t){let e=uE[Kf(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function h0(t,e){let s=SE(t),a=Object.getOwnPropertyNames(t);for(let l=0,u=a.length,c;
12l<u;l++)c=a[l],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(s=s||{},s[c]=t[c]):(s=s||{},s[c]=t[c]));return s}function f0(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function EE(t){switch(t){case Number.POSITIVE_INFINITY:return pE;case Number.NEGATIVE_INFINITY:return gE}return t!==t?mE:Object.is(t,-0)?dE:je(0,R,t,R,R,R,R,R,R,R,R,R)}function d0(t){return je(1,R,as(t),R,R,R,R,R,R,R,R,R)}function TE(t){return je(3,R,""+t,R,R,R,R,R,R,R,R,R)}function RE(t){return je(4,t,R,R,R,R,R,R,R,R,R,R)}function AE(t,e){let s=e.valueOf();return je(5,t,s!==s?"":e.toISOString(),R,R,R,R,R,R,R,R,R)}function OE(t,e){return je(6,t,R,as(e.source),e.flags,R,R,R,R,R,R,R)}function xE(t,e){return je(17,t,i0[e],R,R,R,R,R,R,R,R,R)}function CE(t,e){return je(18,t,as(_E(e)),R,R,R,R,R,R,R,R,R)}function kE(t,e,s){return je(25,t,s,as(e),R,R,R,R,R,R,R,R)}function jE(t,e,s){return je(9,t,R,R,R,R,R,s,R,R,f0(e),R)}function ME(t,e){return je(21,t,R,R,R,R,R,R,e,R,R,R)}function DE(t,e,s){return je(15,t,R,e.constructor.name,R,R,R,R,s,e.byteOffset,R,e.length)}function NE(t,e,s){return je(16,t,R,e.constructor.name,R,R,R,R,s,e.byteOffset,R,e.byteLength)}function UE(t,e,s){return je(20,t,R,R,R,R,R,R,s,e.byteOffset,R,e.byteLength)}function LE(t,e,s){return je(13,t,Kf(e),R,as(e.message),s,R,R,R,R,R,R)}function PE(t,e,s){return je(14,t,Kf(e),R,as(e.message),s,R,R,R,R,R,R)}function zE(t,e){return je(7,t,R,R,R,R,R,e,R,R,R,R)}function BE(t,e){return je(28,R,R,R,R,R,R,[t,e],R,R,R,R)}function IE(t,e){return je(30,R,R,R,R,R,R,[t,e],R,R,R,R)}function HE(t,e,s){return je(31,t,R,R,R,R,R,s,e,R,R,R)}function qE(t,e){return je(32,t,R,R,R,R,R,R,e,R,R,R)}function $E(t,e){return je(33,t,R,R,R,R,R,R,e,R,R,R)}function VE(t,e){return je(34,t,R,R,R,R,R,R,e,R,R,R)}function GE(t,e,s,a){return je(35,t,s,R,R,R,R,e,R,R,R,a)}var KE={parsing:1,serialization:2,deserialization:3};function FE(t){return`Seroval Error (step: ${KE[t]})`}var YE=(t,e)=>FE(t),p0=class extends Error{constructor(t,e){super(YE(t)),this.cause=e}},Ty=class extends p0{constructor(t){super("parsing",t)}},QE=class extends p0{constructor(t){super("deserialization",t)}};function wr(t){return`Seroval Error (specific: ${t})`}var _u=class extends Error{constructor(e){super(wr(1)),this.value=e}},g0=class extends Error{constructor(e){super(wr(2))}},JE=class extends Error{constructor(t){super(wr(3))}},_o=class extends Error{constructor(t){super(wr(4))}},XE=class extends Error{constructor(t){super(wr(5)),this.value=t}},ZE=class extends Error{constructor(t){super(wr(6))}},WE=class extends Error{constructor(t){super(wr(7))}},os=class extends Error{constructor(t){super(wr(8))}},eT=class extends Error{constructor(e){super(wr(9))}},tT=class{constructor(t,e){this.value=t,this.replacement=e}},wu=()=>{let t={p:0,s:0,f:0};return t.p=new Promise((e,s)=>{t.s=e,t.f=s}),t},nT=(t,e)=>{t.s(e),t.p.s=1,t.p.v=e},rT=(t,e)=>{t.f(e),t.p.s=2,t.p.v=e};wu.toString();nT.toString();rT.toString();var sT=()=>{let t=[],e=[],s=!0,a=!1,l=0,u=(p,g,y)=>{for(y=0;y<l;y++)e[y]&&e[y][g](p)},c=(p,g,y,m)=>{for(g=0,y=t.length;g<y;g++)m=t[g],!s&&g===y-1?p[a?"return":"throw"](m):p.next(m)},d=(p,g)=>(s&&(g=l++,e[g]=p),c(p),()=>{s&&(e[g]=e[l],e[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>d(p),next:p=>{s&&(t.push(p),u(p,"next"))},throw:p=>{s&&(t.push(p),u(p,"throw"),s=!1,a=!1,e.length=0)},return:p=>{s&&(t.push(p),u(p,"return"),s=!1,a=!0,e.length=0)}}},aT=t=>e=>()=>{let s=0,a={[t]:()=>a,next:()=>{if(s>e.d)return{done:!0,value:void 0};let l=s++,u=e.v[l];if(l===e.t)throw u;return{done:l===e.d,value:u}}};return a},iT=(t,e)=>s=>()=>{let a=0,l=-1,u=!1,c=[],d=[],p=(y=0,m=d.length)=>{for(;y<m;y++)d[y].s({done:!0,value:void 0})};s.on({next:y=>{let m=d.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw:y=>{let m=d.shift();m&&m.f(y),p(),l=c.length,u=!0,c.push(y)},return:y=>{let m=d.shift();m&&m.s({done:!0,value:y}),p(),l=c.length,c.push(y)}});let g={[t]:()=>g,next:()=>{if(l===-1){let b=a++;if(b>=c.length){let _=e();return d.push(_),_.p}return{done:!1,value:c[b]}}if(a>l)return{done:!0,value:void 0};let y=a++,m=c[y];if(y!==l)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},m0=t=>{let e=atob(t),s=e.length,a=new Uint8Array(s);for(let l=0;l<s;l++)a[l]=e.charCodeAt(l);return a.buffer};m0.toString();
12function oT(t){return"__SEROVAL_SEQUENCE__"in t}function y0(t,e,s){return{__SEROVAL_SEQUENCE__:!0,v:t,t:e,d:s}}function lT(t){let e=[],s=-1,a=-1,l=t[_r]();for(;;)try{let u=l.next();if(e.push(u.value),u.done){a=e.length-1;break}}catch(u){s=e.length,e.push(u)}return y0(e,s,a)}var uT=aT(_r);function cT(t){return uT(t)}var hT={},fT={},dT={0:{},1:{},2:{},3:{},4:{},5:{}};function Su(t){return"__SEROVAL_STREAM__"in t}function $s(){return sT()}function pT(t){let e=$s(),s=t[br]();async function a(){try{let l=await s.next();l.done?e.return(l.value):(e.next(l.value),await a())}catch(l){e.throw(l)}}return a().catch(()=>{}),e}var gT=iT(br,wu);function mT(t){return gT(t)}async function yT(t){try{return[1,await t]}catch(e){return[0,e]}}function vT(t,e){return{plugins:e.plugins,mode:t,marked:new Set,features:63^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Wl(t,e){t.marked.add(e)}function bT(t,e){let s=t.refs.size;return t.refs.set(e,s),s}function Eu(t,e){let s=t.refs.get(e);return s!=null?(Wl(t,s),{type:1,value:RE(s)}):{type:0,value:bT(t,e)}}function Ff(t,e){let s=Eu(t,e);return s.type===1?s:c0(e)?{type:2,value:CE(s.value,e)}:s}function Ps(t,e){let s=Ff(t,e);if(s.type!==0)return s.value;if(e in i0)return xE(s.value,e);throw new _u(e)}function Tu(t,e){let s=Eu(t,dT[e]);return s.type===1?s.value:je(26,s.value,e,R,R,R,R,R,R,R,R,R)}function _T(t){let e=Eu(t,hT);return e.type===1?e.value:je(27,e.value,R,R,R,R,R,R,Ps(t,_r),R,R,R)}function wT(t){let e=Eu(t,fT);return e.type===1?e.value:je(29,e.value,R,R,R,R,R,[Tu(t,1),Ps(t,br)],R,R,R,R)}function ST(t,e,s,a){return je(s?11:10,t,R,R,R,a,R,R,R,R,f0(e),R)}function ET(t,e,s,a){return je(8,e,R,R,R,R,{k:s,v:a},R,Tu(t,0),R,R,R)}function TT(t,e,s){let a=new Uint8Array(s),l="";for(let u=0,c=a.length;u<c;u++)l+=String.fromCharCode(a[u]);return je(19,e,as(btoa(l)),R,R,R,R,R,Tu(t,5),R,R,R)}function RT(t,e){return{base:vT(t,e),child:void 0}}var AT=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return ct(this._p,this.depth,t)}};async function OT(t,e,s){let a=[];for(let l=0,u=s.length;l<u;l++)l in s?a[l]=await ct(t,e,s[l]):a[l]=0;return a}async function xT(t,e,s,a){return jE(s,a,await OT(t,e,a))}async function Yf(t,e,s){let a=Object.entries(s),l=[],u=[];for(let c=0,d=a.length;c<d;c++)l.push(as(a[c][0])),u.push(await ct(t,e,a[c][1]));return _r in s&&(l.push(Ps(t.base,_r)),u.push(BE(_T(t.base),await ct(t,e,lT(s))))),br in s&&(l.push(Ps(t.base,br)),u.push(IE(wT(t.base),await ct(t,e,pT(s))))),Fa in s&&(l.push(Ps(t.base,Fa)),u.push(d0(s[Fa]))),Ka in s&&(l.push(Ps(t.base,Ka)),u.push(s[Ka]?o0:l0)),{k:l,v:u}}async function ef(t,e,s,a,l){return ST(s,a,l,await Yf(t,e,a))}async function CT(t,e,s,a){return ME(s,await ct(t,e,a.valueOf()))}async function kT(t,e,s,a){return DE(s,a,await ct(t,e,a.buffer))}async function jT(t,e,s,a){return NE(s,a,await ct(t,e,a.buffer))}async function MT(t,e,s,a){return UE(s,a,await ct(t,e,a.buffer))}async function Ry(t,e,s,a){let l=h0(a,t.base.features);return LE(s,a,l?await Yf(t,e,l):R)}async function DT(t,e,s,a){let l=h0(a,t.base.features);return PE(s,a,l?await Yf(t,e,l):R)}async function NT(t,e,s,a){let l=[],u=[];for(let[c,d]of a.entries())l.push(await ct(t,e,c)),u.push(await ct(t,e,d));return ET(t.base,s,l,u)}async function UT(t,e,s,a){let l=[];for(let u of a.keys())l.push(await ct(t,e,u));return zE(s,l)}async function v0(t,e,s,a){let l=t.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let d=l[u];if(d.parse.async&&d.test(a))return kE(s,d.tag,await d.parse.async(a,new AT(t,e),{id:s}))}return R}async function LT(t,e,s,a){let[l,u]=await yT(a);return je(12,s,l,R,R,R,R,R,await ct(t,e,u),R,R,R)}function PT(t,e,s,a,l){let u=[],c=s.on({next:d=>{Wl(this.base,e),ct(this,t,d).then(p=>{u.push(qE(e,p))},p=>{l(p),c()})},throw:d=>{Wl(this.base,e),ct(this,t,d).then(p=>{u.push($E(e,p)),a(u),c()},p=>{l(p),c()})},return:d=>{Wl(this.base,e),ct(this,t,d).then(p=>{u.push(VE(e,p)),a(u),c()},p=>{l(p),c()})}})}async function zT(t,e,s,a){return HE(s,Tu(t.base,4),await new Promise(PT.bind(t,e,s,a)))}async function BT(t,e,s,a){let l=[];for(let u=0,c=a.v.length;u<c;u++)l[u]=await ct(t,e,a.v[u]);return GE(s,l,a.t,a.d)}async function IT(t,e,s,a){if(Array.isArray(a))return xT(t,e,s,a);if(Su(a))return zT(t,e,s,a);if(oT(a))return BT(t,e,s,a);let l=a.constructor;if(l===tT)return ct(t,e,a.replacement);let u=await v0(t,e,s,a);if(u)return u;switch(l){case Object:return ef(t,e,s,a,!1);case R:return ef(t,e,s,a,!0);case Date:return AE(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Ry(t,e,s,a);case Number:case Boolean:case String:case BigInt:return CT(t,e,s,a);case ArrayBuffer:return TT(t.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return kT(t,e,s,a);case DataView:return MT(t,e,s,a);case Map:return NT(t,e,s,a);case Set:return UT(t,e,s,a)}
12if(l===Promise||a instanceof Promise)return LT(t,e,s,a);let c=t.base.features;if(c&32&&l===RegExp)return OE(s,a);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return jT(t,e,s,a)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return DT(t,e,s,a);if(a instanceof Error)return Ry(t,e,s,a);if(_r in a||br in a)return ef(t,e,s,a,!!l);throw new _u(a)}async function HT(t,e,s){let a=Ff(t.base,s);if(a.type!==0)return a.value;let l=await v0(t,e,a.value,s);if(l)return l;throw new _u(s)}async function ct(t,e,s){switch(typeof s){case"boolean":return s?o0:l0;case"undefined":return hE;case"string":return d0(s);case"number":return EE(s);case"bigint":return TE(s);case"object":{if(s){let a=Ff(t.base,s);return a.type===0?await IT(t,e+1,a.value,s):a.value}return fE}case"symbol":return Ps(t.base,s);case"function":return HT(t,e,s);default:throw new _u(s)}}async function qT(t,e){try{return await ct(t,0,e)}catch(s){throw s instanceof Ty?s:new Ty(s)}}var $T=(t=>(t[t.Vanilla=1]="Vanilla",t[t.Cross=2]="Cross",t))($T||{});function b0(t,e){for(let s=0,a=e.length;s<a;s++){let l=e[s];t.has(l)||(t.add(l),l.extends&&b0(t,l.extends))}}function _0(t){if(t){let e=new Set;return b0(e,t),[...e]}}function VT(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new WE(t)}}var GT=1e6,KT=1e4,FT=2e4;function w0(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}var YT=1e3;function QT(t,e){var s;return{mode:t,plugins:e.plugins,refs:e.refs||new Map,features:(s=e.features)!=null?s:63^(e.disabledFeatures||0),depthLimit:e.depthLimit||YT}}function JT(t){return{mode:2,base:QT(2,t),child:R}}var XT=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return He(this._p,this.depth,t)}};function S0(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new os({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function ZT(t,e,s){return S0(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,s),s}function WT(t,e,s){return S0(t.base,e),t.base.refs.set(e,s),s}function ht(t,e,s){return t.mode===1?ZT(t,e,s):WT(t,e,s)}function _f(t,e,s){if(Object.hasOwn(e,s))return e[s];throw new os(t)}function eR(t,e){return ht(t,e.i,wE(is(e.s)))}function tR(t,e,s){let a=s.a,l=a.length,u=ht(t,s.i,new Array(l));for(let c=0,d;c<l;c++)d=a[c],d&&(u[c]=He(t,e,d));return w0(u,s.o),u}function nR(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function rR(t){switch(t){case br:case Ka:case Fa:case _r:return!0;default:return!1}}function Ay(t,e,s){nR(e)?t[e]=s:Object.defineProperty(t,e,{value:s,configurable:!0,enumerable:!0,writable:!0})}function sR(t,e,s,a,l){if(typeof a=="string")Ay(s,is(a),He(t,e,l));else{let u=He(t,e,a);switch(typeof u){case"string":Ay(s,u,He(t,e,l));break;case"symbol":rR(u)&&(s[u]=He(t,e,l));break;default:throw new os(a)}}}function E0(t,e,s,a){let l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)sR(t,e,a,l[u],c[u]);return a}function aR(t,e,s){let a=ht(t,s.i,s.t===10?{}:Object.create(null));return E0(t,e,s.p,a),w0(a,s.o),a}function iR(t,e){return ht(t,e.i,new Date(e.s))}function oR(t,e){if(t.base.features&32){let s=is(e.c);if(s.length>FT)throw new os(e);return ht(t,e.i,new RegExp(s,e.m))}throw new g0(e)}function lR(t,e,s){let a=ht(t,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)a.add(He(t,e,u[l]));return a}function uR(t,e,s){let a=ht(t,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,d=u.length;l<d;l++)a.set(He(t,e,u[l]),He(t,e,c[l]));return a}function cR(t,e){if(e.s.length>GT)throw new os(e);return ht(t,e.i,m0(is(e.s)))}function hR(t,e,s){var a;let l=VT(s.c),u=He(t,e,s.f),c=(a=s.b)!=null?a:0;if(c<0||c>u.byteLength)throw new os(s);return ht(t,s.i,new l(u,c,s.l))}function fR(t,e,s){var a;let l=He(t,e,s.f),u=(a=s.b)!=null?a:0;if(u<0||u>l.byteLength)throw new os(s);return ht(t,s.i,new DataView(l,u,s.l))}function T0(t,e,s,a){if(s.p){let l=E0(t,e,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function dR(t,e,s){let a=ht(t,s.i,new AggregateError([],is(s.m)));return T0(t,e,s,a)}function pR(t,e,s){let a=_f(s,cE,s.s),l=ht(t,s.i,new a(is(s.m)));return T0(t,e,s,l)}function gR(t,e,s){let a=wu(),l=ht(t,s.i,a.p),u=He(t,e,s.f);return s.s?a.s(u):a.f(u),l}function mR(t,e,s){return ht(t,s.i,Object(He(t,e,s.f)))}function yR(t,e,s){let a=t.base.plugins;if(a){let l=is(s.c);for(let u=0,c=a.length;u<c;u++){let d=a[u];if(d.tag===l)return ht(t,s.i,d.deserialize(s.s,new XT(t,e),{id:s.i}))}}throw new JE(s.c)}function vR(t,e){return ht(t,e.i,ht(t,e.s,wu()).p)}function bR(t,e,s){let a=t.base.refs.get(s.i);if(a)return a.s(He(t,e,s.a[1])),R;throw new _o("Promise")}function _R(t,e,s){let a=t.base.refs.get(s.i);if(a)return a.f(He(t,e,s.a[1])),R;throw new _o("Promise")}function wR(t,e,s){He(t,e,s.a[0]);let a=He(t,e,s.a[1]);return cT(a)}function SR(t,e,s){He(t,e,s.a[0]);let a=He(t,e,s.a[1]);return mT(a)}function ER(t,e,s){let a=ht(t,s.i,$s()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)He(t,e,l[c]);return a}function TR(t,e,s){let a=t.base.refs.get(s.i);if(a&&Su(a))return a.next(He(t,e,s.f)),R;throw new _o("Stream")}function RR(t,e,s){let a=t.base.refs.get(s.i);if(a&&Su(a))return a.throw(He(t,e,s.f)),R;throw new _o("Stream")}function AR(t,e,s){let a=t.base.refs.get(s.i);if(a&&Su(a))return a.return(He(t,e,s.f)),R;throw new _o("Stream")}function OR(t,e,s){return He(t,e,s.f),R}function xR(t,e,s){return He(t,e,s.a[1]),R}function CR(t,e,s){let a=ht(t,s.i,y0([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)a.v[l]=He(t,e,s.a[l]);return a}function He(t,e,s){if(e>t.base.depthLimit)throw new eT(t.base.depthLimit);switch(e+=1,s.t){case 2:return _f(s,lE,s.s);case 0:return Number(s.s);case 1:return is(String(s.s));case 3:if(String(s.s).length>KT)throw new os(s);return BigInt(s.s);case 4:return t.base.refs.get(s.i);case 18:return eR(t,s);case 9:return tR(t,e,s);case 10:case 11:return aR(t,e,s);
12case 5:return iR(t,s);case 6:return oR(t,s);case 7:return lR(t,e,s);case 8:return uR(t,e,s);case 19:return cR(t,s);case 16:case 15:return hR(t,e,s);case 20:return fR(t,e,s);case 14:return dR(t,e,s);case 13:return pR(t,e,s);case 12:return gR(t,e,s);case 17:return _f(s,oE,s.s);case 21:return mR(t,e,s);case 25:return yR(t,e,s);case 22:return vR(t,s);case 23:return bR(t,e,s);case 24:return _R(t,e,s);case 28:return wR(t,e,s);case 30:return SR(t,e,s);case 31:return ER(t,e,s);case 32:return TR(t,e,s);case 33:return RR(t,e,s);case 34:return AR(t,e,s);case 27:return OR(t,e,s);case 29:return xR(t,e,s);case 35:return CR(t,e,s);default:throw new g0(s)}}function kR(t,e){try{return He(t,0,e)}catch(s){throw new QE(s)}}var jR=()=>T;jR.toString();function Oy(t,e){let s=_0(e.plugins),a=JT({plugins:s,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit});return kR(a,t)}async function MR(t,e={}){let s=_0(e.plugins),a=RT(1,{plugins:s,disabledFeatures:e.disabledFeatures});return{t:await qT(a,t),f:a.base.features,m:Array.from(a.base.marked)}}function DR(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,s,a){return{v:s.parse(t.toSerializable(e))}},async async(e,s,a){return{v:await s.parse(t.toSerializable(e))}},stream(e,s,a){return{v:s.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,s,a){return t.fromSerializable(s.deserialize(e.v))}}}var NR=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}},iu=globalThis.Buffer,R0=!!iu&&typeof iu.from=="function";function A0(t){if(t.length===0)return"";if(R0)return iu.from(t).toString("base64");const e=32768,s=[];for(let a=0;a<t.length;a+=e){const l=t.subarray(a,a+e);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function O0(t){if(t.length===0)return new Uint8Array(0);if(R0){const a=iu.from(t,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const e=atob(t),s=new Uint8Array(e.length);for(let a=0;a<e.length;a++)s[a]=e.charCodeAt(a);return s}var Fi=Object.create(null),Yi=Object.create(null),UR=t=>new ReadableStream({start(e){t.on({next(s){try{e.enqueue(O0(s))}catch{}},throw(s){e.error(s)},return(){try{e.close()}catch{}}})}}),LR=new TextEncoder,PR=t=>new ReadableStream({start(e){t.on({next(s){try{typeof s=="string"?e.enqueue(LR.encode(s)):e.enqueue(O0(s.$b64))}catch{}},throw(s){e.error(s)},return(){try{e.close()}catch{}}})}}),zR="(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(_){}}})}}))",BR="(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 xy(t){const e=$s(),s=t.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await s.read();if(a){e.return(void 0);break}e.next(A0(l))}}catch(a){e.throw(a)}finally{s.releaseLock()}})(),e}function Cy(t){const e=$s(),s=t.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=a.decode();c.length>0&&e.next(c)}catch{}e.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&e.next(c)}catch{e.next({$b64:A0(u)})}}}catch(l){e.throw(l)}finally{s.releaseLock()}})(),e}var IR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===Fi},parse:{sync(t,e,s){return{}},async async(t,e,s){return{}},stream(t,e,s){return{}}},serialize(t,e,s){return zR},deserialize(t,e,s){return Fi}},{tag:"tss/RawStreamFactoryText",test(t){return t===Yi},parse:{sync(t,e,s){return{}},async async(t,e,s){return{}},stream(t,e,s){return{}}},serialize(t,e,s){return BR},deserialize(t,e,s){return Yi}}],test(t){return t instanceof NR},parse:{sync(t,e,s){const a=t.hint==="text"?Yi:Fi;return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse($s())}},async async(t,e,s){const a=t.hint==="text"?Yi:Fi,l=t.hint==="text"?Cy(t.stream):xy(t.stream);return{hint:await e.parse(t.hint),factory:await e.parse(a),stream:await e.parse(l)}},stream(t,e,s){const a=t.hint==="text"?Yi:Fi,l=t.hint==="text"?Cy(t.stream):xy(t.stream);return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(l)}}},serialize(t,e,s){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e,s){const a=e.deserialize(t.stream);return e.deserialize(t.hint)==="text"?PR(a):UR(a)}};function HR(t){return{tag:"tss/RawStream",test:()=>!1,parse:{}
12,serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e,s,a){return t(typeof s?.deserialize=="function"?s.deserialize(e.streamId):e.streamId)}}}var qR={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}},Jr={},x0=t=>new ReadableStream({start:e=>{t.on({next:s=>{try{e.enqueue(s)}catch{}},throw:s=>{e.error(s)},return:()=>{try{e.close()}catch{}}})}}),$R={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===Jr},parse:{sync(){return Jr},async async(){return await Promise.resolve(Jr)},stream(){return Jr}},serialize(){return x0.toString()},deserialize(){return Jr}};function ky(t){let e=$s(),s=t.getReader();async function a(){try{let l=await s.read();l.done?e.return(l.value):(e.next(l.value),await a())}catch(l){e.throw(l)}}return a().catch(()=>{}),e}var VR={tag:"seroval/plugins/web/ReadableStream",extends:[$R],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(Jr),stream:e.parse($s())}},async async(t,e){return{factory:await e.parse(Jr),stream:await e.parse(ky(t))}},stream(t,e){return{factory:e.parse(Jr),stream:e.parse(ky(t))}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){let s=e.deserialize(t.stream);return x0(s)}},GR=VR,KR=[qR,IR,GR];function FR(){return[...zv()?.serializationAdapters?.map(DR)??[],...KR]}var jy=new TextDecoder,YR=new Uint8Array(0),My=16*1024*1024,Dy=32*1024*1024,Ny=1024,Uy=1e5;function QR(t){const e=new Map,s=new Map,a=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(m){d=m},cancel(){l=!0;try{u?.cancel()}catch{}e.forEach(m=>{try{m.error(new Error("Framed response cancelled"))}catch{}}),e.clear(),s.clear(),a.clear()}});function g(m){const b=s.get(m);if(b)return b;if(a.has(m))return new ReadableStream({start(S){S.close()}});if(s.size>=Ny)throw new Error(`Too many raw streams in framed response (max ${Ny})`);const _=new ReadableStream({start(S){e.set(m,S)},cancel(){a.add(m),e.delete(m),s.delete(m)}});return s.set(m,_),_}function y(m){return g(m),e.get(m)}return(async()=>{const m=t.getReader();u=m;const b=[];let _=0;function S(){if(_<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const A=new Uint8Array(9);let M=0,j=9;for(let N=0;N<b.length&&j>0;N++){const X=b[N],K=Math.min(X.length,j);A.set(X.subarray(0,K),M),M+=K,j-=K}return{type:A[0],streamId:(A[1]<<24|A[2]<<16|A[3]<<8|A[4])>>>0,length:(A[5]<<24|A[6]<<16|A[7]<<8|A[8])>>>0}}function O(E){if(E===0)return YR;const A=new Uint8Array(E);let M=0,j=E;for(;j>0&&b.length>0;){const N=b[0];if(!N)break;const X=Math.min(N.length,j);A.set(N.subarray(0,X),M),M+=X,j-=X,X===N.length?b.shift():b[0]=N.subarray(X)}return _-=E,A}try{for(;;){const{done:E,value:A}=await m.read();if(l||E)break;if(A){if(_+A.length>Dy)throw new Error(`Framed response buffer exceeded ${Dy} bytes`);for(b.push(A),_+=A.length;;){const M=S();if(!M)break;const{type:j,streamId:N,length:X}=M;if(j!==pr.JSON&&j!==pr.CHUNK&&j!==pr.END&&j!==pr.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===pr.JSON){if(N!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(N===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(X>My)throw new Error(`Frame payload too large: ${X} bytes (max ${My})`);const K=9+X;if(_<K)break;if(++c>Uy)throw new Error(`Too many frames in framed response (max ${Uy})`);O(9);const I=O(X);switch(j){case pr.JSON:try{d.enqueue(jy.decode(I))}catch{}break;case pr.CHUNK:{const F=y(N);F&&F.enqueue(I);break}case pr.END:{const F=y(N);if(a.add(N),F){try{F.close()}catch{}e.delete(N)}break}case pr.ERROR:{const F=y(N);if(a.add(N),F){const W=jy.decode(I);F.error(new Error(W)),e.delete(N)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}e.forEach(E=>{try{E.close()}catch{}}),e.clear()}catch(E){try{d.error(E)}catch{}e.forEach(A=>{try{A.error(E)}catch{}}),e.clear()}finally{try{m.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var lo=null;async function wf(t){t.length>0&&await Promise.allSettled(t)}var JR=Object.prototype.hasOwnProperty;function C0(t){for(const e in t)if(JR.call(t,e))return!0;return!1}async function XR(t,e,s){lo||(lo=FR());const a=e[0],l=a.fetch??s,u=a.data instanceof FormData?"formData":"payload",c=a.headers?new Headers(a.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${Kw}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await k0(a);if(p!==void 0){const g=Vv({payload:p});t.includes("?")?t+=`&${g}`:t+=`?${g}`}}let d;if(a.method==="POST"){const p=await ZR(a);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await WR(async()=>l(t,{method:a.method,headers:c,signal:a.signal,body:d}))}async function k0(t){let e=!1;const s={};if(t.data!==void 0&&(e=!0,s.data=t.data),t.context&&C0(t.context)&&(e=!0,s.context=t.context),e)return j0(s)}async function j0(t){return JSON.stringify(await Promise.resolve(MR(t,{plugins:lo})))}async function ZR(t){if(t.data instanceof FormData){let s;return t.context&&C0(t.context)&&(s=await j0(t.context)),s!==void 0&&t.data.set(Gw,s),{body:t.data}}const e=await k0(t);if(e)return{body:e,contentType:"application/json"}}async function WR(t){let e;try{e=await t()}catch(a){if(a instanceof Response)e=a;else throw console.log(a),a}if(e.headers.get("x-tss-raw")==="true")return e;const s=e.headers.get("content-type");if(s||Xt(),e.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(Qw(s),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=QR(e.body),c=[HR(l),...lo||[]],d=new Map;a=await e1({jsonStream:u,onMessage:p=>Oy(p,{refs:d,plugins:c}),onError(p,g){console.error(p,g)}})}else if(s.includes("application/json")){const l=await e.json(),u=[];a=Oy(l,{plugins:lo}),await wf(u)}if(a||Xt(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await e.json(),l=MS(a);if(l)throw l;if(vt(a))throw a;return a}if(!e.ok)throw new Error(await e.text());return e}async function e1({jsonStream:t,onMessage:e,onError:s}){const a=t.getReader(),{value:l,done:u}=await a.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let d=!1;const p=(async()=>{try{for(;;){const{value:m,done:b}=await a.read();if(b)break;
12if(m)try{const _=[];try{e(JSON.parse(m))}finally{}await wf(_)}catch(_){s?.(`Invalid JSON: ${m}`,_)}}}catch(m){d||s?.("Stream processing error:",m)}})();let g;const y=[];try{g=e(c)}catch(m){throw d=!0,a.cancel().catch(()=>{}),m}return await wf(y),Promise.resolve(g).catch(()=>{d=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),g}function t1(t){const e="/_serverFn/"+t;return Object.assign((...l)=>{const u=zv()?.serverFns?.fetch;return XR(e,l,u??fetch)},{url:e,serverFnMeta:{id:t},[yf]:!0})}var n1={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(yf in t)?!1:!!t[yf],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>t1(t)};function Ly(t){return t.replaceAll("\0","/").replaceAll("�","/")}function r1(t,e){t.id=e.i,t.__beforeLoadContext=e.b,t.loaderData=e.l,t.status=e.s,t.ssr=e.ssr,t.updatedAt=e.u,t.error=e.e,e.g!==void 0&&(t.globalNotFound=e.g)}async function s1(t){window.$_TSR||Xt();const e=t.options.serializationAdapters;if(e?.length){const E=new Map;e.forEach(A=>{E.set(A.key,A.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(A=>A())}window.$_TSR.initialized=!0,window.$_TSR.router||Xt();const s=window.$_TSR.router;s.matches.forEach(E=>{E.i=Ly(E.i)}),s.lastMatchId&&(s.lastMatchId=Ly(s.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:u}=s;t.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:c};const d=t.matchRoutes(t.stores.location.get()),p=Promise.all(d.map(E=>t.loadRouteChunk(t.looseRoutesById[E.routeId])));function g(E){const A=t.looseRoutesById[E.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(A){const M=qs();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),t.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},A)}}function y(E){const A=t.looseRoutesById[E.routeId];A&&(A.options.ssr=E.ssr)}let m;d.forEach(E=>{const A=s.matches.find(M=>M.i===E.id);if(!A){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}r1(E,A),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&m===void 0&&(m=E.index,g(E))}),t.stores.setMatches(d),await t.options.hydrate?.(l);const b=t.stores.matches.get(),_=t.stores.location.get();await Promise.all(b.map(async E=>{try{const A=t.looseRoutesById[E.routeId],M=b[E.index-1]?.context??t.options.context;if(A.options.context){const K={deps:E.loaderDeps,params:E.params,context:M??{},location:_,navigate:I=>t.navigate({...I,_fromLocation:_}),buildLocation:t.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:d,routeId:A.id};E.__routeContext=A.options.context(K)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:t.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},N=await A.options.head?.(j),X=await A.options.scripts?.(j);E.meta=N?.meta,E.links=N?.links,E.headScripts=N?.scripts,E.styles=N?.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 S=d[d.length-1].id!==u;if(!d.some(E=>E.ssr===!1)&&!S)return d.forEach(E=>{E._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),p;const O=Promise.resolve().then(()=>t.load()).catch(E=>{console.error("Error during router hydration:",E)});if(S){const E=d[1];E||Xt(),g(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=O,O.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(E.id,A=>({...A,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var ou=oe.use,Xi=typeof window<"u"?oe.useLayoutEffect:oe.useEffect;function tf(t){const e=oe.useRef({value:t,prev:null}),s=e.current.value;return t!==s&&(e.current={value:t,prev:s}),e.current.prev}function a1(t,e,s={},a={}){oe.useEffect(()=>{if(!t.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{e(u)},s);return l.observe(t.current),()=>{l.disconnect()}},[e,s,a.disabled,t])}function i1(t){const e=oe.useRef(null);return oe.useImperativeHandle(t,()=>e.current,[]),e}function o1({promise:t}){if(ou)return ou(t);const e=WS(t);if(e[Vn].status==="pending")throw e;if(e[Vn].status==="error")throw e[Vn].error;return e[Vn].data}function l1(t){const e=Q.jsx(u1,{...t});
12return t.fallback?Q.jsx(oe.Suspense,{fallback:t.fallback,children:e}):e}function u1(t){const e=o1(t);return t.children(e)}function Qf(t){const e=t.errorComponent??Jf;return Q.jsx(c1,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:s,reset:a})=>s?oe.createElement(e,{error:s,reset:a}):t.children})}var c1=class extends oe.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const s=t.getResetKey();return e.error&&e.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Jf({error:t}){const[e,s]=oe.useState(!1);return Q.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Q.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Q.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(a=>!a),children:e?"Hide Error":"Show Error"})]}),Q.jsx("div",{style:{height:".25rem"}}),e?Q.jsx("div",{children:Q.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?Q.jsx("code",{children:t.message}):null})}):null]})}function h1({children:t,fallback:e=null}){return Xf()?Q.jsx(Z.Fragment,{children:t}):Q.jsx(Z.Fragment,{children:e})}function Xf(){return Z.useSyncExternalStore(f1,()=>!0,()=>!1)}function f1(){return()=>{}}var M0=oe.createContext(null);function Rt(t){return oe.useContext(M0)}var Ru=oe.createContext(void 0),d1=oe.createContext(void 0),Ye=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(Ye||{});function p1({update:t,notify:e,unwatched:s}){return{link:a,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function a(g,y,m){const b=y.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===g){_.version=m,y.depsTail=_;return}const S=g.subsTail;if(S!==void 0&&S.version===m&&S.sub===y)return;const O=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=O),b!==void 0?b.nextDep=O:y.deps=O,S!==void 0?S.nextSub=O:g.subs=O}function l(g,y=g.sub){const m=g.dep,b=g.prevDep,_=g.nextDep,S=g.nextSub,O=g.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=O:m.subsTail=O,O!==void 0?O.nextSub=S:(m.subs=S)===void 0&&s(m),_}function u(g){let y=g.nextSub,m;e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&e(b),_&1){const S=b.subs;if(S!==void 0){const O=(g=S).nextSub;O!==void 0&&(m={value:y,prev:m},y=O);continue}}if((g=y)!==void 0){y=g.nextSub;continue}for(;m!==void 0;)if(g=m.value,m=m.prev,g!==void 0){y=g.nextSub;continue e}break}while(!0)}function c(g,y){let m,b=0,_=!1;e:do{const S=g.dep,O=S.flags;if(y.flags&16)_=!0;else if((O&17)===17){if(t(S)){const E=S.subs;E.nextSub!==void 0&&d(E),_=!0}}else if((O&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=S.deps,y=S,++b;continue}if(!_){const E=g.nextDep;if(E!==void 0){g=E;continue}}for(;b--;){const E=y.subs,A=E.nextSub!==void 0;if(A?(g=m.value,m=m.prev):g=E,_){if(t(y)){A&&d(E),y=g.sub;continue}_=!1}else y.flags&=-33;y=g.sub;const M=g.nextDep;if(M!==void 0){g=M;continue e}}return _}while(!0)}function d(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&e(y))}while((g=g.nextSub)!==void 0)}function p(g,y){let m=y.depsTail;for(;m!==void 0;){if(m===g)return!0;m=m.prevDep}return!1}}function g1(t,e,s){const a=typeof t=="object",l=a?t:void 0;return{next:(a?t.next:t)?.bind(l),error:(a?t.error:e)?.bind(l),complete:(a?t.complete:s)?.bind(l)}}const Sf=[];let eu=0;const{link:Py,unlink:m1,propagate:y1,checkDirty:D0,shallowPropagate:zy}=p1({update(t){return t._update()},notify(t){Sf[Ef++]=t,t.flags&=~Ye.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=Ye.Mutable|Ye.Dirty,lu(t))}});let Bl=0,Ef=0,qn,Tf=0;function N0(t){try{++Tf,t()}finally{--Tf||U0()}}function lu(t){const e=t.depsTail;let s=e!==void 0?e.nextDep:t.deps;for(;s!==void 0;)s=m1(s,t)}function U0(){if(!(Tf>0)){for(;Bl<Ef;){const t=Sf[Bl];Sf[Bl++]=void 0,t.notify()}Bl=0,Ef=0}}function By(t,e){const s=typeof t=="function",a=t,l={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?Ye.None:Ye.Mutable,get(){return qn!==void 0&&P
12y(l,qn,eu),l._snapshot},subscribe(u){const c=g1(u),d={current:!1},p=v1(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=qn,d=e?.compare??Object.is;if(s)qn=l,++eu,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=Ye.Mutable|Ye.RecursedCheck);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&s?a(p):u;return p===void 0||!d(p,g)?(l._snapshot=g,!0):!1}finally{qn=c,s&&(l.flags&=~Ye.RecursedCheck),lu(l)}}};return s?(l.flags=Ye.Mutable|Ye.Dirty,l.get=function(){const u=l.flags;if(u&Ye.Dirty||u&Ye.Pending&&D0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&zy(c)}}else u&Ye.Pending&&(l.flags=u&~Ye.Pending);return qn!==void 0&&Py(l,qn,eu),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(y1(c),zy(c),U0())}},l}function v1(t){const e=()=>{const a=qn;qn=s,++eu,s.depsTail=void 0,s.flags=Ye.Watching|Ye.RecursedCheck;try{return t()}finally{qn=a,s.flags&=~Ye.RecursedCheck,lu(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ye.Watching|Ye.RecursedCheck,notify(){const a=this.flags;a&Ye.Dirty||a&Ye.Pending&&D0(this.deps,this)?e():this.flags=Ye.Watching},stop(){this.flags=Ye.None,this.depsTail=void 0,lu(this)}};return e(),s}var nf={exports:{}},rf={},sf={exports:{}},af={};var Iy;function b1(){if(Iy)return af;Iy=1;var t=bo();function e(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var s=typeof Object.is=="function"?Object.is:e,a=t.useState,l=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function d(m,b){var _=b(),S=a({inst:{value:_,getSnapshot:b}}),O=S[0].inst,E=S[1];return u(function(){O.value=_,O.getSnapshot=b,p(O)&&E({inst:O})},[m,_,b]),l(function(){return p(O)&&E({inst:O}),m(function(){p(O)&&E({inst:O})})},[m]),c(_),_}function p(m){var b=m.getSnapshot;m=m.value;try{var _=b();return!s(m,_)}catch{return!0}}function g(m,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return af.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,af}var Hy;function _1(){return Hy||(Hy=1,sf.exports=b1()),sf.exports}var qy;function w1(){if(qy)return rf;qy=1;var t=bo(),e=_1();function s(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var a=typeof Object.is=="function"?Object.is:s,l=e.useSyncExternalStore,u=t.useRef,c=t.useEffect,d=t.useMemo,p=t.useDebugValue;return rf.useSyncExternalStoreWithSelector=function(g,y,m,b,_){var S=u(null);if(S.current===null){var O={hasValue:!1,value:null};S.current=O}else O=S.current;S=d(function(){function A(K){if(!M){if(M=!0,j=K,K=b(K),_!==void 0&&O.hasValue){var I=O.value;if(_(I,K))return N=I}return N=K}if(I=N,a(j,K))return I;var F=b(K);return _!==void 0&&_(I,F)?(j=K,I):(j=K,N=F)}var M=!1,j,N,X=m===void 0?null:m;return[function(){return A(y())},X===null?void 0:function(){return A(X())}]},[y,m,b,_]);var E=l(g,S[0],S[1]);return c(function(){O.hasValue=!0,O.value=E},[E]),p(E),E},rf}var $y;function S1(){return $y||($y=1,nf.exports=w1()),nf.exports}var E1=S1();function T1(t,e){return t===e}function ot(t,e,s=T1){const a=oe.useCallback(c=>{if(!t)return()=>{};const{unsubscribe:d}=t.subscribe(c);return d},[t]),l=oe.useCallback(()=>t?.get(),[t]);return E1.useSyncExternalStoreWithSelector(a,l,l,e,s)}var R1={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Vs(t){const e=Rt(),s=oe.useContext(t.from?d1:Ru),a=t.from??s,l=a?t.from?e.stores.getRouteMatchStore(a):e.stores.matchStores.get(a):void 0,u=oe.useRef(void 0);return ot(l??R1,c=>{if((t.shouldThrow??!0)&&!c&&Xt(),c===void 0)return;const d=t.select?t.select(c):c;if(t.structuralSharing??e.options.defaultStructuralSharing){const p=Us(u.current,d);return u.current=p,p}return d})}function L0(t){return Vs({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function P0(t){const{select:e,...s}=t;return Vs({...s,select:a=>e?e(a.loaderDeps):a.loaderDeps})}function z0(t){return Vs({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const s=t.strict===!1?e.params:e._strictParams;return t.select?t.select(s):s}})}function B0(t){return Vs({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function I0(t){const e=Rt();return oe.useCallback(s=>e.navigate({...s,from:s.from??t?.from}),[t?.from,e])}function H0(t){return Vs({...t,select:e=>t.select?t.select(e.context):e.context})}var q0=Pv();const A1=Lv(q0);function O1(t,e){const s=Rt(),a=i1(e),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:g,preloadIntentProximity:y,hashScrollIntoView:m,replace:b,startTransition:_,resetScroll:S,viewTransition:O,children:E,target:A,disabled:M,style:j,className:N,onClick:X,onBlur:K,onFocus:I,onMouseEnter:F,onMouseLeave:W,onTouchStart:le,ignoreBlocker:ae,params:me,search:_e,hash:qe,state:Me,mask:L,reloadDocument:Y,unsafeRelative:se,from:Se,_fromLocation:ye,...C}=t,q=Xf(),G=oe.useMemo(()=>t,[s,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=ot(s.stores.location,Le=>Le,(Le,Je)=>Le.href===Je.href),ee=oe.useMemo(()=>{const Le={_fromLocation:J,...G};return s.buildLocation(Le)},[s,J,G]),ce=ee.maskedLocation?ee.maskedLocation.publicHref:ee.publicHref,we=ee.maskedLocation?ee.maskedLocation.external:ee.external,de=oe.useMemo(()=>D1(ce,we,s.history,M),[M,we,ce,s.history]),xe=oe.useMemo(()=>
12{if(de?.external)return nu(de.href,s.protocolAllowlist)?void 0:de.href;if(!N1(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),nu(d,s.protocolAllowlist)?void 0:d}catch{}},[d,de,s.protocolAllowlist]),Nt=oe.useMemo(()=>{if(xe)return!1;if(c?.exact){if(!vS(J.pathname,ee.pathname,s.basepath))return!1}else{const Le=ru(J.pathname,s.basepath),Je=ru(ee.pathname,s.basepath);if(!(Le.startsWith(Je)&&(Le.length===Je.length||Le[Je.length]==="/")))return!1}return(c?.includeSearch??!0)&&!Qt(J.search,ee.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?q&&J.hash===ee.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,J,xe,q,ee.hash,ee.pathname,ee.search,s.basepath]),Ut=Nt?Wr(l,{})??x1:of,kt=Nt?of:Wr(u,{})??of,us=[N,Ut.className,kt.className].filter(Boolean).join(" "),Lt=(j||Ut.style||kt.style)&&{...j,...Ut.style,...kt.style},[cs,Fn]=oe.useState(!1),Dn=oe.useRef(!1),ln=t.reloadDocument||xe?!1:p??s.options.defaultPreload,bt=g??s.options.defaultPreloadDelay??0,Zt=oe.useCallback(()=>{s.preloadRoute({...G,_builtLocation:ee}).catch(Le=>{console.warn(Le),console.warn(eE)})},[s,G,ee]);a1(a,oe.useCallback(Le=>{Le?.isIntersecting&&Zt()},[Zt]),M1,{disabled:!!M||ln!=="viewport"}),oe.useEffect(()=>{Dn.current||!M&&ln==="render"&&(Zt(),Dn.current=!0)},[M,Zt,ln]);const hs=Le=>{const Je=Le.currentTarget.getAttribute("target"),un=A!==void 0?A:Je;if(!M&&!U1(Le)&&!Le.defaultPrevented&&(!un||un==="_self")&&Le.button===0){Le.preventDefault(),q0.flushSync(()=>{Fn(!0)});const Yn=s.subscribe("onResolved",()=>{Yn(),Fn(!1)});s.navigate({...G,replace:b,resetScroll:S,hashScrollIntoView:m,startTransition:_,viewTransition:O,ignoreBlocker:ae})}};if(xe)return{...C,ref:a,href:xe,...E&&{children:E},...A&&{target:A},...M&&{disabled:M},...j&&{style:j},...N&&{className:N},...X&&{onClick:X},...K&&{onBlur:K},...I&&{onFocus:I},...F&&{onMouseEnter:F},...W&&{onMouseLeave:W},...le&&{onTouchStart:le}};const ft=Le=>{if(M||ln!=="intent")return;if(!bt){Zt();return}const Je=Le.currentTarget;if(Qi.has(Je))return;const un=setTimeout(()=>{Qi.delete(Je),Zt()},bt);Qi.set(Je,un)},Nn=Le=>{M||ln!=="intent"||Zt()},dt=Le=>{if(M||!ln||!bt)return;const Je=Le.currentTarget,un=Qi.get(Je);un&&(clearTimeout(un),Qi.delete(Je))};return{...C,...Ut,...kt,href:de?.href,ref:a,onClick:Da([X,hs]),onBlur:Da([K,dt]),onFocus:Da([I,ft]),onMouseEnter:Da([F,ft]),onMouseLeave:Da([W,dt]),onTouchStart:Da([le,Nn]),disabled:!!M,target:A,...Lt&&{style:Lt},...us&&{className:us},...M&&C1,...Nt&&k1,...q&&cs&&j1}}var of={},x1={className:"active"},C1={role:"link","aria-disabled":!0},k1={"data-status":"active","aria-current":"page"},j1={"data-transitioning":"transitioning"},Qi=new WeakMap,M1={rootMargin:"100px"},Da=t=>e=>{for(const s of t)if(s){if(e.defaultPrevented)return;s(e)}};function D1(t,e,s,a){if(!a)return e?{href:t,external:!0}:{href:s.createHref(t)||"/",external:!1}}function N1(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Zf=oe.forwardRef((t,e)=>{const{_asChild:s,...a}=t,{type:l,...u}=O1(a,e),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!s){const{disabled:d,...p}=u;return oe.createElement("a",p,c)}return oe.createElement(s,u,c)});function U1(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var L1=class extends Jv{constructor(e){super(e),this.useMatch=s=>Vs({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>H0({...s,from:this.id}),this.useSearch=s=>B0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>z0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>P0({...s,from:this.id}),this.useLoaderData=s=>L0({...s,from:this.id}),this.useNavigate=()=>I0({from:this.fullPath}),this.Link=Z.forwardRef((s,a)=>Q.jsx(Zf,{ref:a,from:this.fullPath,...s}))}};function P1(t){return new L1(t)}function z1(){return t=>I1(t)}var B1=class extends sE{constructor(t){super(t),this.useMatch=e=>Vs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>H0({...e,from:this.id}),this.useSearch=e=>B0({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>z0({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>P0({...e,from:this.id}),this.useLoaderData=e=>L0({...e,from:this.id}),this.useNavigate=()=>I0({from:this.fullPath}),this.Link=Z.forwardRef((e,s)=>Q.jsx(Zf,{ref:s,from:this.fullPath,...e}))}};function I1(t){return new B1(t)}function wn(t){return new H1(t,{silent:!0}).createRoute}var H1=class{constructor(t,e){this.path=t,this.createRoute=s=>{const a=P1(s);return a.isRoot=!1,a},this.silent=e?.silent}};function Sn(t,e){let s,a,l,u;const c=()=>(s||(s=t().then(p=>{s=void 0,a=p[e]}).catch(p=>{if(l=p,Ww(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),s),d=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(ou)ou(c());else throw c();return oe.createElement(a,g)};return d.preload=c,d}function q1(t){const e=Rt(),s=`not-found-${ot(e.stores.location,a=>a.pathname)}-${ot(e.stores.status,a=>a)}`;return Q.jsx(Qf,{getResetKey:()=>s,onCatch:(a,l)=>
12{if(vt(a))t.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(vt(a))return t.fallback?.(a);throw a},children:t.children})}function $1(){return Q.jsx("p",{children:"Not Found"})}function Ba(t){return Q.jsx(Q.Fragment,{children:t.children})}function $0(t,e,s){return e.options.notFoundComponent?Q.jsx(e.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?Q.jsx(t.options.defaultNotFoundComponent,{...s}):Q.jsx($1,{})}function V1(t){return null}function G1(){return V1(Rt()),null}var V0=oe.memo(function({matchId:e}){const s=Rt(),a=s.stores.matchStores.get(e);a||Xt();const l=ot(s.stores.loadedAt,c=>c),u=ot(a,c=>c);return Q.jsx(K1,{router:s,matchId:e,resetKey:l,matchState:oe.useMemo(()=>{const c=u.routeId,d=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:d}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function K1({router:t,matchId:e,resetKey:s,matchState:a}){const l=t.routesById[a.routeId],u=l.options.pendingComponent??t.options.defaultPendingComponent,c=u?Q.jsx(u,{}):null,d=l.options.errorComponent??t.options.defaultErrorComponent,p=l.options.onCatch??t.options.defaultOnCatch,g=l.isRoot?l.options.notFoundComponent??t.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",m=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||y))?oe.Suspense:Ba,b=d?Qf:Ba,_=g?q1:Ba;return Q.jsxs(l.isRoot?l.options.shellComponent??Ba:Ba,{children:[Q.jsx(Ru.Provider,{value:e,children:Q.jsx(m,{fallback:c,children:Q.jsx(b,{getResetKey:()=>s,errorComponent:d||Jf,onCatch:(S,O)=>{if(vt(S))throw S.routeId??=a.routeId,S;p?.(S,O)},children:Q.jsx(_,{fallback:S=>{if(S.routeId??=a.routeId,!g||S.routeId&&S.routeId!==a.routeId||!S.routeId&&
12!l.isRoot)throw S;return oe.createElement(g,S)},children:y||a._displayPending?Q.jsx(h1,{fallback:c,children:Q.jsx(Vy,{matchId:e})}):Q.jsx(Vy,{matchId:e})})})})}),a.parentRouteId===Is?Q.jsxs(Q.Fragment,{children:[Q.jsx(F1,{resetKey:s}),t.options.scrollRestoration&&Bv?Q.jsx(G1,{}):null]}):null]})}function F1({resetKey:t}){const e=Rt(),s=oe.useRef(void 0);return Xi(()=>{const a=e.latestLocation.href;(s.current===void 0||s.current!==a)&&(e.emit({type:"onRendered",...Ga(e.stores.location.get(),e.stores.resolvedLocation.get())}),s.current=a)},[e.latestLocation.state.__TSR_key,t,e]),null}var Vy=oe.memo(function({matchId:e}){const s=Rt(),a=(y,m)=>s.getMatch(y.id)?._nonReactive[m]??y._nonReactive[m],l=s.stores.matchStores.get(e);l||Xt();const u=ot(l,y=>y),c=u.routeId,d=s.routesById[c],p=oe.useMemo(()=>{const y=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),g=oe.useMemo(()=>{const y=d.options.component??s.options.defaultComponent;return y?Q.jsx(y,{},p):Q.jsx(G0,{})},[p,d.options.component,s.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const y=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(y){const m=s.getMatch(u.id);if(m&&!m._nonReactive.minPendingPromise){const b=qs();m._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),m._nonReactive.minPendingPromise=void 0},y)}}throw a(u,"loadPromise")}if(u.status==="notFound")return vt(u.error)||Xt(),$0(s,d,u.error);if(u.status==="redirected")throw Jt(u.error)||Xt(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),G0=oe.memo(function(){const e=Rt(),s=oe.useContext(Ru);let a,l=!1,u;{const g=s?e.stores.matchStores.get(s):void 0;[a,l]=ot(g,y=>[y?.routeId,y?.globalNotFound??!1]),u=ot(e.stores.matchesId,y=>y[y.findIndex(m=>m===s)+1])}const c=a?e.routesById[a]:void 0,d=e.options.defaultPendingComponent?Q.jsx(e.options.defaultPendingComponent,{}):null;if(l)return c||Xt(),$0(e,c,void 0);if(!u)return null;const p=Q.jsx(V0,{matchId:u});return a===Is?Q.jsx(oe.Suspense,{fallback:d,children:p}):p});function Y1(){const t=Rt(),e=oe.useRef({router:t,mounted:!1}),[s,a]=oe.useState(!1),l=ot(t.stores.isLoading,m=>m),u=ot(t.stores.hasPending,m=>m),c=tf(l),d=l||s||u,p=tf(d),g=l||u,y=tf(g);return t.startTransition=m=>{a(!0),oe.startTransition(()=>{m(),a(!1)})},oe.useEffect(()=>{const m=t.history.subscribe(t.load),b=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ns(t.latestLocation.publicHref)!==ns(b.publicHref)&&t.commitLocation({...b,replace:!0}),()=>{m()}},[t,t.history]),Xi(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(b){console.error(b)}})()},[t]),Xi(()=>{c&&!l&&t.emit({type:"onLoad",...Ga(t.stores.location.get(),t.stores.resolvedLocation.get())})},[c,t,l]),Xi(()=>{y&&!g&&t.emit({type:"onBeforeRouteMount",...Ga(t.stores.location.get(),t.stores.resolvedLocation.get())})},[g,y,t]),Xi(()=>{if(p&&!d){const m=Ga(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...m}),N0(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),m.hrefChanged&&aE(t)}},[d,p,t]),null}function Q1(){const t=Rt(),e=t.routesById[Is].options.pendingComponent??t.options.defaultPendingComponent,s=e?Q.jsx(e,{}):null,a=Q.jsxs(typeof document<"u"&&t.ssr?Ba:oe.Suspense,{fallback:s,children:[Q.jsx(Y1,{}),Q.jsx(J1,{})]});return t.options.InnerWrap?Q.jsx(t.options.InnerWrap,{children:a}):a}function J1(){const t=Rt(),e=ot(t.stores.firstId,l=>l),s=ot(t.stores.loadedAt,l=>l),a=e?Q.jsx(V0,{matchId:e}):null;return Q.jsx(Ru.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?a:Q.jsx(Qf,{getResetKey:()=>s,errorComponent:Jf,onCatch:void 0,children:a})})}var X1=t=>({createMutableStore:By,createReadonlyStore:By,batch:N0}),Z1=t=>new W1(t),W1=class extends KS{constructor(t){super(t,X1)}};function eA({router:t,children:e,...s}){Object.keys(s).length>0&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const a=Q.jsx(M0.Provider,{value:t,children:e});return t.options.Wrap?Q.jsx(t.options.Wrap,{children:a}):a}function tA({router:t,...e}){return Q.jsx(eA,{router:t,...e,children:Q.jsx(Q1,{})})}function K0(t){const{attrs:e,children:s,nonce:a}=t;switch(t.tag){case"title":return Q.jsx("title",{...e,suppressHydrationWarning:!0,children:s});case"meta":return Q.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return Q.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return t.inlineCss,Q.jsx("style",{...e,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return Q.jsx(nA,{attrs:e,children:s});default:return null}}function nA({attrs:t,children:e}){Rt();const s=Xf(),a=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(oe.useEffect(()=>{if(!a){if(t?.src){const l=(()=>{try{const c=document.baseURI||window.location.href;return new URL(t.src,c).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===l))return;const u=document.createElement("script");for(const[c,d]of Object.entries(t))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&u.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof e=="string"){const l=typeof t?.type=="string"?t.type:"text/javascript",u=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const p=d.getAttribute("type")??"text/javascript",g=d.getAttribute("nonce")??void 0;return d.textContent===e&&p===l&&g===u}))return;const c=document.createElement("script");
12if(c.textContent=e,t)for(const[d,p]of Object.entries(t))d!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(d,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[t,e,a]),a&&typeof e=="string")return Q.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!s){if(t?.src)return Q.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return Q.jsx("script",{...t,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var rA=t=>{const e=Rt(),s=e.options.ssr?.nonce,a=ot(e.stores.matches,g=>g.map(y=>y.meta).filter(Boolean),Qt),l=oe.useMemo(()=>{const g=[],y={};let m;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let S=_.length-1;S>=0;S--){const O=_[S];if(O)if(O.title)m||(m={tag:"title",children:O.title});else if("script:ld+json"in O)try{const E=JSON.stringify(O["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:sS(E)})}catch{}else{const E=O.name??O.property;if(E){if(y[E])continue;y[E]=!0}g.push({tag:"meta",attrs:{...O,nonce:s}})}}}return m&&g.push(m),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[a,s]),u=ot(e.stores.matches,g=>{const y=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),m=e.ssr?.manifest,b=g.map(_=>m?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?rE(m,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:Ey(t,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},Qt),c=ot(e.stores.matches,g=>{const y=[];return g.map(m=>e.looseRoutesById[m.routeId]).forEach(m=>e.ssr?.manifest?.routes[m.id]?.preloads?.filter(Boolean).forEach(b=>{const _=tE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:Ey(t,"modulepreload")??_.crossOrigin,nonce:s}})})),y},Qt),d=ot(e.stores.matches,g=>g.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"style",attrs:{...m,nonce:s},children:y})),Qt),p=ot(e.stores.matches,g=>g.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"script",attrs:{...m,nonce:s},children:y})),Qt);return sA([...l,...c,...u,...d,...p],g=>JSON.stringify(g))};function sA(t,e){const s=new Set;return t.filter(a=>{const l=e(a);return s.has(l)?!1:(s.add(l),!0)})}function aA(t){const e=rA(t.assetCrossOrigin),s=Rt().options.ssr?.nonce;return Q.jsx(Q.Fragment,{children:e.map(a=>oe.createElement(K0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var iA=()=>{const t=Rt(),e=t.options.ssr?.nonce,s=u=>{const c=[],d=t.ssr?.manifest;return d?(u.map(p=>t.looseRoutesById[p.routeId]).forEach(p=>d.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:e},children:g.children})})),c):[]},a=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:e},children:c})),l=ot(t.stores.matches,s,Qt);return oA(t,ot(t.stores.matches,a,Qt),l)};function oA(t,e,s){let a;t.serverSsr&&(a=t.serverSsr.takeBufferedScripts());const l=[...e,...s];return a&&l.unshift(a),Q.jsx(Q.Fragment,{children:l.map((u,c)=>oe.createElement(K0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var zs=(t,e)=>{const s={type:"request",...e||t};return{options:s,middleware:a=>zs({},Object.assign(s,{middleware:a})),inputValidator:a=>zs({},Object.assign(s,{inputValidator:a})),client:a=>zs({},Object.assign(s,{client:a})),server:a=>zs({},Object.assign(s,{server:a}))}};function F0(t,e){for(let s=0,a=e.length;s<a;s++){const l=e[s];t.has(l)||(t.add(l),l.extends&&F0(t,l.extends))}}var lA=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const s=new Set;F0(s,e.serializationAdapters),e.serializationAdapters=Array.from(s)}return e},createMiddleware:zs}),Gy=function(){return Gy=Object.assign||function(e){for(var s,a=1,l=arguments.length;a<l;a++){s=arguments[a];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(e[u]=s[u])}return e},Gy.apply(this,arguments)};function Au(t,e){var s={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(s[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)e.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(s[a[l]]=t[a[l]]);return s}function uA(t,e,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}
12return new(s||(s=Promise))(function(u,c){function d(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(d,p)}g((a=a.apply(t,e||[])).next())})}function b2(t,e,s){if(s||arguments.length===2)for(var a=0,l=e.length,u;a<l;a++)(u||!(a in e))&&(u||(u=Array.prototype.slice.call(e,0,a)),u[a]=e[a]);return t.concat(u||Array.prototype.slice.call(e))}const cA=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Wf extends Error{constructor(e,s="FunctionsError",a){super(e),this.name=s,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class hA extends Wf{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Ky extends Wf{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Fy extends Wf{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Rf;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Rf||(Rf={}));class fA{constructor(e,{headers:s={},customFetch:a,region:l=Rf.Any}={}){this.url=e,this.headers=s,this.region=l,this.fetch=cA(a)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return uA(this,arguments,void 0,function*(s,a={}){var l;let u,c;try{const{headers:d,method:p,body:g,signal:y,timeout:m}=a;let b={},{region:_}=a;_||(_=this.region);const S=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let O;g&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",O=g):typeof g=="string"?(b["Content-Type"]="text/plain",O=g):typeof FormData<"u"&&g instanceof FormData?O=g:(b["Content-Type"]="application/json",O=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?O=JSON.stringify(g):O=g;let E=y;m&&(c=new AbortController,u=setTimeout(()=>c.abort(),m),y?(E=c.signal,y.addEventListener("abort",()=>c.abort())):E=c.signal);const A=yield this.fetch(S.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:O,signal:E}).catch(X=>{throw new hA(X)}),M=A.headers.get("x-relay-error");if(M&&M==="true")throw new Ky(A);if(!A.ok)throw new Fy(A);let j=((l=A.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),N;return j==="application/json"?N=yield A.json():j==="application/octet-stream"||j==="application/pdf"?N=yield A.blob():j==="text/event-stream"?N=A:j==="multipart/form-data"?N=yield A.formData():N=yield A.text(),{data:N,error:null,response:A}}catch(d){return{data:null,error:d,response:d instanceof Fy||d instanceof Ky?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const Y0=3,Yy=t=>Math.min(1e3*2**t,3e4),dA=[520,503],Q0=["GET","HEAD","OPTIONS"];var Qy=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
12de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Jy(t,e){return new Promise(s=>{if(e?.aborted){s();return}const a=setTimeout(()=>{e?.removeEventListener("abort",l),s()},t);function l(){clearTimeout(a),s()}e?.addEventListener("abort",l)})}function pA(t,e,s,a){return!(!a||s>=Y0||!Q0.includes(t)||!dA.includes(e))}var gA=class{constructor(t){var e,s,a,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(s=t.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(a=t.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(l=t.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=t.retry)!==null&&u!==void 0?u:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let u=(async()=>{let c=0;for(;;){const g=new Headers(s.headers);c>0&&g.set("X-Retry-Count",String(c));let y;try{y=await a(s.url.toString(),{method:s.method,headers:g,body:JSON.stringify(s.body,(m,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!Q0.includes(s.method))throw m;if(s.retryEnabled&&c<Y0){const b=Yy(c);c++,await Jy(b,s.signal);continue}throw m}if(pA(s.method,y.status,c,s.retryEnabled)){var d,p;const m=(d=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:Yy(c);await y.text(),c++,await Jy(b,s.signal);continue}return await s.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",g="",y="";const m=c?.cause;if(m){var b,_,S,O;const M=(b=m?.message)!==null&&b!==void 0?b:"",j=(_=m?.code)!==null&&_!==void 0?_:"";p=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(O=m?.name)!==null&&O!==void 0?O:"Error"}: ${M}`,j&&(p+=` (${j})`),m?.stack&&(p+=` 15${m.stack}`)}else{var E;p=(E=c?.stack)!==null&&E!==void 0?E:""}const A=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",A>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${A} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(m?.name==="HeadersOverflowError"||m?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",g="HTTP headers exceeded server limits (typically 16KB)",A>this.urlLengthLimit&&(g+=`. Your request URL is ${A} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(t,e)}async processResponse(t){var e=this;
15let s=null,a=null,l=null,u=t.status,c=t.statusText;if(t.ok){var d,p;if(e.method!=="HEAD"){var g;const b=await t.text();if(b!=="")if(e.headers.get("Accept")==="text/csv")a=b;else if(e.headers.get("Accept")&&(!((g=e.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(s={message:b},a=null,e.shouldThrowOnError)throw new Qy({message:b,details:"",hint:"",code:""})}}const y=(d=e.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),m=(p=t.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&m&&m.length>1&&(l=parseInt(m[1])),e.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await t.text();try{s=JSON.parse(y),Array.isArray(s)&&t.status===404&&(a=[],s=null,u=200,c="OK")}catch{t.status===404&&y===""?(u=204,c="No Content"):s={message:y}}if(s&&e.shouldThrowOnError)throw new Qy(s)}return{success:s===null,error:s,data:a,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},mA=class extends gA{select(t){let e=!1;const s=(t??"*").split("").map(a=>/\s/.test(a)&&!e?"":(a==='"'&&(e=!e),a)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:s,foreignTable:a,referencedTable:l=a}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${t}.${e?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:s=e}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${t}`),this}range(t,e,{foreignTable:s,referencedTable:a=s}={}){const l=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${t}`),this.url.searchParams.set(u,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:s=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const d=[t?"analyze":null,e?"verbose":null,s?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${d};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Xy=new RegExp("[,()]");var Ia=class extends mA{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const s=Array.from(new Set(e)).map(a=>
15typeof a=="string"&&Xy.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`in.(${s})`),this}notIn(t,e){const s=Array.from(new Set(e)).map(a=>typeof a=="string"&&Xy.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`not.in.(${s})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:s,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(t,`${l}fts${u}.${e}`),this}match(t){return Object.entries(t).filter(([e,s])=>s!==void 0).forEach(([e,s])=>{this.url.searchParams.append(e,`eq.${s}`)}),this}not(t,e,s){return this.url.searchParams.append(t,`not.${e}.${s}`),this}or(t,{foreignTable:e,referencedTable:s=e}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${t})`),this}filter(t,e,s){return this.url.searchParams.append(t,`${e}.${s}`),this}},yA=class{constructor(t,{headers:e={},schema:s,fetch:a,urlLengthLimit:l=8e3,retry:u}){this.url=t,this.headers=new Headers(e),this.schema=s,this.fetch=a,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:s=!1,count:a}=e??{},l=s?"HEAD":"GET";let u=!1;const c=(t??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:d,headers:p}=this.cloneRequestState();return d.searchParams.set("select",c),a&&p.append("Prefer",`count=${a}`),new Ia({method:l,url:d,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:s=!0}={}){var a;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),s||c.append("Prefer","missing=default"),Array.isArray(t)){const d=t.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(d.length>0){const p=[...new Set(d)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new Ia({method:l,url:u,headers:c,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:s=!1,count:a,defaultToNull:l=!0}={}){var u;const c="POST",{url:d,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),e!==void 0&&d.searchParams.set("on_conflict",e),a&&p.append("Prefer",`count=${a}`),l||p.append("Prefer","missing=default"),Array.isArray(t)){const g=t.reduce((y,m)=>y.concat(Object.keys(m)),[]);if(g.length>0){const y=[...new Set(g)].map(m=>`"${m}"`);d.searchParams.set("columns",y.join(","))}}return new Ia({method:c,url:d,headers:p,schema:this.schema,body:t,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var s;const a="PATCH",{url:l,headers:u}=this.cloneRequestState();return e&&u.append("Prefer",`count=${e}`),new Ia({method:a,url:l,headers:u,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const s="DELETE",{url:a,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new Ia({method:s,url:a,headers:l,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function uo(t){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uo(t)}function vA(t,e){if(uo(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var a=s.call(t,e);if(uo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bA(t){var e=vA(t,"string");return uo(e)=="symbol"?e:e+""}function _A(t,e,s){return(e=bA(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Zy(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,a)}return s}function Il(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};
15e%2?Zy(Object(s),!0).forEach(function(a){_A(t,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Zy(Object(s)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(s,a))})}return t}var wA=class J0{constructor(e,{headers:s={},schema:a,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:d}={}){this.url=e,this.headers=new Headers(s),this.schemaName=a,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,y)=>{const m=new AbortController,b=setTimeout(()=>m.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,y);const S=()=>{clearTimeout(b),m.abort()};return _.addEventListener("abort",S,{once:!0}),p(g,Il(Il({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return p(g,Il(Il({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=d}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new yA(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new J0(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,s={},{head:a=!1,get:l=!1,count:u}={}){var c;let d;const p=new URL(`${this.url}/rpc/${e}`);let g;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),m=a&&Object.values(s).some(y);m?(d="POST",g=s):a||l?(d=a?"HEAD":"GET",Object.entries(s).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{p.searchParams.append(_,S)})):(d="POST",g=s);const b=new Headers(this.headers);return m?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new Ia({method:d,url:p,headers:b,schema:this.schemaName,body:g,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class SA{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const u=l.versions;if(u&&u.node){const c=u.node,d=parseInt(c.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let s=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(s+=` 18 19Suggested solution: ${e.workaround}`),new Error(s)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const EA="2.107.0",TA=`realtime-js/${EA}`,RA="1.0.0",X0="2.0.0",AA=X0,OA=1e4,xA=100,Xr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Z0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Af={connecting:"connecting",closing:"closing",closed:"closed"};class CA{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,s){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(e));let a=[e.join_ref,e.ref,e.topic,e.event,e.payload];return s(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(e){var s;return this._isArrayBuffer((s=e.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var s,a;const l=(a=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(e){var s,a;const l=(a=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,s,a){var l,u;
19const c=e.topic,d=(l=e.ref)!==null&&l!==void 0?l:"",p=(u=e.join_ref)!==null&&u!==void 0?u:"",g=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},m=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`metadata length ${m.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+d.length+c.length+g.length+m.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),O=0;S.setUint8(O++,this.KINDS.userBroadcastPush),S.setUint8(O++,p.length),S.setUint8(O++,d.length),S.setUint8(O++,c.length),S.setUint8(O++,g.length),S.setUint8(O++,m.length),S.setUint8(O++,s),Array.from(p,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(d,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(c,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(g,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(m,A=>S.setUint8(O++,A.charCodeAt(0)));var E=new Uint8Array(_.byteLength+a.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(a),_.byteLength),E.buffer}decode(e,s){if(this._isArrayBuffer(e)){let a=this._binaryDecode(e);return s(a)}if(typeof e=="string"){const a=JSON.parse(e),[l,u,c,d,p]=a;return s({join_ref:l,ref:u,topic:c,event:d,payload:p})}return s({})}_binaryDecode(e){const s=new DataView(e),a=s.getUint8(0),l=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,s,l)}_decodeUserBroadcast(e,s,a){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),d=s.getUint8(4);let p=this.HEADER_LENGTH+4;const g=a.decode(e.slice(p,p+l));p=p+l;const y=a.decode(e.slice(p,p+u));p=p+u;const m=a.decode(e.slice(p,p+c));p=p+c;const b=e.slice(p,e.byteLength),_=d===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(S.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var s;return e instanceof ArrayBuffer||((s=e?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(e,s){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([a])=>s.includes(a)))}}var $e;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})($e||($e={}));const Wy=(t,e,s={})=>{var a;const l=(a=s.skipTypes)!==null&&a!==void 0?a:[];return e?Object.keys(e).reduce((u,c)=>(u[c]=kA(c,t,e,l),u),{}):{}},kA=(t,e,s,a)=>{const l=e.find(d=>d.name===t),u=l?.type,c=s[t];return u&&!a.includes(u)?W0(u,c):Of(c)},W0=(t,e)=>{if(t.charAt(0)==="_"){const s=t.slice(1,t.length);return NA(e,s)}switch(t){case $e.bool:return jA(e);case $e.float4:case $e.float8:case $e.int2:case $e.int4:case $e.int8:case $e.numeric:case $e.oid:return MA(e);case $e.json:case $e.jsonb:return DA(e);case $e.timestamp:return UA(e);case $e.abstime:case $e.date:case $e.daterange:case $e.int4range:case $e.int8range:case $e.money:case $e.reltime:case $e.text:case $e.time:case $e.timestamptz:case $e.timetz:case $e.tsrange:case $e.tstzrange:return Of(e);default:return Of(e)}},Of=t=>t,jA=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},MA=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},DA=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},NA=(t,e)=>{if(typeof t!="string")return t;const s=t.length-1,a=t[s];if(t[0]==="{"&&a==="}"){let u;const c=t.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(d=>W0(e,d))}return t},UA=t=>typeof t=="string"?t.replace(" ","T"):t,eb=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var to=t=>typeof t=="function"?t:function(){return t},LA=typeof self<"u"?self:null,Ha=typeof window<"u"?window:null,$n=LA||Ha||globalThis,PA="2.0.0",zA=1e4,BA=1e3,Gn={connecting:0,open:1,closing:2,closed:3},Ft={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},yr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},xf={longpoll:"longpoll",websocket:"websocket"},IA={complete:4},Cf="base64url.bearer.phx.",Hl=class{constructor(t,e,s,a){this.channel=t,this.event=e,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 19
19oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:s}){this.recHooks.filter(a=>a.status===t).forEach(a=>a.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},tb=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},HA=class{constructor(t,e,s){this.state=Ft.closed,this.topic=t,this.params=to(e||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Hl(this,yr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new tb(()=>{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 Hl(this,yr.leave,to({}),this.timeout).send(),this.state=Ft.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(yr.reply,(a,l)=>{this.trigger(this.replyEventName(l),a)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ft.closed,this.bindings=[]}onClose(t){this.on(yr.close,t)}onError(t){return this.on(yr.error,e=>t(e))}on(t,e){let s=this.bindingRef++;return this.bindings.push({event:t,ref:s,callback:e}),s}off(t,e){this.bindings=this.bindings.filter(s=>!(s.event===t&&(typeof e>"u"||e===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,s=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new Hl(this,t,function(){return e},s);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ft.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(yr.close,"leave")},s=new Hl(this,yr.leave,to({}),t);return s.receive("ok",()=>e()).receive("timeout",()=>e()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(t,e,s){return e}filterBindings(t,e,s){return!0}isMember(t,e,s,a){return this.topic!==t?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:s,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ft.joining,this.joinPush.resend(t))}trigger(t,e,s,a){let l=this.onMessage(t,e,s,a);if(e&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===t&&this.filterBindings(c,e,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,a||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}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}},uu=class{static request(t,e,s,a,l,u,c){if($n.XDomainRequest){let d=new $n.XDomainRequest;return this.xdomainRequest(d,t,e,a,l,u,c)}else if($n.XMLHttpRequest){let d=new $n.XMLHttpRequest;return this.xhrRequest(d,t,e,s,a,l,u,c)}else{if($n.fetch&&$n.AbortController)return this.fetchRequest(t,e,s,a,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,s,a,l,u,c){let d={method:t,headers:s,body:a},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),d.signal=p.signal),$n.fetch(e,d).then(g=>g.text()).then(g=>this.parseJSON(g)).then(g=>c&&c(g)).catch(g=>{g.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(t,e,s,a,l,u,c){return t.timeout=l,t.open(e,s),t.onload=()=>{let d=this.parseJSON(t.responseText);c&&c(d)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(a),t}static xhrRequest(t,e,s,a,l,u,c,d){t.open(e,s,!0),t.timeout=u;for(let[p,g]of Object.entries(a))t.setRequestHeader(p,g);return t.onerror=()=>d&&d(null),t.onreadystatechange=()=>{if(t.readyState===IA.complete&&d){let p=this.parseJSON(t.responseText);d(p)}},c&&(t.ontimeout=c),t.send(l),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let s=[];for(var a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let l=e?`${e}[${a}]`:a,u=t[a];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let s=t.match(/\?/)?"&":"?";return`${t}${s}${this.serialize(e)}`}},qA=t=>{let e="",s=new Uint8Array(t),a=s.byteLength;for(let l=0;l<a;l++)e+=String.fromCharCode(s[l]);return btoa(e)},Na=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Cf)&&(this.authToken=atob(e[1].slice(Cf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Gn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+xf.websocket),"$1/"+xf.longpoll)}endpointURL(){return uu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,s){this.close(t,e,s),this.readyState=Gn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Gn.open||this.readyState===Gn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:s,token:a,messages:l}=e;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Gn.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 ${s}`)}})}send(t){typeof t!="string"&&(t=qA(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 20`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,s){for(let l of this.reqs)l.abort();this.readyState=Gn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(t,e,s,a,l){let u,c=()=>{this.reqs.delete(u),a()};u=uu.request(t,this.endpointURL(),e,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},$A=class Zi{constructor(e,s={}){let a=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Zi.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Zi.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],d()}),this.channel.on(a.diff,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Zi.syncDiff(this.state,l,u,c),d())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Zi.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,s,a,l){let u=this.clone(e),c={},d={};return this.map(u,(p,g)=>{s[p]||(d[p]=g)}),this.map(s,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(O=>O.phx_ref),b=y.metas.map(O=>O.phx_ref),_=g.metas.filter(O=>b.indexOf(O.phx_ref)<0),S=y.metas.filter(O=>m.indexOf(O.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),S.length>0&&(d[p]=this.clone(y),d[p].metas=S)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:d},a,l)}static syncDiff(e,s,a,l){let{joins:u,leaves:c}=this.clone(s);return a||(a=function(){}),l||(l=function(){}),this.map(u,(d,p)=>{let g=e[d];if(e[d]=this.clone(p),g){let y=e[d].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);e[d].metas.unshift(...m)}a(d,g,p)}),this.map(c,(d,p)=>{let g=e[d];if(!g)return;let y=p.metas.map(m=>m.phx_ref);g.metas=g.metas.filter(m=>y.indexOf(m.phx_ref)<0),l(d,g,p),g.metas.length===0&&delete e[d]}),e}static list(e,s){return s||(s=function(a,l){return l}),this.map(e,(a,l)=>s(a,l))}static map(e,s){return Object.getOwnPropertyNames(e).map(a=>s(a,e[a]))}static clone(e){return JSON.parse(JSON.stringify(e))}},ql={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(s))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[s,a,l,u,c]=JSON.parse(t);return e({join_ref:s,ref:a,topic:l,event:u,payload:c})}},binaryEncode(t){let{join_ref:e,ref:s,event:a,topic:l,payload:u}=t,c=this.META_LENGTH+e.length+s.length+l.length+a.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(d),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,e.length),p.setUint8(g++,s.length),p.setUint8(g++,l.length),p.setUint8(g++,a.length),Array.from(e,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(s,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(l,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(a,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(d.byteLength+u.byteLength);return y.set(new Uint8Array(d),0),y.set(new Uint8Array(u),d.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),s=e.getUint8(0),a=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(t,e,a);case this.KINDS.reply:return this.decodeReply(t,e,a);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,a)}},decodePush(t,e,s){let a=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=s.decode(t.slice(c,c+a));c=c+a;let p=s.decode(t.slice(c,c+l));c=c+l;let g=s.decode(t.slice(c,c+u));c=c+u;let y=t.slice(c,t.byteLength);return{join_ref:d,ref:null,topic:p,event:g,payload:y}},decodeReply(t,e,s){let a=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=e.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(t.slice(d,d+a));d=d+a;let g=s.decode(t.slice(d,d+l));d=d+l;let y=s.decode(t.slice(d,d+u));d=d+u;let m=s.decode(t.slice(d,d+c));d=d+c;let b=t.slice(d,t.byteLength),_={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:yr.reply,payload:_}},decodeBroadcast(t,e,s){let a=e.getUint8(1),l=e.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(t.slice(u,u+a));u=u+a;let d=s.decode(t.slice(u,u+l));u=u+l;let p=t.slice(u,t.byteLength);return{join_ref:null,ref:null,topic:c,event:d,payload:p}}},VA=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||zA,this.transport=e.transport||$n.WebSocket||Na,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=$n&&$n.sessionStorage}catch{}this.sessionStore=e.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=ql.encode.bind(ql),this.defaultDecoder=ql.decode.bind(ql),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Na?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;Ha&&Ha.addEventListener&&(Ha.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),Ha.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),Ha.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>e.rejoinAfterMs?e.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>e.reconnectAfterMs?e.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=to(e.params||{}),this.endPoint=`${t}/${xf.websocket}`,this.vsn=e.vsn||PA,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new tb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Na}replaceTransport(t){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=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=uu.appendParams(uu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,s)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=to(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Na?this.connectWithFallback(Na,this.longPollFallbackMs):this.transportConnect())}log(t,e,s){this.logger&&this.logger(t,e,s)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let a=this.onMessage(l=>{l.ref===e&&(this.off([a]),t(Date.now()-s))});return!0}transportName(t){return t===Na?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Cf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let s=!1,a=!0,l,u,c=this.transportName(t),d=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),a=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,e),u=this.onError(p=>{this.log("transport","error",p),a&&!s&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!a){let p=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,e),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),BA,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,s){if(!this.conn)return t&&t();const a=this.conn;this.waitForBufferDone(a,()=>{e?a.close(e,s||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,785 bytes, line 20
20,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,s=1){if(s===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,s+1)},150*s)}waitForSocketClosed(t,e,s=1){if(s===5||t.readyState===Gn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,s+1)},150*s)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",t,e,s),(e===this.transport||s>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(yr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Gn.connecting:return"connecting";case Gn.open:return"open";case Gn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([s])=>t.indexOf(s)===-1)}channel(t,e={}){let s=new HA(t,e,this);return this.channels.push(s),s}push(t){if(this.hasLogger()){let{topic:e,event:s,payload:a,ref:l,join_ref:u}=t;this.log("push",`${e} ${s} (${u}, ${l})`,a)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:s,event:a,payload:l,ref:u,join_ref:c}=e;if(u&&u===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",d)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${a} ${u&&"("+u+")"||""}`.trim(),l);for(let d=0;d<this.channels.length;d++){const p=this.channels[d];p.isMember(s,a,l,c)&&p.trigger(a,l,u,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([s,a])=>{try{a(...e)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(s){this.log("error",`error triggering ${t} callbacks`,s)}}leaveOpenTopic(t){let e=this.channels.find(s=>s.topic===t&&(s.isJoined()||s.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class no{constructor(e,s){const a=KA(s);this.presence=new $A(e.getChannel(),a),this.presence.onJoin((l,u,c)=>{const d=no.onJoinPayload(l,u,c);e.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=no.onLeavePayload(l,u,c);e.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return no.transformState(this.presence.state)}static transformState(e){return e=GA(e),Object.getOwnPropertyNames(e).reduce((s,a)=>{const l=e[a];return s[a]=tu(l),s},{})}static onJoinPayload(e,s,a){const l=ev(s),u=tu(a);return{event:"join",key:e,currentPresences:l,newPresences:u}}static onLeavePayload(e,s,a){const l=ev(s),u=tu(a);return{event:"leave",key:e,currentPresences:l,leftPresences:u}}}function tu(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function GA(t){return JSON.parse(JSON.stringify(t))}function KA(t){return t?.events&&{events:t.events}}function ev(t){return t?.metas?tu(t):[]}var tv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(tv||(tv={}));class FA{get state(){return this.presenceAdapter.state}constructor(e,s){this.channel=e,this.presenceAdapter=new no(this.channel.channelAdapter,s
20)}}function YA(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;if(typeof e.code=="number"){const s=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${s}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class QA{constructor(e,s,a){const l=JA(a);this.channel=e.getSocket().channel(s,l),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,s){return this.channel.on(e,s)}off(e,s){this.channel.off(e,s)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,s,a){let l;try{l=this.channel.push(e,s,a)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>xA){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return l}updateJoinPayload(e){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),e)}canPush(){return this.socket.isConnected()&&this.state===Xr.joined}isJoined(){return this.state===Xr.joined}isJoining(){return this.state===Xr.joining}isClosed(){return this.state===Xr.closed}isLeaving(){return this.state===Xr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function JA(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var nv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(nv||(nv={}));var Va;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Va||(Va={}));var vr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(vr||(vr={}));class ro{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,s={config:{}},a){var l,u;if(this.topic=e,this.params=s,this.socket=a,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new QA(this.socket.socketAdapter,e,this.params),this.presence=new FA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=eb(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,s=this.timeout){var a,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:p}}=this.params,g=(l=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[Va.PRESENCE]&&this.bindings[Va.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,m={},b={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(vr.CHANNEL_ERROR,YA(_))}),this._onClose(()=>e?.(vr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(vr.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=Xr.errored;const S=Object.values(_).join(", ")||"error";e?.(vr.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e?.(vr.TIMED_OUT)})}return this}_updatePostgresBindings(e,s){var a;const l=this.bindings.postgres_changes,u=(a=l?.length)!==null&&a!==void 0?a:0,c=[];for(let d=0;d<u;d++){const p=l[d],{filter:{event:g,schema:y,table:m,filter:b}}=p,_=e&&e[d];if(_&&_.event===g&&ro.isFilterValueEqual(_.schema,y)&&ro.isFilterValueEqual(_.table,m)&&ro.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Xr.errored,s?.(vr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Xr.errored&&s&&s(vr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,s={}){return await this.send({type:"presence",event:"track",payload:e},s.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,s,a){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===Va.PRESENCE||e===Va.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,s,a)}async httpSend(e,s,a={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=s instanceof ArrayBuffer||ArrayBuffer.isView(s),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":u?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&d.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?s:JSON.stringify(s)},g=await this._fetchWithTimeout(d.toString(),p,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);if(g.status===202)return{success:!0};let y=g.statusText;try{const m=await g.json();y=m.error||m.message||y}catch{}return Promise.reject(new Error(y))}async send(e,s={}){var a,l;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=e,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=s.timeout)!==null&&a!==void 0?a:this.timeout);return await((l=g.body)===null||l===void 0?void 0:l.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,d,p;const g=this.channelAdapter.push(e.type,e,s.timeout||this.timeout);e.type==="broadcast"&&!(!((p=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,s,a){const l=new AbortController,u=setTimeout(()=>l.abort(),a),c=await this.socket.fetch(e,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(e,s,a){const l=e.toLocaleLowerCase(),u=this.channelAdapter.on(e,a),c={type:l,filter:s,callback:a,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,s,a)=>{var l,u,c,d,p,g,y;const m=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,a))return!1;const b=(l=this.bindings[m])===null||l===void 0?void 0:l.find(_=>_.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const _=b.id,S=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((d=s.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((y=s?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===m})}_notThisChannelEvent(e,s){const{close:a,error:l,leave:u,join:c}=Z0;return s&&[a,l,u,c].includes(e)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,s,a)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:d,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:d,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return s})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in e.bindings)for(const a of e.bindings[s])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(e,s){return(e??void 0)===(s??void 0)}_getPayloadRecords(e){const s={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(s.new=Wy(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(s.old=Wy(e.columns,e.old_record)),s}}class XA{constructor(e,s){this.socket=new VA(e,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,s,a,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{e(),u("ok")},s,a)})}push(e){this.socket.push(e)}log(e,s,a){this.socket.log(e,s,a)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Af.connecting}isDisconnecting(){return this.socket.connectionState()==Af.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const rv={HEARTBEAT_INTERVAL:25e3},ZA=[1e3,2e3,5e3,1e4],WA=1e4;function eO(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var s;return(s=Array.from(t.keys())[e])!==null&&s!==void 0?s:null},removeItem(e){t.delete(e)},setItem(e,s){t.set(e,String(s))}}}function tO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return eO()}const nO=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class rO{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,s){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 CA,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((a=s?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new XA(e,l),this.httpEndpoint=eb(e),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const s=e.message;throw s.includes("Node.js")?new Error(`${s} 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: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,s)}getChannels(){return this.channels}async removeChannel(e){const s=await e.unsubscribe();return s==="ok"&&e.teardown(),s}async removeAllChannels(){const e=this.channels.map(async a=>{const l=await a.unsubscribe();return a.teardown(),l}),s=await Promise.all(e);return await this.disconnect(),s}log(e,s,a){this.socketAdapter.log(e,s,a)}connectionState(){return this.socketAdapter.connectionState()||Af.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,s={config:{}}){const a=`realtime:${e}`,l=this.getChannels().find(u=>u.topic===a);if(l)return l;{const u=new ro(`realtime:${e}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(s=>s.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let s,a=!1;if(e)s=e,a=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),s=this.accessTokenValue}else s=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(l=>{const u={access_token:s,version:TA};s&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(Z0.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${e}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(s,a)=>{s=="sent"&&this._setAuthSafely(),e&&e(s,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let s;if(e)s=e;else{const a=new Blob([nO],{type:"application/javascript"});s=URL.createObjectURL(a)}return s}_initializeOptions(e){var s,a,l,u,c,d,p,g,y,m,b,_;this.worker=(s=e?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=e?.accessToken)!==null&&a!==void 0?a:null;const S={};S.timeout=(l=e?.timeout)!==null&&l!==void 0?l:OA,S.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:rv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=e?.heartbeatIntervalMs)!==null&&d!==void 0?d:rv.HEARTBEAT_INTERVAL),S.transport=(p=e?.transport)!==null&&p!==void 0?p:SA.getWebSocketConstructor(),S.params=e?.params,S.logger=e?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),S.sessionStorage=(g=e?.sessionStorage)!==null&&g!==void 0?g:tO(),S.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(M=>ZA[M-1]||WA);let O,E;const A=(m=e?.vsn)!==null&&m!==void 0?m:AA;switch(A){case RA:O=(M,j)=>j(JSON.stringify(M)),E=(M,j)=>j(JSON.parse(M));break;case X0:O=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=A,S.encode=(b=e?.encode)!==null&&b!==void 0?b:O,S.decode=(_=e?.decode)!==null&&_!==void 0?_:E,S.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var co=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function sO(t,e,s){const a=new URL(e,t);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&a.searchParams.set(l,u);return a.toString()}async function aO(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function iO(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:s,path:a,query:l,body:u,headers:c}){const d=sO(t.baseUrl,a,l),p=await aO(t.auth),g=await e(d,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await g.text(),m=(g.headers.get("content-type")||"").includes("application/json"),b=m&&y?JSON.parse(y):y;if(!g.ok){const _=m?b:void 0,S=_?.error;throw new co(S?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function $l(t){return t.join("�")}var oO=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:$l(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(t,e){const s={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${$l(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${$l(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${$l(t.namespace)}`}),!0}catch(e){if(e instanceof co&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(s){if(s instanceof co&&s.status===409)return;throw s}}};function Ua(t){return t.join("�")}var lO=class{constructor(t,e="",s){this.client=t,this.prefix=e,this.accessDelegation=s}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables`,body:e,headers:s})).data.metadata}async updateTable(t,e){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ua(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(s){if(s instanceof co&&s.status===404)return!1;throw s}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(s){if(s instanceof co&&s.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw s}}},uO=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const s=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=iO({baseUrl:s,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new oO(this.client,e),this.tableOps=new lO(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
38async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function ho(t){"@babel/helpers - typeof";return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ho(t)}function cO(t,e){if(ho(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var a=s.call(t,e);if(ho(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hO(t){var e=cO(t,"string");return ho(e)=="symbol"?e:e+""}function fO(t,e,s){return(e=hO(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function sv(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,a)}return s}function fe(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?sv(Object(s),!0).forEach(function(a){fO(t,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):sv(Object(s)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(s,a))})}return t}var Ou=class extends Error{constructor(t,e="storage",s,a){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function xu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var kf=class extends Ou{constructor(t,e,s,a="storage"){super(t,a,e,s),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=s}toJSON(){return fe({},super.toJSON())}},nb=class extends Ou{constructor(t,e,s="storage"){super(t,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function cu(t,e,s){const a=fe({},t),l=e.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===l&&delete a[u];return a[l]=s,a}function dO(t){const e={};for(const[s,a]of Object.entries(t))e[s.toLowerCase()]=a;return e}const pO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),gO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},jf=t=>{if(Array.isArray(t))return t.map(s=>jf(s));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([s,a])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[l]=jf(a)}),e},mO=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),av=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const s=e.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(t)},yO=async(t,e,s,a)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const l=t;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const d=c?.statusCode||c?.code||u+"";e(new kf(av(c),u,d,a))}).catch(()=>{const c=u+"";e(new kf(l.statusText||`HTTP ${u} error`,u,c,a))})}else e(new nb(av(t),t,a))},vO=(t,e,s,a)=>{const l={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!a)return fe(fe({},l),s);if(gO(a)){var u;const c=e?.headers||{};let d;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(d=g);l.headers=cu(c,"Content-Type",(u=d)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(a)}else l.body=a;return e?.duplex&&(l.duplex=e.duplex),fe(fe({},l),s)};async function Ji(t,e,s,a,l,u,c){return new Promise((d,p)=>{t(s,vO(e,a,l,u)).then(g=>{if(!g.ok)throw g;if(a?.noResolveJson)return g;if(c==="vectors"){const y=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!y||!y.includes("application/json"))return{}}return g.json()}).then(g=>d(g)).catch(g=>yO(g,p,a,c))})}function rb(t="storage"){return{get:async(e,s,a,l)=>Ji(e,"GET",s,a,l,void 0,t),post:async(e,s,a,l,u)=>Ji(e,"POST",s,l,u,a,t),put:async(e,s,a,l,u)=>Ji(e,"PUT",s,l,u,a,t),head:async(e,s,a,l)=>Ji(e,"HEAD",s,fe(fe({},a),{},{noResolveJson:!0}),l,void 0,t),remove:async(e,s,a,l,u)=>Ji(e,"DELETE",s,l,u,a,t)}}const bO=rb("storage"),{get:fo,post:kn,put:Mf,head:_O,remove:ed}=bO,on=rb("vectors");var Ja=class{constructor(t,e={},s,a="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=dO(e),this.fetch=pO(s),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=cu(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(xu(s))return{data:null,error:s};throw s}}};let sb;sb=Symbol.toStringTag;var wO=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[sb]="StreamDownloadBuilder",this.promise=null}
38then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(xu(e))return{data:null,error:e};throw e}}};let ab;ab=Symbol.toStringTag;var SO=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[ab]="BlobDownloadBuilder",this.promise=null}asStream(){return new wO(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(xu(e))return{data:null,error:e};throw e}}};const EO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},iv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var TO=class extends Ja{constructor(t,e={},s,a){super(t,e,a,"storage"),this.bucketId=s}async uploadOrUpdate(t,e,s,a){var l=this;return l.handleOperation(async()=>{let u;const c=fe(fe({},iv),a);let d=fe(fe({},l.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&s instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",s)):typeof FormData<"u"&&s instanceof FormData?(u=s,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=s,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,p&&(d["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))d=cu(d,b,_);const g=l._removeEmptyFolders(e),y=l._getFinalPath(g),m=await(t=="PUT"?Mf:kn)(l.fetch,`${l.url}/object/${y}`,u,fe({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(t,e,s){return this.uploadOrUpdate("POST",t,e,s)}async uploadToSignedUrl(t,e,s,a){var l=this;const u=l._removeEmptyFolders(t),c=l._getFinalPath(u),d=new URL(l.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",e),l.handleOperation(async()=>{let p;const g=fe(fe({},iv),a);let y=fe(fe({},l.headers),{"x-upsert":String(g.upsert)});const m=g.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),m&&p.append("metadata",l.encodeMetadata(m)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),m&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(m))):(p=s,y["cache-control"]=`max-age=${g.cac
38heControl}`,y["content-type"]=g.contentType,m&&(y["x-metadata"]=l.toBase64(l.encodeMetadata(m))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!g.duplex&&(g.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))y=cu(y,b,_);return{path:u,fullPath:(await Mf(l.fetch,d.toString(),p,fe({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(t);const l=fe({},s.headers);e?.upsert&&(l["x-upsert"]="true");const u=await kn(s.fetch,`${s.url}/object/upload/sign/${a}`,{},{headers:l}),c=new URL(s.url+u.url),d=c.searchParams.get("token");if(!d)throw new Ou("No token returned by API");return{signedUrl:c.toString(),path:t,token:d}})}async update(t,e,s){return this.uploadOrUpdate("PUT",t,e,s)}async move(t,e,s){var a=this;return a.handleOperation(async()=>await kn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:s?.destinationBucket},{headers:a.headers}))}async copy(t,e,s){var a=this;return a.handleOperation(async()=>({path:(await kn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:s?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(t,e,s){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(t);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await kn(a.fetch,`${a.url}/object/sign/${l}`,fe({expiresIn:e},u?{transform:s.transform}:{}),{headers:a.headers});const d=new URLSearchParams;s?.download&&d.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&d.set("cacheNonce",String(s.cacheNonce));const p=d.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(t,e,s){var a=this;return a.handleOperation(async()=>{const l=await kn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:e,paths:t},{headers:a.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const c=u.toString();return l.map(d=>fe(fe({},d),{},{signedUrl:d.signedURL?encodeURI(`${a.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(t,e,s){const a=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(l,e.transform),e?.cacheNonce!=null&&l.set("cacheNonce",String(e.cacheNonce));const u=l.toString(),c=this._getFinalPath(t),d=()=>fo(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new SO(d,this.shouldThrowOnError)}async info(t){var e=this;const s=e._getFinalPath(t);return e.handleOperation(async()=>jf(await fo(e.fetch,`${e.url}/object/info/${s}`,{headers:e.headers})))}async exists(t){var e=this;const s=e._getFinalPath(t);try{return await _O(e.fetch,`${e.url}/object/${s}`,{headers:e.headers}),{data:!0,error:null}}catch(l){if(e.shouldThrowOnError)throw l;if(xu(l)){var a;const u=l instanceof kf?l.status:l instanceof nb?(a=l.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(t,e){const s=this._getFinalPath(t),a=new URLSearchParams;e?.download&&a.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(a,e.transform),e?.cacheNonce!=null&&a.set("cacheNonce",String(e.cacheNonce));const l=a.toString(),u=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await ed(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,s){var a=this;return a.handleOperation(async()=>{const l=fe(fe(fe({},EO),e),{},{prefix:t||""});return await kn(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},s)})}async listV2(t,e){var s=this;return s.handleOperation(async()=>{const a=fe({},t);return await kn(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,a,{headers:s.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
38ity",e.quality.toString()),t}};const RO="2.107.0",wo={"X-Client-Info":`storage-js/${RO}`};var AO=class extends Ja{constructor(t,e={},s,a){const l=new URL(t);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),c=fe(fe({},wo),e);super(u,c,s,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const s=e.listBucketOptionsToQueryString(t);return await fo(e.fetch,`${e.url}/bucket${s}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await fo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var s=this;return s.handleOperation(async()=>await kn(s.fetch,`${s.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:s.headers}))}async updateBucket(t,e){var s=this;return s.handleOperation(async()=>await Mf(s.fetch,`${s.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await kn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await ed(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},OO=class extends Ja{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},wo),e);super(a,l,s,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await kn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const s=new URLSearchParams;t?.limit!==void 0&&s.set("limit",t.limit.toString()),t?.offset!==void 0&&s.set("offset",t.offset.toString()),t?.sortColumn&&s.set("sortColumn",t.sortColumn),t?.sortOrder&&s.set("sortOrder",t.sortOrder),t?.search&&s.set("search",t.search);const a=s.toString(),l=a?`${e.url}/bucket?${a}`:`${e.url}/bucket`;return await fo(e.fetch,l,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await ed(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!mO(t))throw new Ou("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new uO({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(l,d),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},xO=class extends Ja{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},wo),{},{"Content-Type":"application/json"},e);super(a,l,s,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var s=this;return s.handleOperation(async()=>await on.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:s.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var s=this;return s.handleOperation(async()=>await on.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:s.headers})||{})}},CO=class extends Ja{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},wo),{},{"Content-Type":"application/json"},e);super(a,l,s,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},kO=class extends Ja{constructor(t,e={},s){const a=t.replace(/\/$/,""),l=fe(fe({},wo),{},{"Content-Type":"application/json"},e);super(a,l,s,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await on.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},jO=class extends kO{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new MO(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,s=this;return e().call(s,t)}async getBucket(t){var e=()=>super.getBucket,s=this;return e().call(s,t)}async listBuckets(t={}){var e=()=>super.listBuckets,s=this;return e().call(s,t)}async deleteBucket(t){var e=()=>super.deleteBucket,s=this;return e().call(s,t)}},MO=class extends xO{constructor(t,e,s,a){super(t,e,a),this.vectorBucketName=s}async createIndex(t){var e=()=>super.createIndex,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,s=this;return e().call(s,s.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,s=this;return e().call(s,s.vectorBucketName,t)}index(t){return new DO(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},DO=class extends CO{constructor(t,e,s,a,l){super(t,e,l),this.vectorBucketName=s,this.indexName=a}async putVectors(t){var e=()=>super.putVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(t){var e=()=>super.getVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,s=this;return e().call(s,fe(fe({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},NO=class extends AO{constructor(t,e={},s,a){super(t,e,s,a)}from(t){return new TO(this.url,this.headers,t,this.fetch)}get vectors(){return new jO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new OO(this.url+"/iceberg",this.headers,this.fetch)}};const ib="2.107.0",Yr=30*1e3,Wi=3,lf=Wi*Yr,UO="http://localhost:9999",LO="supabase.auth.token",PO={"X-Client-Info":`gotrue-js/${ib}`},Df="X-Supabase-Api-Version",ob={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},zO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,BO=600*1e3;class po extends Error{constructor(e,s,a){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function te(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class IO extends po{constructor(e,s,a){super(e,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function HO(t){return te(t)&&t.name==="AuthApiError"}class Mn extends po{constructor(e,s){super(e),this.name="AuthUnknownError",this.originalError=s}}class Kn extends po{constructor(e,s,a,l){super(e,a,l),this.name=s,this.status=a}}class yt extends Kn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Vl(t){return te(t)&&t.name==="AuthSessionMissingError"}class La extends Kn{constructor(){super("Auth session or user missing","AuthInvalidToken
38ResponseError",500,void 0)}}class Gl extends Kn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Kl extends Kn{constructor(e,s=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function qO(t){return te(t)&&t.name==="AuthImplicitGrantRedirectError"}class ov extends Kn{constructor(e,s=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class $O extends Kn{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 Nf extends Kn{constructor(e,s){super(e,"AuthRetryableFetchError",s,void 0)}}function uf(t){return te(t)&&t.name==="AuthRetryableFetchError"}class lv extends Kn{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function VO(t){return te(t)&&t.name==="AuthRefreshDiscardedError"}class uv extends Kn{constructor(e,s,a){super(e,"AuthWeakPasswordError",s,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class hu extends Kn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),cv=` 39\r=`.split(""),GO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<cv.length;e+=1)t[cv[e].charCodeAt(0)]=-2;for(let e=0;e<fu.length;e+=1)t[fu[e].charCodeAt(0)]=e;return t})();function hv(t,e,s){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;s(fu[a]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;s(fu[a]),e.queuedBits-=6}}function lb(t,e,s){const a=GO[t];if(a>-1)for(e.queue=e.queue<<6|a,e.queuedBits+=6;e.queuedBits>=8;)s(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function fv(t){const e=[],s=c=>{e.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{YO(c,a,s)};for(let c=0;c<t.length;c+=1)lb(t.charCodeAt(c),l,u);return e.join("")}function KO(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function FO(t,e){for(let s=0;s<t.length;s+=1){let a=t.charCodeAt(s);if(a>55295&&a<=56319){const l=(a-55296)*1024&65535;a=(t.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}KO(a,e)}}function YO(t,e,s){if(e.utf8seq===0){if(t<=127){s(t);return}for(let a=1;a<6;a+=1)if((t>>7-a&1)===0){e.utf8seq=a;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&s(e.codepoint)}}function Ya(t){const e=[],s={queue:0,queuedBits:0},a=l=>{e.push(l)};for(let l=0;l<t.length;l+=1)lb(t.charCodeAt(l),s,a);return new Uint8Array(e)}function QO(t){const e=[];return FO(t,s=>e.push(s)),new Uint8Array(e)}function Bs(t){const e=[],s={queue:0,queuedBits:0},a=l=>{e.push(l)};return t.forEach(l=>hv(l,s,a)),hv(null,s,a),e.join("")}function JO(t){return Math.round(Date.now()/1e3)+t}function XO(){return Symbol("auth-callback")}const Ct=()=>typeof window<"u"&&typeof document<"u",Ds={tested:!1,writable:!1},ub=()=>{if(!Ct())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ds.tested)return Ds.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Ds.tested=!0,Ds.writable=!0}catch{Ds.tested=!0,Ds.writable=!1}return Ds.writable};function ZO(t){const e={},s=new URL(t);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEac
39h((l,u)=>{e[u]=l})}catch{}return s.searchParams.forEach((a,l)=>{e[l]=a}),e}const cb=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),WO=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",qa=async(t,e,s)=>{await t.setItem(e,JSON.stringify(s))},gr=async(t,e)=>{const s=await t.getItem(e);if(!s)return null;try{return JSON.parse(s)}catch{return null}},ut=async(t,e)=>{await t.removeItem(e)};class Cu{constructor(){this.promise=new Cu.promiseConstructor((e,s)=>{this.resolve=e,this.reject=s})}}Cu.promiseConstructor=Promise;function Fl(t){const e=t.split(".");if(e.length!==3)throw new hu("Invalid JWT structure");for(let a=0;a<e.length;a++)if(!zO.test(e[a]))throw new hu("JWT not in base64url format");return{header:JSON.parse(fv(e[0])),payload:JSON.parse(fv(e[1])),signature:Ya(e[2]),raw:{header:e[0],payload:e[1]}}}async function ex(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function tx(t,e){return new Promise((a,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await t(u);if(!e(u,null,c)){a(c);return}}catch(c){if(!e(u,c)){l(c);return}}})()})}function nx(t){return("0"+t.toString(16)).substr(-2)}function rx(){const e=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*a));return l}return crypto.getRandomValues(e),Array.from(e,nx).join("")}async function sx(t){const s=new TextEncoder().encode(t),a=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(a);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function ax(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const s=await sx(t);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Pa(t,e,s=!1){const a=rx();let l=a;s&&(l+="/recovery"),await qa(t,`${e}-code-verifier`,l);const u=await ax(a);return[u,a===u?"plain":"s256"]}const ix=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function ox(t){const e=t.headers.get(Df);if(!e||!e.match(ix))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function lx(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function ux(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const cx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function mr(t){if(!cx.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Cn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function cf(){const t={};return new Proxy(t,{get:(e,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function hx(t,e){return new Proxy(t,{get:(s,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
39if(typeof a=="symbol"){const u=a.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,a,l)}return!e.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(s,a,l)}})}function dv(t){return JSON.parse(JSON.stringify(t))}const Ns=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},fx=[502,503,504,520,521,522,523,524,530];async function pv(t){var e;if(!WO(t))throw new Nf(Ns(t),0);if(fx.includes(t.status))throw new Nf(Ns(t),t.status);let s;try{s=await t.json()}catch(u){throw new Mn(Ns(u),u)}let a;const l=ox(t);if(l&&l.getTime()>=ob["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?a=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(a=s.error_code),a){if(a==="weak_password")throw new uv(Ns(s),t.status,((e=s.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(a==="session_not_found")throw new yt}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new uv(Ns(s),t.status,s.weak_password.reasons);throw new IO(Ns(s),t.status||500,a)}const dx=(t,e,s,a)=>{const l={method:t,headers:e?.headers||{}};return t==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),l.body=JSON.stringify(a),Object.assign(Object.assign({},l),s))};async function re(t,e,s,a){var l;const u=Object.assign({},a?.headers);u[Df]||(u[Df]=ob["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(l=a?.query)!==null&&l!==void 0?l:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await px(t,e,s+d,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function px(t,e,s,a,l,u){const c=dx(e,a,l,u);let d;try{d=await t(s,Object.assign({},c))}catch(p){throw console.error(p),new Nf(Ns(p),0)}if(d.ok||await pv(d),a?.noResolveJson)return d;try{return await d.json()}catch(p){await pv(p)}}function _n(t){var e;let s=null;yx(t)&&(s=Object.assign({},t),t.expires_at||(s.expires_at=JO(t.expires_in)));const a=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:s,user:a},error:null}}function gv(t){const e=_n(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Zr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function gx(t){return{data:t,error:null}}function mx(t){const{action_link:e,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u}=t,c=Au(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:d,user:p},error:null}}function mv(t){return t}function yx(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const hf=["global","local","others"];class vx{constructor({url:e="",headers:s={},fetch:a,experimental:l}){this.url=e,this.headers=s,this.fetch=cb(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(e,s=hf[0]){if(hf.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${hf.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(a){if(te(a))return{data:null,error:a};throw a}}async inviteUserByEmail(e,s={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Zr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async generateLink(e){try{const{options:s}=e,a=Au(e,["options"]),l=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:mx,redirectTo:s?.redirectTo})}catch(s){if(te(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(e){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Zr})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async listUsers(e){var s,a,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=e?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:mv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const O=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);g[`${E}Page`]=O}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(te(g))return{data:{users:[]},error:g};throw g}}async getUserById(e){mr(e);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Zr})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async updateUserById(e,s){mr(e);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:s,headers:this.headers,xform:Zr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async deleteUser(e,s=!1){mr(e);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:s},xform:Zr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async _listFactors(e){mr(e.userId);try{const{data:s,error:a}=await re(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:a}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _deleteFactor(e){mr(e.userId),mr(e.id);try{return{data:await re(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _listOAuthClients(e){var s,a,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=e?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:mv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const O=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);g[`${E}Page`]=O}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(te(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(e){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _getOAuthClient(e){try{return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _updateOAuthClient(e,s){try{return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(e){try{return await re(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(e){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _listCustomProviders(e){try{const s={};return e?.type&&(s.type=e.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:a=>{var l;return{data:{providers:(l=a?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(te(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(e){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _getCustomProvider(e){try{return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _updateCustomProvider(e,s){try{return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(e){try{return await re(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _adminListPasskeys(e){Cn(this.experimental),mr(e.userId);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(e){Cn(this.experimental),mr(e.userId),mr(e.passkeyId);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}}function yv(t={}){return{getItem:e=>t[e]||null,setItem:(e,s)=>{t[e]=s},removeItem:e=>{delete t[e]}}}globalThis&&ub()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class bx extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function _x(){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 hb(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function wx(t){return parseInt(t,16)}function Sx(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,a=>a.toString(16).padStart(2,"0")).join("")}function Ex(t){var e;const{chainId:s,domain:a,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,requestId:p,resources:g,scheme:y,uri:m,version:b}=t;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=hb(t.address),S=y?`${y}://${a}`:a,O=t.statement?`${t.statement} 41`:"",E=`${S} wants you to sign in with your Ethereum account: 42${_} 43 44${O}`;let A=`URI: ${m} 45Version: ${b} 46Chain ID: ${s}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(l&&(A+=` 49Expiration Time: ${l.toISOString()}`),d&&(A+=` 50Not Before: ${d.toISOString()}`),p&&(A+=` 51Request ID: ${p}`),g){let M=` 52Resources:`;for(const j of g){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);M+=` 53- ${j}`}A+=M}return`${E} 54${A}`}class it extends Error{constructor({message:e,code:s,cause:a,name:l}){var u;super(e,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=l??(a instanceof Error?a.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class du extends it{constructor(e,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:e}),this.name="WebAuthnUnknownError",this.originalError=s}}function Tx({error:t,options:e}){var s,a,l;const{publicKey:u}=e;if(!u)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new it({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new it({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new it({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new it({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new it({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new it({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new it({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new it({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const c=window.location.hostname;if(fb(c)){if(u.rp.id!==c)return new it({message:`The RP ID "${u.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new it({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new it({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new it({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new it({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Rx({error:t,options:e}){const{publicKey:s}=e;if(!s)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new it({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new it({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(fb(a)){if(s.rpId!==a)return new it({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new it({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new it({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new it({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class Ax{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Uf=new Ax;function vv(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:s,excludeCredentials:a}=t,l=Au(t,["challenge","user","excludeCredentials"]),u=Ya(e).buffer,c=Object.assign(Object.assign({},s),{id:Ya(s.id).buffer}),d=Object.assign(Object.assign({},l),{challenge:u,user:c});if(a&&a.length>0){d.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const g=a[p];d.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:Ya(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return d}function bv(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:s}=t,a=Au(t,["challenge","allowCredentials"]),l=Ya(e).buffer,u=Object.assign(Object.assign({},a),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const d=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},d),{id:Ya(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function _v(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t;return{id:t.id,rawId:t.id,response:{attestationObject:Bs(new Uint8Array(t.response.attestationObject)),clientDataJSON:Bs(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=s.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function wv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t,a=t.getClientExtensionResults(),l=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Bs(new Uint8Array(l.authenticatorData)),clientDataJSON:Bs(new Uint8Array(l.clientDataJSON)),signature:Bs(new Uint8Array(l.signature)),userHandle:l.userHandle?Bs(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(e=s.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function fb(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function pu(){var t,e;return!!(Ct()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function db(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new du("Browser returned unexpected credential type",e)}:{data:null,error:new du("Empty credential response",e)}}catch(e){return{data:null,error:Tx({error:e,options:t})}}}async function pb(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new du("Browser returned unexpected credential type",e)}:{data:null,error:new du("Empty credential response",e)}}catch(e){return{data:null,error:Rx({error:e,options:t})}}}const Ox={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},xx={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function gu(...t){const e=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),a={};for(const l of t)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(s(c))a[u]=c;else if(e(c)){const d=a[u];e(d)?a[u]=gu(d,c):a[u]=gu(c)}else a[u]=c}return a}function Cx(t,e){return gu(Ox,t,e||{})}function kx(t,e){return gu(xx,t,e||{})}class jx{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:s,friendlyName:a,signal:l},u){var c;try{const{data:d,error:p}=await this.client.mfa.challenge({factorId:e,webauthn:s});if(!d)return{data:null,error:p};const g=l??Uf.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const m=a;if(m)y.name=`${y.id}:${m}`;else{const _=(await this.client.getUser()).data.user,S=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(d.webauthn.type){case"create":{const y=Cx(d.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await db({publicKey:y,signal:g});return m?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=kx(d.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await pb(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(d){return te(d)?{data:null,error:d}:{data:null,error:new Mn("Unexpected error in challenge",d)}}}async _verify({challengeId:e,factorId:s,webauthn:a}){return this.client.mfa.verify({factorId:s,challengeId:e,webauthn:a})}async _authenticate({factorId:e,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new po("rpId is required for WebAuthn authentication")};try{if(!pu())return{data:null,error:new Mn("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:e,webauthn:{rpId:s,rpOrigins:a},signal:l},{request:u});if(!c)return{data:null,error:d};const{webauthn:p}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:a,credential_response:p.credential_response}})}catch(c){return te(c)?{data:null,error:c}:{data:null,error:new Mn("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new po("rpId is required for WebAuthn registration")};try{if(!pu())return{data:null,error:new Mn("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:e});if(!c)return await this.client.mfa.listFactors().then(y=>{var m;return(m=y.data)===null||m===void 0?void 0:m.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===e&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:d};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:a},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return te(c)?{data:null,error:c}:{data:null,error:new Mn("Unexpected error in register",c)}}}}_x();const Mx={url:UO,storageKey:LO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:PO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},za={};class go{get jwks(){var e,s;return(s=(e=za[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(e){za[this.storageKey]=Object.assign(Object.assign({},za[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,s;return(s=(e=za[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){za[this.storageKey]=Object.assign(Object.assign({},za[this.storageKey]),{cachedAt:e})}constructor(e){var s,a,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},Mx),e);if(this.storageKey=u.storageKey,this.instanceID=(s=go.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,go.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&Ct()){const c=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new vx({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=cb(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCu
54stomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock!=null&&(this.lock=u.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new jx(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:ub()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=yv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=yv(this.memoryStorage)),Ct()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${ib}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var e;try{let s={},a="none";if(Ct()&&(s=ZO(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),Ct()&&this.detectSessionInUrl&&a!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),qO(u)){const p=(e=u.details)===null||e===void 0?void 0:e.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:d}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return te(s)?this._returnResult({error:s}):this._returnResult({error:new Mn("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var s,a,l;try{const u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(s=e?.options)===null||s===void 0?void 0:s.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(l=e?.options)===null||l===void 0?void 0:l.captchaToken}},xform:_n}),{data:c,error:d}=u;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(te(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(e){var s,a,l;try{let u;if("email"in e){const{email:y,password:m,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await Pa(this.storage,this.storageKey)),u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:m,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:_n})}else if("phone"in e){const{phone:y,password:m,options:b}=e;u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,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:_n})}else throw new Gl("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await ut(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(e){try{let s;if("email"in e){const{email:u,password:c,options:d}=e;s=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:gv})}else if("phone"in e){const{phone:u,password:c,options:d}=e;s=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:gv})}else throw new Gl("You must provide either an email or phone number and a password");const{data:a,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a||!a.session||!a.user){const u=new La;return this._returnResult({data:{user:null,session:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:l})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(e){var s,a,l,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=e.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:s}=e;switch(s){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(e){var s,a,l,u,c,d,p,g,y,m,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:O,wallet:E,statement:A,options:M}=e;let j;
54if(Ct())if(typeof E=="object")j=E;else{const W=window;if("ethereum"in W&&typeof W.ethereum=="object"&&"request"in W.ethereum&&typeof W.ethereum.request=="function")j=W.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const N=new URL((s=M?.url)!==null&&s!==void 0?s:window.location.href),X=await j.request({method:"eth_requestAccounts"}).then(W=>W).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 K=hb(X[0]);let I=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!I){const W=await j.request({method:"eth_chainId"});I=wx(W)}const F={domain:N.host,address:K,statement:A,uri:N.href,version:"1",chainId:I,nonce:(l=M?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=M?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=M?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=M?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=Ex(F),S=await j.request({method:"personal_sign",params:[Sx(_),K]})}try{const{data:O,error:E}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((m=e.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:_n});if(E)throw E;if(!O||!O.session||!O.user){const A=new La;return this._returnResult({data:{user:null,session:null},error:A})}return O.session&&(await this._saveSession(O.session),await this._notifyAllSubscribers("SIGNED_IN",O.session)),this._returnResult({data:Object.assign({},O),error:E})}catch(O){if(te(O))return this._returnResult({data:{user:null,session:null},error:O});throw O}}async signInWithSolana(e){var s,a,l,u,c,d,p,g,y,m,b,_;let S,O;if("message"in e)S=e.message,O=e.signature;else{const{chain:E,wallet:A,statement:M,options:j}=e;let N;if(Ct())if(typeof A=="object")N=A;else{const K=window;if("solana"in K&&typeof K.solana=="object"&&("signIn"in K.solana&&typeof K.solana.signIn=="function"||"signMessage"in K.solana&&typeof K.solana.signMessage=="function"))N=K.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof A!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=A}const X=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in N&&N.signIn){const K=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:X.host,uri:X.href}),M?{statement:M}:null));let I;if(Array.isArray(K)&&K[0]&&typeof K[0]=="object")I=K[0];else if(K&&typeof K=="object"&&"signedMessage"in K&&"signature"in K)I=K;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)S=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),O=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${X.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${X.href}`,`Issued At: ${(l=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((d=j?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((m=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||m===void 0)&&m.length?["Resources",...j.sign
54InWithSolana.resources.map(I=>`- ${I}`)]:[]].join(` 55`);const K=await N.signMessage(new TextEncoder().encode(S),"utf8");if(!K||!(K instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");O=K}}try{const{data:E,error:A}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Bs(O)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:_n});if(A)throw A;if(!E||!E.session||!E.user){const M=new La;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(te(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(e){const s=await gr(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(s??"").split("/");try{if(!a&&this.flowType==="pkce")throw new $O;const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:a},xform:_n});if(await ut(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new La;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:s,provider:a,token:l,access_token:u,nonce:c}=e,d=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:_n}),{data:p,error:g}=d;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new La;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(e){var s,a,l,u,c;try{if("email"in e){const{email:d,options:p}=e;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await Pa(this.storage,this.storageKey));const{error:m}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in e){const{phone:d,options:p}=e,{data:g,error:y}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:y})}throw new Gl("You must provide either an email or phone number.")}catch(d){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(e){var s,a;try{let l,u;"options"in e&&(l=(s=e.options)===null||s===void 0?void 0:s.redirectTo,u=(a=e.options)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:d}=await re(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:_n});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,g=c.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(te(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(e){var s,a,l,u,c;try{let d=null,p=null;this.flowType==="pkce"&&([d,p]=await Pa(this.storage,this.storageKey));const g=await re(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(a=(s=e.options)===null||s===void 0?void 0:s.redirectTo)!==null&&a!==void 0?a:void 0}),!((l=e?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:p}),headers:this.headers,xform:gx});return!((u=g.data)===null||u===void 0)&&u.url&&Ct()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(d){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;if(a)throw a;if(!s)throw new yt;const{error:l}=await re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(e){if(te(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const s=`${this.url}/resend`;if("email"in e){const{email:a,type:l,options:u}=e,{error:c}=await re(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in e){const{phone:a,type:l,options:u}=e,{data:c,error:d}=await re(this.fetch,"POST",s,{headers:this.headers,body:{phone:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new Gl("You must provide either an email or phone number and a type")}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,s){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await a,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=s();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await e(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const s=await gr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?e=s:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!e)return{data:{session:null},error:null};const a=e.expires_at?e.expires_at*1e3-Date.now()<lf:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",e.expires_at),!a){if(this.userStorage){const c=await gr(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=cf()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=hx(e.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:l,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let s;return this.lock!=null?s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):s=await this._getUser(),s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(e){try{return e?await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Zr}):await this._useSession(async s=>{var a,l,u;const{data:c,error:d}=s;if(d)throw d;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new yt}:await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(l=c.session)===null||l===void 0?void 0:l.access_token)!==null&&u!==void 0?u:void 0,xform:Zr})})}catch(s){if(te(s))return Vl(s)&&(await this._removeSession(),await ut(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(e,s={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,s)):await this._updateUser(e,s)}async _updateUser(e,s={}){try{return await this._useSession(async a=>{const{data:l,error:u}=a;if(u)throw u;if(!l.session)throw new yt;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&e.email!=null&&([d,p]=await Pa(this.storage,this.storageKey));const{data:g,error:y}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:p}),jwt:c.access_token,xform:Zr});if(y)throw y;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(a){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new yt;const s=Date.now()/1e3;let a=s,l=!0,u=null;const{payload:c}=Fl(e.access_token);if(c.exp&&(a=c.exp,l=a<=s),l){const{data:d,error:p}=await this._callRefreshToken(e.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!d)return{data:{user:null,session:null},error:null};u=d}else{const{data:d,error:p}=await this._getUser(e.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:e.access_token,refresh_token:e.refresh_token,user:d.user,token_type:"bearer",expires_in:a-s,expires_at:a},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(te(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async s=>{var a;if(!e){const{data:c,error:d}=s;if(d)throw d;e=(a=c.session)!==null&&a!==void 0?a:void 0}if(!e?.refresh_token)throw new yt;const{data:l,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(e,s){var a;try{if(!Ct())throw new Kl("No browser detected.");
55if(e.error||e.error_description||e.error_code)throw new Kl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new ov("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Kl("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new ov("No code detected.");const{data:j,error:N}=await this._exchangeCodeForSession(e.code);if(N)throw N;const X=new URL(window.location.href);return X.searchParams.delete("code"),window.history.replaceState(window.history.state,"",X.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:d,expires_in:p,expires_at:g,token_type:y}=e;if(!c||!p||!d||!y)throw new Kl("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let _=m+b;g&&(_=parseInt(g));const S=_-m;S*1e3<=Yr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const O=_-b;m-O>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",O,_,m):m-O<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",O,_,m);const{data:E,error:A}=await this._getUser(c);if(A)throw A;const M={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:e.type},error:null})}catch(l){if(te(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const s=await gr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&s)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async s=>{var a;const{data:l,error:u}=s;if(u&&!Vl(u))return this._returnResult({error:u});const c=(a=l.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:d}=await this.admin.signOut(c,e);if(d&&!(HO(d)&&(d.status===404||d.status===401||d.status===403)||Vl(d)))return this._returnResult({error:d})}return e!=="others"&&(await this._removeSession(),await ut(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const s=XO(),a={id:s,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)}):await this._emitInitialSession(s)))(),{data:{subscription:a}}}async _emitInitialSession(e){return await this._useSession(async s=>{var a,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((a=this.stateChangeEmitters.get(e))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",e,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(e))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",u),Vl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,s={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Pa(this.storage,this.storageKey,!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:a,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var e;try{const{data:s,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(e=s.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var s;try{const{data:a,error:l}=await this._useSession(async u=>{var c,d,p,g,y;const{data:m,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(c=e.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=e.options)===null||d===void 0?void 0:d.scopes,queryParams:(p=e.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await re(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(g=m.session)===null||g===void 0?void 0:g.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return Ct()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:e.provider,url:a?.url},error:null})}catch(a){if(te(a))return this._returnResult({data:{provider:e.provider,url:null},error:a});throw a}}async linkIdentityIdToken(e){return await this._useSession(async s=>{var a;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:d,token:p,access_token:g,nonce:y}=e,m=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=u?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:d,id_token:p,access_token:g,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:_n}),{data:b,error:_}=m;return _?this._returnResult({data:{user:null,session:null},error:_}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new La}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await ut(this.storage,`${this.storageKey}-code-verifier`),te(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(e){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)throw c;return await re(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(l=(a=u.session)===null||a===void 0?void 0:a.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(e){const s="#_refreshAccessToken()";this._debug(s,"begin");try{const a=Date.now();return await tx(async l=>(l>0&&await ex(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:_n})),(l,u)=>{const c=200*Math.pow(2,l);return u&&uf(u)&&Date.now()+c-a<Yr})}catch(a){if(this._debug(s,"error",a),te(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(s,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,s){const a=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",s,"url",a),Ct()&&!s.skipBrowserRedirect&&window.location.assign(a),{data:{provider:e,url:a},error:null}}async _recoverAndRefresh(){var e,s;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const l=await gr(this.storage,this.storageKey);if(l&&this.userStorage){let c=await gr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await qa(this.userStorage,this.storageKey+"-user",c)),l.user=(e=c?.user)!==null&&e!==void 0?e:cf()}else if(l&&!l.user&&!l.user){const c=await gr(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await ut(this.storage,this.storageKey+"-user"),await qa(this.storage,this.storageKey,l)):l.user=cf()}if(this._debug(a,"session from storage",l),!this._isValidSession(l)){this._debug(a,"session is not valid"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<lf;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${lf}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(VO(c)?this._debug(a,"refresh discarded by commit guard",c):(console.error(c),uf(c)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession())))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(l.access_token);!d&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(a,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(a,"error",l),console.error(l);return}finally{this._debug(a,"end")}}async _callRefreshToken(e){var s,a;if(!e)throw new yt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new Cu;const u=await gr(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(e);if(d)throw d;if(!c.session)throw new yt;const p=await gr(this.storage,this.storageKey);if(u!==null&&(p===null||p.refresh_token!==u.refresh_token)){this._debug(l,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new lv};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==y){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await ut(this.storage,this.storageKey),this.userStorage&&await ut(this.userStorage,this.storageKey+"-user");const b={data:null,error:new lv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const m={data:c.session,error:null};return this.refreshingDeferred.resolve(m),m}catch(u){if(this._debug(l,"error",u),te(u)){const c={data:null,error:u};return uf(u)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(e,s,a=!0){const l=`#_notifyAllSubscribers(${e})`;this._debug(l,"begin",s,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:e,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(e,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let d=0;d<u.length;d+=1)console.error(u[d]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await ut(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},e),a=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&s.user&&await qa(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=dv(l);await qa(this.storage,this.storageKey,u)}else{const l=dv(s);await qa(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ut(this.storage,this.storageKey),await ut(this.storage,this.storageKey+"-code-verifier"),await ut(this.storage,this.storageKey+"-user"),this.userStorage&&await ut(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ct()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Yr);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-e)/Yr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Yr}ms, refresh threshold is ${Wi} ticks`),l<=Wi&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s
55)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof bx)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-e)/Yr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Yr}ms, refresh threshold is ${Wi} ticks`),l<=Wi&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ct()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const s=`#_onVisibilityChanged(${e})`;if(this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(s,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,s,a){const l=[`provider=${encodeURIComponent(s)}`];if(a?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&l.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await Pa(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(d.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);l.push(u.toString())}return a?.skipBrowserRedirect&&l.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${e}?${l.join("&")}`}async _unenroll(e){try{return await this._useSession(async s=>{var a;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await re(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(e){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:p,error:g}=await re(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return g?this._returnResult({data:null,error:g}):(e.factorType==="totp"&&p.type==="totp"&&(!((l=p?.totp)===null||l===void 0)&&l.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _verify(e){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?_v(e.webauthn.credential_response):wv(e.webauthn.credential_response)})}:{code:e.code}),{data:p,error:g}=await re(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:d,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});return g?this._returnResult({data:null,error:g}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:g}))})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challenge(e){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=await re(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(d.error)return d;const{data:p}=d;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:vv(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:bv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challengeAndVerify(e){const{data:s,error:a}=await this._challenge({factorId:e.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:e.factorId,challengeId:s.id,code:e.code})}async _listFactors(){var e;const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(e=s?.factors)!==null&&e!==void 0?e:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(e){var s,a,l,u;if(e)try{const{payload:_}=Fl(e);let S=null;_.aal&&(S=_.aal);let O=S;const{data:{user:E},error:A}=await this.getUser(e);if(A)return this._returnResult({data:null,error:A});((a=(s=E?.factors)===null||s===void 0?void 0:s.filter(N=>N.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(O="aal2");const j=_.amr||[];return{data:{currentLevel:S,nextLevel:O,currentAuthenticationMethods:j},error:null}}catch(_){if(te(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Fl(c.access_token);let g=null;p.aal&&(g=p.aal);let y=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new yt})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(e,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new yt});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});
55return c.data&&c.data.redirect_url&&Ct()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(e,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new yt});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&Ct()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;return a?this._returnResult({data:null,error:a}):s?await re(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new yt})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new yt})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(e,s={keys:[]}){let a=s.keys.find(d=>d.kid===e);if(a)return a;const l=Date.now();if(a=this.jwks.keys.find(d=>d.kid===e),a&&this.jwks_cached_at+BO>l)return a;const{data:u,error:c}=await re(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=l,a=u.keys.find(d=>d.kid===e),!a)?null:a}async getClaims(e,s={}){try{let a=e;if(!a){const{data:_,error:S}
55=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});a=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:d,payload:p}}=Fl(a);if(!s?.allowExpired)try{lx(u.exp)}catch(_){throw new hu(_ instanceof Error?_.message:"JWT validation failed")}const g=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!g){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=ux(l.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,QO(`${d}.${p}`)))throw new hu("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(e){var s,a,l;Cn(this.experimental);try{if(!pu())return this._returnResult({data:null,error:new Mn("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const d=bv(u.options),p=(l=(a=e?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:Uf.createNewAbortSignal(),{data:g,error:y}=await pb({publicKey:d,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new Mn("WebAuthn ceremony failed",null)});const m=wv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:m})}catch(u){if(te(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(e){var s,a;Cn(this.experimental);try{if(!pu())return this._returnResult({data:null,error:new Mn("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const c=vv(l.options),d=(a=(s=e?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:Uf.createNewAbortSignal(),{data:p,error:g}=await db({publicKey:c,signal:d});if(g||!p)return this._returnResult({data:null,error:g??new Mn("WebAuthn ceremony failed",null)});const y=_v(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(te(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){Cn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new yt});const{data:l,error:u}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){Cn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(e){var s;Cn(this.experimental);try{const{data:a,error:l}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(e){Cn(this.experimental);try{const{data:s,error:a}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:_n});return a?this._returnResult({data:null,error:a}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){Cn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:s},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new yt});const{data:l,error:u}=await re(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){Cn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{data:u,error:c}=await re(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(e){Cn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{error:u}
55=await re(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}}go.nextInstanceID={};const Dx=go,Nx="2.107.0";let eo="",mu;if(typeof Deno<"u"){var ff;eo="deno",mu=(ff=Deno.version)===null||ff===void 0?void 0:ff.deno}else if(typeof document<"u")eo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")eo="react-native";else{var df;eo="node",mu=typeof process<"u"?(df=process.version)===null||df===void 0?void 0:df.replace(/^v/,""):void 0}const gb=[`runtime=${eo}`];mu&&gb.push(`runtime-version=${mu}`);const Ux={"X-Client-Info":`supabase-js/${Nx}; ${gb.join("; ")}`},Lx={headers:Ux},Px={schema:"public"},zx={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Bx={},Ix={enabled:!1,respectSamplingDecision:!0};function Hx(t,e,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(d,p)}g((a=a.apply(t,[])).next())})}let pf=null;const qx="@opentelemetry/api";function $x(){return pf===null&&(pf=import(qx).catch(()=>null)),pf}function Vx(){return Hx(this,void 0,void 0,function*(){try{const t=yield $x();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const s=e.traceparent;return s?{traceparent:s,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function Gx(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[s,a,l,u]=e;if(s.length!==2||a.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(s)||!c.test(a)||!c.test(l)||!c.test(u)||a==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:s,traceId:a,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function Kx(t,e){if(!t||!e||e.length===0)return!1;let s;if(t instanceof URL)s=t;else try{s=new URL(t)}catch{return!1}for(const a of e)try{if(typeof a=="string"){if(Fx(s.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(s.hostname))return!0}else if(typeof a=="function"&&a(s))return!0}catch{continue}return!1}function Fx(t,e){if(e===t)return!0;if(e.startsWith("*.")){const s=e.slice(2);if(t.endsWith(s)&&(t===s||t.endsWith("."+s)))return!0}return!1}function Yx(t){const e=[];try{const s=new URL(t);e.push(s.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function mo(t){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mo(t)}function Qx(t,e){if(mo(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var a=s.call(t,e);if(mo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jx(t){var e=Qx(t,"string");return mo(e)=="symbol"?e:e+""}function Xx(t,e,s){return(e=Jx(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Sv(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,a)}return s}function We(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?Sv(Object(s),!0).forEach(function(a){Xx(t,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Sv(Object(s)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(s,a))})}return t}const Zx=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Wx=()=>Headers,eC=(t,e,s,a,l)=>{const u=Zx(a),c=Wx(),d=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=d?Yx(e):null;return async(y,m)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:t;let S=new c(m?.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),g){const O=await tC(y,g,p);O&&(O.traceparent&&!S.has("traceparent")&&S.set("traceparent",O.traceparent),O.tracestate&&!S.has("tracestate")&&S.set("tracestate",O.tracestate),O.baggage&&!S.has("baggage")&&S.set("baggage",O.baggage))}return u(y,We(We({},m),{},{headers:S}))}};async function tC(t,e,s){if(!Kx(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const a=await Vx();if(!a||!a.traceparent)return null;if(s){const l=Gx(a.traceparent);if(l&&!l.isSampled)return null}return a}function Ev(t){return typeof t=="boolean"?{enabled:t}:t}function nC(t){return t.endsWith("/")?t:t+"/"}function rC(t,e){var s,a,l,u,c,d;const{db:p,auth:g,realtime:y,global:m}=t,{db:b,auth:_,realtime:S,global:O}=e,E=Ev(t.tracePropagation),A=Ev(e.tracePropagation),M={db:We(We({},b),p),auth:We(We({},_),g),realtime:We(We({},S),y),storage:{},global:We(We(We({},O),m),{},{headers:We(We({},(s=O?.headers)!==null&&s!==void 0?s:{}),(a=m?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(u=E?.enabled)!==null&&u!==void 0?u:A?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(d=E?.respectSamplingDecision)!==null&&d!==void 0?d:A?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return t.accessToken?M.accessToken=t.accessToken:delete M.accessToken,M}function sC(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");
55if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(nC(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var aC=class extends Dx{constructor(t){super(t)}},iC=class{constructor(t,e,s){var a,l;this.supabaseUrl=t,this.supabaseKey=e;const u=sC(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,d={db:Px,realtime:Bx,auth:We(We({},zx),{},{storageKey:c}),global:Lx,tracePropagation:Ix},p=rC(s??{},d);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=p.auth)!==null&&g!==void 0?g:{},this.headers,p.global.fetch)}this.fetch=eC(e,t,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(We({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 wA(new URL("rest/v1",u).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new NO(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new fA(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,s)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,s;if(t.accessToken)return await t.accessToken();const{data:a}=await t.auth.getSession();return(e=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:s,storage:a,userStorage:l,storageKey:u,flowType:c,lock:d,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,skipAutoInitialize:b},_,S){const O={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new aC({url:this.authUrl.href,headers:We(We({},O),_),storageKey:u,autoRefreshToken:t,persistSession:e,detectSessionInUrl:s,storage:a,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:g,experimental:y,fetch:S,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new rO(this.realtimeUrl.href,We(We({},t),{},{params:We(We({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,s){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const oC=(t,e,s)=>new iC(t,e,s);function lC(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const s=e.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}lC()&&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 uC(){return oC("https://gyrvngrfjzmcvbsueagm.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imd5cnZuZ3JmanptY3Zic3VlYWdtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODA3NjUxMjMsImV4cCI6MjA5NjM0MTEyM30.EC3fPf-oh0zT78Cr37yjUbhy9DXp8Oe__uQtv2HbAUs",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let gf;const mb=new Proxy({},{get(t,e,s){return gf||(gf=uC()),Reflect.get(gf,e,s)}}),cC=zs({type:"function"}).client(async({next:t})=>{const{data:e}=await mb.auth.getSession(),s=e.session?.access_token;return t({headers:s?{Authorization:`Bearer ${s}`}:{}})}),hC=zs(),Tv=lA(()=>({functionMiddleware:[cC],requestMiddleware:[hC]}));var ku=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fC=class extends ku{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},yb=new fC,dC={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},pC=class{#e=dC;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Lf=new pC;function gC(t){setTimeout(t,0)}var mC=typeof window>"u"||"Deno"in globalThis;function jn(){}function yC(t,e){return typeof t=="function"?t(e):t}function vC(t){return typeof t=="number"&&t>=0&&t!==1/0}function bC(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Pf(t,e){return typeof t=="function"?t(e):t}function _C(t,e){return typeof t=="function"?t(e):t}function Rv(t,e){const{type:s="all",exact:a,fetchStatus:l,predicate:u,queryKey:c,stale:d}=t;if(c){if(a){if(e.queryHash!==td(c,e.options))return!1}else if(!vo(e.queryKey,c))return!1}if(s!=="all"){const p=e.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||l&&l!==e.state.fetchStatus||u&&!u(e))}function Av(t,e){const{exact:s,status:a,predicate:l,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(s){if(yo(e.options.mutationKey)!==yo(u))return!1}else if(!vo(e.options.mutationKey,u))return!1}return!(a&&e.state.status!==a||l&&!l(e))}function td(t,e){return(e?.queryKeyHashFn||yo)(t)}function yo(t){return JSON.stringify(t,(e,s)=>zf(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s)}function vo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>vo(t[s],e[s])):!1}var wC=Object.prototype.hasOwnProperty;function vb(t,e,s=0){if(t===e)return t;if(s>500)return e;const a=Ov(t)&&Ov(e);
vendor: 22,574 bytes, line 55
55if(!a&&!(zf(t)&&zf(e)))return e;const u=(a?t:Object.keys(t)).length,c=a?e:Object.keys(e),d=c.length,p=a?new Array(d):{};let g=0;for(let y=0;y<d;y++){const m=a?y:c[y],b=t[m],_=e[m];if(b===_){p[m]=b,(a?y<u:wC.call(t,m))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[m]=_;continue}const S=vb(b,_,s+1);p[m]=S,S===b&&g++}return u===d&&g===u?t:p}function Ov(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zf(t){if(!xv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!xv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function xv(t){return Object.prototype.toString.call(t)==="[object Object]"}function SC(t){return new Promise(e=>{Lf.setTimeout(e,t)})}function EC(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?vb(t,e):e}function TC(t,e,s=0){const a=[...t,e];return s&&a.length>s?a.slice(1):a}function RC(t,e,s=0){const a=[e,...t];return s&&a.length>s?a.slice(0,-1):a}var nd=Symbol();function bb(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===nd?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function AC(t,e,s){let a=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=e(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),t}var _b=(()=>{let t=()=>mC;return{isServer(){return t()},setIsServer(e){t=e}}})();function OC(){let t,e;const s=new Promise((l,u)=>{t=l,e=u});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),t(l)},s.reject=l=>{a({status:"rejected",reason:l}),e(l)},s}var xC=gC;function CC(){let t=[],e=0,s=d=>{d()},a=d=>{d()},l=xC;const u=d=>{e?t.push(d):l(()=>{s(d)})},c=()=>{const d=t;t=[],d.length&&l(()=>{a(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;e++;try{p=d()}finally{e--,e||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var Dt=CC(),kC=class extends ku{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}},yu=new kC;function jC(t){return Math.min(1e3*2**t,3e4)}function wb(t){return(t??"online")==="online"?yu.isOnline():!0}var Bf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Sb(t){let e=!1,s=0,a;const l=OC(),u=()=>l.status!=="pending",c=O=>{if(!u()){const E=new Bf(O);b(E),t.onCancel?.(E)}},d=()=>{e=!0},p=()=>{e=!1},g=()=>yb.isFocused()&&(t.networkMode==="always"||yu.isOnline())&&t.canRun(),y=()=>wb(t.networkMode)&&t.canRun(),m=O=>{u()||(a?.(),l.resolve(O))},b=O=>{u()||(a?.(),l.reject(O))},_=()=>new Promise(O=>{a=E=>{(u()||g())&&O(E)},t.onPause?.()}).then(()=>{a=void 0,u()||t.onContinue?.()}),S=()=>{if(u())return;let O;const E=s===0?t.initialPromise:void 0;try{O=E??t.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(m).catch(A=>{if(u())return;const M=t.retry??(_b.isServer()?0:3),j=t.retryDelay??jC,N=typeof j=="function"?j(s,A):j,X=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,A);if(e||!X){b(A);return}s++,t.onFail?.(s,A),SC(N).then(()=>g()?void 0:_()).then(()=>{e?b(A):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:p,canStart:y,start:()=>(y()?S():_().then(S),l)}}var Eb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vC(this.gcTime)&&(this.#e=Lf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_b.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Lf.clearTimeout(this.#e),this.#e=void 0)}},MC=class extends Eb{#e;#n;#t;#s;#r;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#t=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=kv(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=kv(this.options);e.data!==void 0&&(this.setState(Cv(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,e){const s=EC(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(jn).catch(jn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_C(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Pf(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!bC(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},l=()=>{const d=bb(this.options,e),g=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#i=!1,this.options.persister?this.options.persister(d,g,this):d(g)},c=(()=>{const d={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return a(d),d})();this.options.behavior?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=Sb({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof Bf&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#o({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Bf){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...DC(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...Cv(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?a:void 0,a;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),Dt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function DC(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wb(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Cv(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kv(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,a=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function jv(t){return{onFetch:(e,s)=>{const a=e.options,l=e.fetchOptions?.meta?.fetchMore?.direction,u=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=S=>{AC(S,()=>e.signal,()=>y=!0)},b=bb(e.options,e.fetchOptions),_=async(S,O,E)=>{if(y)return Promise.reject();if(O==null&&S.pages.length)return Promise.resolve(S);const M=(()=>{const K={client:e.client,queryKey:e.queryKey,pageParam:O,direction:E?"backward":"forward",meta:e.options.meta};return m(K),K})(),j=await b(M),{maxPages:N}=e.options,X=E?RC:TC;return{pages:X(S.pages,j,N),pageParams:X(S.pageParams,O,N)}};if(l&&u.length){const S=l==="backward",O=S?NC:Mv,E={pages:u,pageParams:c},A=O(a,E);d=await _(E,A,S)}else{const S=t??u.length;do{const O=p===0?c[0]??a.initialPageParam:Mv(a,d);if(p>0&&O==null)break;d=await _(d,O),p++}while(p<S)}return d};e.options.persister?e.fetchFn=()=>e.options.persister?.(g,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=g}}}function Mv(t,{pages:e,pageParams:s}){const a=e.length-1;return e.length>0?t.getNextPageParam(e[a],e,s[a],s):void 0}function NC(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var UC=class extends Eb{#e;#n;#t;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||LC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Sb({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",l=!this.#s.canStart();try{if(a)e();else{this.#r({type:"pending",variables:t,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,s);const c=await this.options.onMutate?.(t,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:t,isPaused:l})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,s),await this.options.onSuccess?.(u,t,this.state.context,s),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,t,this.state.context,s),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Dt.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function LC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var PC=class extends ku{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,e,s){const a=new UC({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:s});return this.add(a),a}add(t){this.#e.add(t);const e=Yl(t);if(typeof e=="string"){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Yl(t);if(typeof e=="string"){const s=this.#n.get(e);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Yl(t);if(typeof e=="string"){const a=this.#n.get(e)?.find(l=>l.state.status==="pending");return!a||a===t}else return!0}runNext(t){const e=Yl(t);return typeof e=="string"?this.#n.get(e)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Dt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Av(e,s))}findAll(t={}){return this.getAll().filter(e=>Av(t,e))}notify(t){Dt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Dt.batch(()=>Promise.all(t.map(e=>e.continue().catch(jn))))}};function Yl(t){return t.options.scope?.id}var zC=class extends ku{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,s){const a=e.queryKey,l=e.queryHash??td(a,e);let u=this.get(l);return u||(u=new MC({client:t,queryKey:a,queryHash:l,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Rv(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>Rv(t,s)):e}notify(t){Dt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},BC=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(t={}){this.#e=t.queryCache||new zC,this.#n=t.mutationCache||new PC,this.#t=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=yb.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=yu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#e.build(this,e),a=s.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Pf(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(a))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>{const a=s.data;return[e,a]})}setQueryData(t,e,s){const a=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(a.queryHash)?.state.data,c=yC(e,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...s,manual:!0})}setQueriesData(t,e,s){return Dt.batch(()=>this.#e.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Dt.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#e;return Dt.batch(()=>(s.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},a=Dt.batch(()=>this.#e.findAll(t).map(l=>l.cancel(s)));return Promise.all(a).then(jn).catch(jn)}invalidateQueries(t,e={}){return Dt.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},a=Dt.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(jn)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(jn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e);return s.isStaleByTime(Pf(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(jn).catch(jn)}fetchInfiniteQuery(t){return t.behavior=jv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(jn).catch(jn)}ensureInfiniteQueryData(t){return t.behavior=jv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return yu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,e){this.#s.set(yo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],s={};return e.forEach(a=>{vo(t,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(t,e){this.#r.set(yo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(a=>{vo(t,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=td(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===nd&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},IC=oe.createContext(void 0),HC=({client:t,children:e})=>(oe.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Q.jsx(IC.Provider,{value:t,children:e}));const qC="/assets/styles-BhuklQhk.css";function $C(t,e={}){typeof window>"u"||window.__lovableEvents?.captureException?.(t,{source:"react_error_boundary",route:window.location.pathname,...e},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function VC(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}const GC=t=>{switch(t){case"success":return YC;case"info":return JC;case"warning":return QC;case"error":return XC;default:return null}},KC=Array(12).fill(0),FC=({visible:t,className:e})=>Z.createElement("div",{className:["sonner-loading-wrapper",e].filter(
vendor: 6,020 bytes, line 55
55Boolean).join(" "),"data-visible":t},Z.createElement("div",{className:"sonner-spinner"},KC.map((s,a)=>Z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),YC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.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"})),QC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Z.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"})),JC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.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"})),XC=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.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"})),ZC=Z.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"},Z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),WC=()=>{const[t,e]=Z.useState(document.hidden);return Z.useEffect(()=>{const s=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),t};let If=1;class ek{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const s=this.subscribers.indexOf(e);this.subscribers.splice(s,1)}),this.publish=e=>{this.subscribers.forEach(s=>s(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var s;const{message:a,...l}=e,u=typeof e?.id=="number"||((s=e.id)==null?void 0:s.length)>0?e.id:If++,c=this.toasts.find(p=>p.id===u),d=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),c?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...e,id:u,title:a}),{...p,...e,id:u,dismissible:d,title:a}):p):this.addToast({title:a,...l,dismissible:d,id:u}),u},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:e,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(a=>a({id:s.id,dismiss:!0}))}),e),this.message=(e,s)=>this.create({...s,message:e}),this.error=(e,s)=>this.create({...s,message:e,type:"error"}),this.success=(e,s)=>this.create({...s,type:"success",message:e}),this.info=(e,s)=>this.create({...s,type:"info",message:e}),this.warning=(e,s)=>this.create({...s,type:"warning",message:e}),this.loading=(e,s)=>this.create({...s,type:"loading",message:e}),this.promise=(e,s)=>{if(!s)return;let a;s.loading!==void 0&&(a=this.create({...s,promise:e,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const l=Promise.resolve(e instanceof Function?e():e);let u=a!==void 0,c;const d=l.then(async g=>{if(c=["resolve",g],Z.isValidElement(g))u=!1,this.create({id:a,type:"default",message:g});else if(nk(g)&&!g.ok){u=!1;const m=typeof s.error=="function"?await s.error(`HTTP error! status: ${g.status}`):s.error,b=typeof s.description=="function"?await s.description(`HTTP error! status: ${g.status}`):s.description,S=typeof m=="object"&&!Z.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:b,...S})}else if(g instanceof Error){u=!1;const m=typeof s.error=="function"?await s.error(g):s.error,b=typeof s.description=="function"?await s.description(g):s.description,S=typeof m=="object"&&!Z.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:b,...S})}else if(s.success!==void 0){u=!1;const m=typeof s.success=="function"?await s.success(g):s.success,b=typeof s.description=="function"?await s.description(g):s.description,S=typeof m=="object"&&!Z.isValidElement(m)?m:{message:m};this.create({id:a,type:"success",description:b,...S})}}).catch(async g=>{if(c=["reject",g],s.error!==void 0){u=!1;const y=typeof s.error=="function"?await s.error(g):s.error,m=typeof s.description=="function"?await s.description(g):s.description,_=typeof y=="object"&&!Z.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:m,..._})}}).finally(()=>{u&&(this.dismiss(a),a=void 0),s.finally==null||s.finally.call(s)}),p=()=>new Promise((g,y)=>d.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(e,s)=>{const a=s?.id||If++;return this.create({jsx:e(a),id:a,...s}),a},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Yt=new ek,tk=(t,e)=>{const s=e?.id||If++;return Yt.addToast({title:t,...e,id:s}),s},nk=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",rk=tk,sk=()=>Yt.toasts,ak=()=>Yt.getActiveToasts(),_2=Object.assign(rk,{success:Yt.success,info:Yt.info,warning:Yt.warning,error:Yt.error,custom:Yt.custom,message:Yt.message,promise:Yt.promise,dismiss:Yt.dismiss,loading:Yt.loading},{getHistory:sk,getToasts:ak});VC
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
55Ql(t){return t.label!==void 0}const ik=3,ok="24px",lk="16px",Dv=4e3,uk=356,ck=14,hk=45,fk=200;function Hn(...t){return t.filter(Boolean).join(" ")}function dk(t){const[e,s]=t.split("-"),a=[];return e&&a.push(e),s&&a.push(s),a}const pk=t=>{var e,s,a,l,u,c,d,p,g;const{invert:y,toast:m,unstyled:b,interacting:_,setHeights:S,visibleToasts:O,heights:E,index:A,toasts:M,expanded:j,removeToast:N,defaultRichColors:X,closeButton:K,style:I,cancelButtonStyle:F,actionButtonStyle:W,className:le="",descriptionClassName:ae="",duration:me,position:_e,gap:qe,expandByDefault:Me,classNames:L,icons:Y,closeButtonAriaLabel:se="Close toast"}=t,[Se,ye]=Z.useState(null),[C,q]=Z.useState(null),[G,J]=Z.useState(!1),[ee,ce]=Z.useState(!1),[we,de]=Z.useState(!1),[xe,Nt]=Z.useState(!1),[Ut,kt]=Z.useState(!1),[us,Lt]=Z.useState(0),[cs,Fn]=Z.useState(0),Dn=Z.useRef(m.duration||me||Dv),ln=Z.useRef(null),bt=Z.useRef(null),Zt=A===0,hs=A+1<=O,ft=m.type,Nn=m.dismissible!==!1,dt=m.className||"",Le=m.descriptionClassName||"",Je=Z.useMemo(()=>E.findIndex(pe=>pe.toastId===m.id)||0,[E,m.id]),un=Z.useMemo(()=>{var pe;
vendor: 4,990 bytes, line 55
55return(pe=m.closeButton)!=null?pe:K},[m.closeButton,K]),Yn=Z.useMemo(()=>m.duration||me||Dv,[m.duration,me]),Xa=Z.useRef(0),Qn=Z.useRef(0),So=Z.useRef(0),Sr=Z.useRef(null),[fs,jt]=_e.split("-"),Tn=Z.useMemo(()=>E.reduce((pe,Ke,pt)=>pt>=Je?pe:pe+Ke.height,0),[E,Je]),At=WC(),ju=m.invert||y,Za=ft==="loading";Qn.current=Z.useMemo(()=>Je*qe+Tn,[Je,Tn]),Z.useEffect(()=>{Dn.current=Yn},[Yn]),Z.useEffect(()=>{J(!0)},[]),Z.useEffect(()=>{const pe=bt.current;if(pe){const Ke=pe.getBoundingClientRect().height;return Fn(Ke),S(pt=>[{toastId:m.id,height:Ke,position:m.position},...pt]),()=>S(pt=>pt.filter(Ot=>Ot.toastId!==m.id))}},[S,m.id]),Z.useLayoutEffect(()=>{if(!G)return;const pe=bt.current,Ke=pe.style.height;pe.style.height="auto";const pt=pe.getBoundingClientRect().height;pe.style.height=Ke,Fn(pt),S(Ot=>Ot.find(Qe=>Qe.toastId===m.id)?Ot.map(Qe=>Qe.toastId===m.id?{...Qe,height:pt}:Qe):[{toastId:m.id,height:pt,position:m.position},...Ot])},[G,m.title,m.description,S,m.id,m.jsx,m.action,m.cancel]);const Un=Z.useCallback(()=>{ce(!0),Lt(Qn.current),S(pe=>pe.filter(Ke=>Ke.toastId!==m.id)),setTimeout(()=>{N(m)},fk)},[m,N,S,Qn]);Z.useEffect(()=>{if(m.promise&&ft==="loading"||m.duration===1/0||m.type==="loading")return;let pe;return j||_||At?(()=>{if(So.current<Xa.current){const Ot=new Date().getTime()-Xa.current;Dn.current=Dn.current-Ot}So.current=new Date().getTime()})():Dn.current!==1/0&&(Xa.current=new Date().getTime(),pe=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Un()},Dn.current)),()=>clearTimeout(pe)},[j,_,m,ft,At,Un]),Z.useEffect(()=>{m.delete&&(Un(),m.onDismiss==null||m.onDismiss.call(m,m))},[Un,m.delete]);function Ks(){var pe;if(Y?.loading){var Ke;return Z.createElement("div",{className:Hn(L?.loader,m==null||(Ke=m.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":ft==="loading"},Y.loading)}return Z.createElement(FC,{className:Hn(L?.loader,m==null||(pe=m.classNames)==null?void 0:pe.loader),visible:ft==="loading"})}const Fs=m.icon||Y?.[ft]||GC(ft);var ds,Ln;return Z.createElement("li",{tabIndex:0,ref:bt,className:Hn(le,dt,L?.toast,m==null||(e=m.classNames)==null?void 0:e.toast,L?.default,L?.[ft],m==null||(s=m.classNames)==null?void 0:s[ft]),"data-sonner-toast":"","data-rich-colors":(ds=m.richColors)!=null?ds:X,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":G,"data-promise":!!m.promise,"data-swiped":Ut,"data-removed":ee,"data-visible":hs,"data-y-position":fs,"data-x-position":jt,"data-index":A,"data-front":Zt,"data-swiping":we,"data-dismissible":Nn,"data-type":ft,"data-invert":ju,"data-swipe-out":xe,"data-swipe-direction":C,"data-expanded":!!(j||Me&&G),"data-testid":m.testId,style:{"--index":A,"--toasts-before":A,"--z-index":M.length-A,"--offset":`${ee?us:Qn.current}px`,"--initial-height":Me?"auto":`${cs}px`,...I,...m.style},onDragEnd:()=>{de(!1),ye(null),Sr.current=null},onPointerDown:pe=>{pe.button!==2&&(Za||!Nn||(ln.current=new Date,Lt(Qn.current),pe.target.setPointerCapture(pe.pointerId),pe.target.tagName!=="BUTTON"&&(de(!0),Sr.current={x:pe.clientX,y:pe.clientY})))},onPointerUp:()=>{var pe,Ke,pt;if(xe||!Nn)return;Sr.current=null;const Ot=Number(((pe=bt.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Er=Number(((Ke=bt.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qe=new Date().getTime()-((pt=ln.current)==null?void 0:pt.getTime()),Pt=Se==="x"?Ot:Er,ps=Math.abs(Pt)/Qe;if(Math.abs(Pt)>=hk||ps>.11){Lt(Qn.current),m.onDismiss==null||m.onDismiss.call(m,m),q(Se==="x"?Ot>0?"right":"left":Er>0?"down":"up"),Un(),Nt(!0);return}else{var zt,Bt;(zt=bt.current)==null||zt.style.setProperty("--swipe-amount-x","0px"),(Bt=bt.current)==null||Bt.style.setProperty("--swipe-amount-y","0px")}kt(!1),de(!1),ye(null)},onPointerMove:pe=>{var Ke,pt,Ot;if(!Sr.current||!Nn||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const Qe=pe.clientY-Sr.current.y,Pt=pe.clientX-Sr.current.x;var ps;const zt=(ps=t.swipeDirections)!=null?ps:dk(_e);!Se&&(Math.abs(Pt)>1||Math.abs(Qe)>1)&&ye(Math.abs(Pt)>Math.abs(Qe)?"x":"y");let Bt={x:0,y:0};const Ys=Rn=>1/(1.5+Math.abs(Rn)/20);if(Se==="y"){if(zt.includes("top")||zt.includes("bottom"))if(zt.includes("top")&&Qe<0||zt.includes("bottom")&&Qe>0)Bt.y=Qe;else{const Rn=Qe*Ys(Qe);Bt.y=Math.abs(Rn)<Math.abs(Qe)?Rn:Qe}}else if(Se==="x"&&(zt.includes("left")||zt.includes("right")))if(zt.includes("left")&&Pt<0||zt.includes("right")&&Pt>0)Bt.x=Pt;else{const Rn=Pt*Ys(Pt);Bt.x=Math.abs(Rn)<Math.abs(Pt)?Rn:Pt}(Math.abs(Bt.x)>0||Math.abs(Bt.y)>0)&&kt(!0),(pt=bt.current)==null||pt.style.setProperty("--swipe-amount-x",`${Bt.x}px`),(Ot=bt.current)==null||Ot.style.setProperty("--swipe-amount-y",`${Bt.y}px`)}},un&&!m.jsx&&ft!=="loading"?Z.createElement("button",{"aria-label":se,"data-disabled":Za,"data-close-button":!0,onClick:Za||!Nn?()=>{}:()=>{Un(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Hn(L?.closeButton,m==null||(a=m.classNames)==null?void 0:a.closeButton)}
vendor: 9,152 bytes, line 55
55,(Ln=Y?.close)!=null?Ln:ZC):null,(ft||m.icon||m.promise)&&m.icon!==null&&(Y?.[ft]!==null||m.icon)?Z.createElement("div",{"data-icon":"",className:Hn(L?.icon,m==null||(l=m.classNames)==null?void 0:l.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Ks():null,m.type!=="loading"?Fs:null):null,Z.createElement("div",{"data-content":"",className:Hn(L?.content,m==null||(u=m.classNames)==null?void 0:u.content)},Z.createElement("div",{"data-title":"",className:Hn(L?.title,m==null||(c=m.classNames)==null?void 0:c.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?Z.createElement("div",{"data-description":"",className:Hn(ae,Le,L?.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),Z.isValidElement(m.cancel)?m.cancel:m.cancel&&Ql(m.cancel)?Z.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||F,onClick:pe=>{Ql(m.cancel)&&Nn&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,pe),Un())},className:Hn(L?.cancelButton,m==null||(p=m.classNames)==null?void 0:p.cancelButton)},m.cancel.label):null,Z.isValidElement(m.action)?m.action:m.action&&Ql(m.action)?Z.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||W,onClick:pe=>{Ql(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,pe),!pe.defaultPrevented&&Un())},className:Hn(L?.actionButton,m==null||(g=m.classNames)==null?void 0:g.actionButton)},m.action.label):null)};function Nv(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function gk(t,e){const s={};return[t,e].forEach((a,l)=>{const u=l===1,c=u?"--mobile-offset":"--offset",d=u?lk:ok;function p(g){["top","right","bottom","left"].forEach(y=>{s[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(g=>{a[g]===void 0?s[`${c}-${g}`]=d:s[`${c}-${g}`]=typeof a[g]=="number"?`${a[g]}px`:a[g]}):p(d)}),s}const mk=Z.forwardRef(function(e,s){const{id:a,invert:l,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:g,offset:y,mobileOffset:m,theme:b="light",richColors:_,duration:S,style:O,visibleToasts:E=ik,toastOptions:A,dir:M=Nv(),gap:j=ck,icons:N,containerAriaLabel:X="Notifications"}=e,[K,I]=Z.useState([]),F=Z.useMemo(()=>a?K.filter(G=>G.toasterId===a):K.filter(G=>!G.toasterId),[K,a]),W=Z.useMemo(()=>Array.from(new Set([u].concat(F.filter(G=>G.position).map(G=>G.position)))),[F,u]),[le,ae]=Z.useState([]),[me,_e]=Z.useState(!1),[qe,Me]=Z.useState(!1),[L,Y]=Z.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),se=Z.useRef(null),Se=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=Z.useRef(null),C=Z.useRef(!1),q=Z.useCallback(G=>{I(J=>{var ee;return(ee=J.find(ce=>ce.id===G.id))!=null&&ee.delete||Yt.dismiss(G.id),J.filter(({id:ce})=>ce!==G.id)})},[]);return Z.useEffect(()=>Yt.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{I(J=>J.map(ee=>ee.id===G.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{A1.flushSync(()=>{I(J=>{const ee=J.findIndex(ce=>ce.id===G.id);return ee!==-1?[...J.slice(0,ee),{...J[ee],...G},...J.slice(ee+1)]:[G,...J]})})})}),[K]),Z.useEffect(()=>{if(b!=="system"){Y(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:J})=>{Y(J?"dark":"light")})}catch{G.addListener(({matches:ee})=>{try{Y(ee?"dark":"light")}catch(ce){console.error(ce)}})}},[b]),Z.useEffect(()=>{K.length<=1&&_e(!1)},[K]),Z.useEffect(()=>{const G=J=>{var ee;if(c.every(de=>J[de]||J.code===de)){var we;_e(!0),(we=se.current)==null||we.focus()}J.code==="Escape"&&(document.activeElement===se.current||(ee=se.current)!=null&&ee.contains(document.activeElement))&&_e(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[c]),Z.useEffect(()=>{if(se.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,C.current=!1)}},[se.current]),Z.createElement("section",{ref:s,"aria-label":`${X} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((G,J)=>{var ee;const[ce,we]=G.split("-");return F.length?Z.createElement("ol",{key:G,dir:M==="auto"?Nv():M,tabIndex:-1,ref:se,className:g,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":ce,"data-x-position":we,style:{"--front-toast-height":`${((ee=le[0])==null?void 0:ee.height)||0}px`,"--width":`${uk}px`,"--gap":`${j}px`,...O,...gk(y,m)},onBlur:de=>{C.current&&!de.currentTarget.contains(de.relatedTarget)&&(C.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||C.current||(C.current=!0,ye.current=de.relatedTarget)},onMouseEnter:()=>_e(!0),onMouseMove:()=>_e(!0),onMouseLeave:()=>{qe||_e(!1)},onDragEnd:()=>_e(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||Me(!0)},onPointerUp:()=>Me(!1)},F.filter(de=>!de.position&&J===0||de.position===G).map((de,xe)=>{var Nt,Ut;return Z.createElement(pk,{key:de.id,icons:N,index:xe,toast:de,defaultRichColors:_,duration:(Nt=A?.duration)!=null?Nt:S,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:l,visibleToasts:E,closeButton:(Ut=A?.closeButton)!=null?Ut:p,interacting:qe,position:G,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:q,toasts:F.filter(kt=>kt.position==de.position),heights:le.filter(kt=>kt.position==de.position),setHeights:ae,expandByDefault:d,gap:j,expanded:me,swipeDirections:e.swipeDirections})})):null}))});function yk(){return Q.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Q.jsxs("div",{className:"max-w-md text-center",children:[Q.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),Q.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),Q.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),Q.jsx("div",{className:"mt-6",children:Q.jsx(Zf,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function vk({error:t,reset:e}){console.error(t);const s=Rt();return oe.useEffect(()=>{$C(t,{boundary:"tanstack_root_error_component"})},[t]),Q.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Q.jsxs("div",{className:"max-w-lg text-center",children:[Q.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),Q.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. Try refreshing, or do a hard refresh (Ctrl/Cmd+Shift+R) to clear a stale cache."}),t?.message&&Q.jsx("pre",{className:"mt-4 max-h-48 overflow-auto rounded-md border border-border bg-surface px-3 py-2 text-left font-mono text-xs text-muted-foreground",children:t.message}),Q.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[Q.jsx("button",{onClick:()=>{s.invalidate(),e()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),Q.jsx("button",{onClick:()=>{typeof window<"u"&&window.location.reload()},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:"Hard refresh"}),Q.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const Gs=z1()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"RFP Forge AI"},{name:"description",content:"RFP Forge AI turns lengthy RFPs into polished, winning proposals in minutes using AI."},{name:"author",content:"RFP Forge AI"},{property:"og:site_name",content:"RFP Forge AI"},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"google-site-verification",content:"wnsCj0BQgHoSPNdcppHd06ghBCNuKR08p8TWU4_LT2g"}],links:[{rel:"icon",type:"image/png",href:"/favicon.png"},{rel:"apple-touch-icon",type:"image/png",href:"/favicon.png"}
55,{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap"},{rel:"stylesheet",href:qC}]}),shellComponent:bk,component:_k,notFoundComponent:yk,errorComponent:vk});function bk({children:t}){return Q.jsxs("html",{lang:"en",children:[Q.jsx("head",{children:Q.jsx(aA,{})}),Q.jsxs("body",{children:[t,Q.jsx(iA,{})]})]})}function _k(){const{queryClient:t}=Gs.useRouteContext();return Q.jsxs(HC,{client:t,children:[Q.jsx(G0,{}),Q.jsx(mk,{richColors:!0,position:"top-center"})]})}const wk="modulepreload",Sk=function(t){return"/"+t},Uv={},En=function(e,s,a){let l=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=Sk(g),g in Uv)return;Uv[g]=!0;const y=g.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${m}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":wk,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return l.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return e().catch(u)})},Ek=()=>En(()=>import("./terms-tcnEtsYO.js"),__vite__mapDeps([0,1,2,3])),Tk=wn("/terms")({head:()=>({meta:[{title:"Terms and Conditions â RFP Forge AI"},{name:"description",content:"Read the Terms and Conditions governing your use of the RFP Forge AI service, account, and AI features."},{property:"og:title",content:"Terms and Conditions â RFP Forge AI"},{property:"og:description",content:"Legal terms covering use of RFP Forge AI, including AI output disclaimers and liability."},{property:"og:url",content:"https://bid-bot-wizard1357902468.lovable.app/terms"}],links:[{rel:"canonical",href:"/terms"}]}),component:Sn(Ek,"component")}),Rk=()=>En(()=>import("./privacy-CSWN64mJ.js"),__vite__mapDeps([4,1,2,3])),Ak=wn("/privacy")({head:()=>({meta:[{title:"Privacy Policy â RFP Forge AI"},{name:"description",content:"How RFP Forge AI collects, uses, stores, and protects the personal data and proposal content you provide to our AI-powered RFP platform."},{property:"og:title",content:"Privacy Policy â RFP Forge AI"},{property:"og:description",content:"Our Privacy Policy explains data we collect, how AI processes your content, sub-processors, retention, and your rights under GDPR and CCPA."},{property:"og:url",content:"https://bid-bot-wizard1357902468.lovable.app/privacy"}],links:[{rel:"canonical",href:"/privacy"}]}),component:Sn(Rk,"component")}),Ok=()=>En(()=>import("./auth-CJMIrrKo.js"),__vite__mapDeps([5,1,6,7,8,9,10,11,2,12])),xk=wn("/auth")({head:()=>({meta:[{title:"Sign in â RFP Forge AI"},{name:"description",content:"Sign in or create your RFP Forge AI account to start generating winning proposals."},{property:"og:title",content:"Sign in â RFP Forge AI"},{property:"og:description",content:"Access your RFP Forge AI workspace to draft proposals, analyze RFPs, and manage your knowledge base."},{property:"og:url",content:"https://bid-bot-wizard1357902468.lovable.app/auth"}],links:[{rel:"canonical",href:"/auth"}]}),component:Sn(Ok,"component")}),Ck=()=>En(()=>import("./_authenticated-DXYQWljb.js"),[]),kk=wn("/_authenticated")({beforeLoad:async()=>{const{data:t,error:e}=await mb.auth.getUser();if(e||!t.user)throw Vf({to:"/auth"});return{user:t.user}},component:Sn(Ck,"component")}),jk=()=>En(()=>import("./index-DERzhTmT.js"),__vite__mapDeps([13,1,12,14,15,16,17,18,11,2])),Mk=wn("/")({head:()=>({meta:[{title:"RFP Forge AI â Generate Winning Proposals with AI"},{name:"description",content:"Upload an RFP, let AI extract requirements, fill gaps with smart Q&A, and generate a polished, customized proposal in minutes."},{property:"og:title",content:"RFP Forge AI â Generate Winning Proposals with AI"},{property:"og:description",content:"Save dozens of hours per bid. Upload, analyze, generate, win."},{property:"og:url",content:"https://bid-bot-wizard1357902468.lovable.app/"}],links:[{rel:"canonical",href:"/"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",name:"RFP Forge AI",url:"https://bid-bot-wizard1357902468.lovable.app/"})}
55,{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:"RFP Forge AI",url:"https://bid-bot-wizard1357902468.lovable.app/",logo:"https://bid-bot-wizard1357902468.lovable.app/favicon.ico"})}]}),component:Sn(jk,"component")}),Dk=()=>En(()=>import("./qa-Ct49yzW5.js"),__vite__mapDeps([19,20,1,21,6,22,3,14,23,24,25,11,26,17])),Nk=wn("/_authenticated/qa")({head:()=>({meta:[{title:"Smart Q&A â RFP Forge AI"}]}),component:Sn(Dk,"component")}),Uk=()=>En(()=>import("./pricing-4f-gZkPG.js"),__vite__mapDeps([27,1,22,28,20,3,11])),Lk=wn("/_authenticated/pricing")({head:()=>({meta:[{title:"Pricing & Billing â RFP Forge AI"}]}),component:Sn(Uk,"component")}),Pk=()=>En(()=>import("./onboarding-CeOCsWpL.js"),__vite__mapDeps([29,20,1,6,7,30,8,31,9,11,32,2,14,12,26,17,15,24,18,33,34])),zk=wn("/_authenticated/onboarding")({head:()=>({meta:[{title:"Welcome â RFP Forge AI"}]}),component:Sn(Pk,"component")}),Bk=()=>En(()=>import("./knowledge-VbZBwi4f.js"),__vite__mapDeps([35,20,1,6,22,7,30,8,31,9,11,32,2,3,26,17,15,25,14,24])),Ik=wn("/_authenticated/knowledge")({head:()=>({meta:[{title:"Knowledge Base â RFP Forge AI"}]}),component:Sn(Bk,"component")}),Hk=()=>En(()=>import("./dashboard-Cmvmmm01.js"),__vite__mapDeps([36,20,37,1,22,28,14,38,8,31,10,18,2,12])),qk=wn("/_authenticated/dashboard")({head:()=>({meta:[{title:"Dashboard â RFP Forge AI"}]}),component:Sn(Hk,"component")}),$k=()=>En(()=>import("./projects.new-Cig7xdm7.js"),__vite__mapDeps([39,20,37,1,6,21,22,3,34,14,17])),Vk=wn("/_authenticated/projects/new")({head:()=>({meta:[{title:"New RFP â RFP Forge AI"}]}),component:Sn($k,"component")}),Gk=()=>En(()=>import("./projects._id-Dr2Ji0sU.js").then(t=>t.p),__vite__mapDeps([40,20,37,1,22,6,21,30,8,31,9,11,38,10,17,23,16,24,41,14,33,3])),Kk=wn("/_authenticated/projects/$id")({head:()=>({meta:[{title:"Project â RFP Forge AI"}]}),component:Sn(Gk,"component")}),Fk=Tk.update({id:"/terms",path:"/terms",getParentRoute:()=>Gs}),Yk=Ak.update({id:"/privacy",path:"/privacy",getParentRoute:()=>Gs}),Qk=xk.update({id:"/auth",path:"/auth",getParentRoute:()=>Gs}),ls=kk.update({id:"/_authenticated",getParentRoute:()=>Gs}),Jk=Mk.update({id:"/",path:"/",getParentRoute:()=>Gs}),Xk=Nk.update({id:"/qa",path:"/qa",getParentRoute:()=>ls}),Zk=Lk.update({id:"/pricing",path:"/pricing",getParentRoute:()=>ls}),Wk=zk.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>ls}),e2=Ik.update({id:"/knowledge",path:"/knowledge",getParentRoute:()=>ls}),t2=qk.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>ls}),n2=Vk.update({id:"/projects/new",path:"/projects/new",getParentRoute:()=>ls}),r2=Kk.update({id:"/projects/$id",path:"/projects/$id",getParentRoute:()=>ls}),s2={AuthenticatedDashboardRoute:t2,AuthenticatedKnowledgeRoute:e2,AuthenticatedOnboardingRoute:Wk,AuthenticatedPricingRoute:Zk,AuthenticatedQaRoute:Xk,AuthenticatedProjectsIdRoute:r2,AuthenticatedProjectsNewRoute:n2},a2=ls._addFileChildren(s2),i2={IndexRoute:Jk,AuthenticatedRoute:a2,AuthRoute:Qk,PrivacyRoute:Yk,TermsRoute:Fk},o2=Gs._addFileChildren(i2),l2=()=>{const t=new BC;return Z1({routeTree:o2,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function u2(){const t=await l2();let e;if(Tv){const s=await Tv.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,e=s.serializationAdapters,t.options.defaultSsr=s.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(n1),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.matchesId.get().length||await s1(t),t}async function c2(){const t=await u2();return window.$_TSR?.h(),t}var mf;function h2(){return mf||(mf=c2()),Q.jsx(l1,{promise:mf,children:t=>Q.jsx(tA,{router:t})})}oe.startTransition(()=>{Vw.hydrateRoot(document,Q.jsx(oe.StrictMode,{children:Q.jsx(h2,{})}))});export{Zf as L,G0 as O,Z as R,p2 as T,En as _,Lk as a,zk as b,t1 as c,Ik as d,qk as e,Vk as f,Lv as g,Kk as h,q0 as i,Q as j,d2 as k,A1 as l,Gy as m,Au as n,b2 as o,Rt as p,Jt as q,oe as r,mb as s,_2 as t,I0 as u,MS as v,zv as w,zs as x,f2 as y};
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.