PageSourceSearch

https://newactionelectric.lovable.app/assets/index-CxHmrqsG.js

js newactionelectric.lovable.app collected 2026-10-03 03:33:56 UTC 669,510 bytes, 55 lines download raw bytes

vendor: 4,336 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/services-CCW86xvQ.js","assets/SectionHeading-uls3u5Er.js","assets/Reveal-C2b6VKEW.js","assets/review-noBgaSUZ.js","assets/star-Sx8QA5q5.js","assets/send-vUPx3-Pl.js","assets/circle-check-C3kXPoGw.js","assets/external-link-C6_ybjD_.js","assets/residential-LdT4dQ7y.js","assets/WeatherOutageWidget-BRRdGYEV.js","assets/projects-ByISCSgo.js","assets/faq-C8_iKL6v.js","assets/search-E2wEFMG6.js","assets/employment-CdUBWOXi.js","assets/contact-Bvj4f5qG.js","assets/commercial-HcqG5G61.js","assets/blog-BrujDg08.js","assets/tag-B1GN1cek.js","assets/shield-check-BdmRVt2l.js","assets/about-DnUZlTX5.js","assets/award-q47TJV3f.js","assets/index-DiTcpHet.js","assets/services._slug-Co2vkQA4.js","assets/arrow-left-Cub9Mjb6.js","assets/blog._slug-VY04wI7H.js"])))=>i.map(i=>d[i]);
2function FS(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(a,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Sb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ch={exports:{}},no={};var _y;function VS(){if(_y)return no;_y=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return no.Fragment=t,no.jsx=r,no.jsxs=r,no}var Sy;function GS(){return Sy||(Sy=1,ch.exports=VS()),ch.exports}var N=GS(),uh={exports:{}},Ee={};var Ey;function KS(){if(Ey)return Ee;Ey=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function x(O,F,K){this.props=O,this.context=F,this.refs=E,this.updater=K||_}x.prototype.isReactComponent={},x.prototype.setState=function(O,F){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,F,"setState")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function M(){}M.prototype=x.prototype;function j(O,F,K){this.props=O,this.context=F,this.refs=E,this.updater=K||_}var U=j.prototype=new M;U.constructor=j,A(U,x.prototype),U.isPureReactComponent=!0;var X=Array.isArray;function V(){}var q={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function J(O,F,K){var Z=K.ref;return{$$typeof:e,type:O,key:F,ref:Z!==void 0?Z:null,props:K}}function he(O,F){return J(O.type,F,O.props)}function ie(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function we(O){var F={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(K){return F[K]})}var xe=/\/+/g;function Be(O,F){return typeof O=="object"&&O!==null&&O.key!=null?we(""+O.key):F.toString(36)}function Oe(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(V,V):(O.status="pending",O.then(function(F){O.status==="pending"&&(O.status="fulfilled",O.value=F)},function(F){O.status==="pending"&&(O.status="rejected",O.reason=F)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function L(O,F,K,Z,W){var se=typeof O;(se==="undefined"||se==="boolean")&&(O=null);var Se=!1;if(O===null)Se=!0;else switch(se){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(O.$$typeof){case e:case t:Se=!0;break;case y:return Se=O._init,L(Se(O._payload),F,K,Z,W)}}
vendor: 5,367 bytes, line 2
2if(Se)return W=W(O),Se=Z===""?"."+Be(O,0):Z,X(W)?(K="",Se!=null&&(K=Se.replace(xe,"$&/")+"/"),L(W,F,K,"",function(Nt){return Nt})):W!=null&&(ie(W)&&(W=he(W,K+(W.key==null||O&&O.key===W.key?"":(""+W.key).replace(xe,"$&/")+"/")+Se)),F.push(W)),1;Se=0;var be=Z===""?".":Z+":";if(X(O))for(var pe=0;pe<O.length;pe++)Z=O[pe],se=be+Be(Z,pe),Se+=L(Z,F,K,se,W);else if(pe=w(O),typeof pe=="function")for(O=pe.call(O),pe=0;!(Z=O.next()).done;)Z=Z.value,se=be+Be(Z,pe++),Se+=L(Z,F,K,se,W);else if(se==="object"){if(typeof O.then=="function")return L(Oe(O),F,K,Z,W);throw F=String(O),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Q(O,F,K){if(O==null)return O;var Z=[],W=0;return L(O,Z,"","",function(se){return F.call(K,se,W++)}),Z}function ae(O){if(O._status===-1){var F=O._result;F=F(),F.then(function(K){(O._status===0||O._status===-1)&&(O._status=1,O._result=K)},function(K){(O._status===0||O._status===-1)&&(O._status=2,O._result=K)}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var Te=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},ee={map:Q,forEach:function(O,F,K){Q(O,function(){F.apply(this,arguments)},K)},count:function(O){var F=0;return Q(O,function(){F++}),F},toArray:function(O){return Q(O,function(F){return F})||[]},only:function(O){if(!ie(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ee.Activity=g,Ee.Children=ee,Ee.Component=x,Ee.Fragment=r,Ee.Profiler=o,Ee.PureComponent=j,Ee.StrictMode=a,Ee.Suspense=p,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(O){return q.H.useMemoCache(O)}},Ee.cache=function(O){return function(){return O.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(O,F,K){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Z=A({},O.props),W=O.key;if(F!=null)for(se in F.key!==void 0&&(W=""+F.key),F)!z.call(F,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&F.ref===void 0||(Z[se]=F[se]);var se=arguments.length-2;if(se===1)Z.children=K;else if(1<se){for(var Se=Array(se),be=0;be<se;be++)Se[be]=arguments[be+2];Z.children=Se}return J(O.type,W,Z)},Ee.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Ee.createElement=function(O,F,K){var Z,W={},se=null;if(F!=null)for(Z in F.key!==void 0&&(se=""+F.key),F)z.call(F,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(W[Z]=F[Z]);var Se=arguments.length-2;if(Se===1)W.children=K;else if(1<Se){for(var be=Array(Se),pe=0;pe<Se;pe++)be[pe]=arguments[pe+2];W.children=be}if(O&&O.defaultProps)for(Z in Se=O.defaultProps,Se)W[Z]===void 0&&(W[Z]=Se[Z]);return J(O,se,W)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(O){return{$$typeof:h,render:O}},Ee.isValidElement=ie,Ee.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:ae}},Ee.memo=function(O,F){return{$$typeof:m,type:O,compare:F===void 0?null:F}},Ee.startTransition=function(O){var F=q.T,K={};q.T=K;try{var Z=O(),W=q.S;W!==null&&W(K,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(V,Te)}catch(se){Te(se)}finally{F!==null&&K.types!==null&&(F.types=K.types),q.T=F}},Ee.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ee.use=function(O){return q.H.use(O)},Ee.useActionState=function(O,F,K){return q.H.useActionState(O,F,K)},Ee.useCallback=function(O,F){return q.H.useCallback(O,F)},Ee.useContext=function(O){return q.H.useContext(O)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(O,F){return q.H.useDeferredValue(O,F)},Ee.useEffect=function(O,F){return q.H.useEffect(O,F)},Ee.useEffectEvent=function(O){return q.H.useEffectEvent(O)},Ee.useId=function(){return q.H.useId()},Ee.useImperativeHandle=function(O,F,K){return q.H.useImperativeHandle(O,F,K)},Ee.useInsertionEffect=function(O,F){return q.H.useInsertionEffect(O,F)},Ee.useLayoutEffect=function(O,F){return q.H.useLayoutEffect(O,F)},Ee.useMemo=function(O,F){return q.H.useMemo(O,F)},Ee.useOptimistic=function(O,F){return q.H.useOptimistic(O,F)},Ee.useReducer=function(O,F,K){return q.H.useReducer(O,F,K)},Ee.useRef=function(O){return q.H.useRef(O)},Ee.useState=function(O){return q.H.useState(O)},Ee.useSyncExternalStore=function(O,F,K){return q.H.useSyncExternalStore(O,F,K)},Ee.useTransition=function(){return q.H.useTransition()},Ee.version="19.2.5",Ee}var xy;function Uo(){return xy||(xy=1,uh.exports=KS()),uh.exports}var re=Uo();const te=Sb(re),RM=FS({__proto__:null,default:te},[re]);var dh={exports:{}},ro={},hh={exports:{}},fh={};var Ty;function YS(){return Ty||(Ty=1,(function(e){function t(L,Q){var ae=L.length;
vendor: 11,213 bytes, line 2
2L.push(Q);e:for(;0<ae;){var Te=ae-1>>>1,ee=L[Te];if(0<o(ee,Q))L[Te]=Q,L[ae]=ee,ae=Te;else break e}}function r(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var Q=L[0],ae=L.pop();if(ae!==Q){L[0]=ae;e:for(var Te=0,ee=L.length,O=ee>>>1;Te<O;){var F=2*(Te+1)-1,K=L[F],Z=F+1,W=L[Z];if(0>o(K,ae))Z<ee&&0>o(W,K)?(L[Te]=W,L[Z]=ae,Te=Z):(L[Te]=K,L[F]=ae,Te=F);else if(Z<ee&&0>o(W,ae))L[Te]=W,L[Z]=ae,Te=Z;else break e}}return Q}function o(L,Q){var ae=L.sortIndex-Q.sortIndex;return ae!==0?ae:L.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();e.unstable_now=function(){return u.now()-h}}var p=[],m=[],y=1,g=null,b=3,w=!1,_=!1,A=!1,E=!1,x=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function U(L){for(var Q=r(m);Q!==null;){if(Q.callback===null)a(m);else if(Q.startTime<=L)a(m),Q.sortIndex=Q.expirationTime,t(p,Q);else break;Q=r(m)}}function X(L){if(A=!1,U(L),!_)if(r(p)!==null)_=!0,V||(V=!0,we());else{var Q=r(m);Q!==null&&Oe(X,Q.startTime-L)}}var V=!1,q=-1,z=5,J=-1;function he(){return E?!0:!(e.unstable_now()-J<z)}function ie(){if(E=!1,V){var L=e.unstable_now();J=L;var Q=!0;try{e:{_=!1,A&&(A=!1,M(q),q=-1),w=!0;var ae=b;try{t:{for(U(L),g=r(p);g!==null&&!(g.expirationTime>L&&he());){var Te=g.callback;if(typeof Te=="function"){g.callback=null,b=g.priorityLevel;var ee=Te(g.expirationTime<=L);if(L=e.unstable_now(),typeof ee=="function"){g.callback=ee,U(L),Q=!0;break t}g===r(p)&&a(p),U(L)}else a(p);g=r(p)}if(g!==null)Q=!0;else{var O=r(m);O!==null&&Oe(X,O.startTime-L),Q=!1}}break e}finally{g=null,b=ae,w=!1}Q=void 0}}finally{Q?we():V=!1}}}var we;if(typeof j=="function")we=function(){j(ie)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Be=xe.port2;xe.port1.onmessage=ie,we=function(){Be.postMessage(null)}}else we=function(){x(ie,0)};function Oe(L,Q){q=x(function(){L(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.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"):z=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var ae=b;b=Q;try{return L()}finally{b=ae}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(L,Q){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ae=b;b=L;try{return Q()}finally{b=ae}},e.unstable_scheduleCallback=function(L,Q,ae){var Te=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Te+ae:Te):ae=Te,L){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=ae+ee,L={id:y++,callback:Q,priorityLevel:L,startTime:ae,expirationTime:ee,sortIndex:-1},ae>Te?(L.sortIndex=ae,t(m,L),r(p)===null&&L===r(m)&&(A?(M(q),q=-1):A=!0,Oe(X,ae-Te))):(L.sortIndex=ee,t(p,L),_||w||(_=!0,V||(V=!0,we()))),L},e.unstable_shouldYield=he,e.unstable_wrapCallback=function(L){var Q=b;return function(){var ae=b;b=Q;try{return L.apply(this,arguments)}finally{b=ae}}}})(fh)),fh}var Ay;function QS(){return Ay||(Ay=1,hh.exports=YS()),hh.exports}var ph={exports:{}},Ht={};var Ry;function JS(){if(Ry)return Ht;Ry=1;var e=Uo();function t(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ht.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return c(p,m,null,y)},Ht.flushSync=function(p){var m=u.T,y=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=m,a.p=y,a.d.f()}},Ht.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},Ht.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Ht.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:w}):y==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ht.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=h(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},Ht.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin);a.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ht.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=h(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},Ht.requestFormReset=function(p){a.d.r(p)},Ht.unstable_batchedUpdates=function(p,m){return p(m)},Ht.useFormState=function(p,m,y){return u.H.useFormState(p,m,y)},Ht.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ht.version="19.2.5",Ht}var Cy;function Eb(){if(Cy)return ph.exports;Cy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ph.exports=JS(),ph.exports}var Oy;function XS(){if(Oy)return ro;Oy=1;var e=QS(),t=Uo(),r=Eb();function a(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var s=n,i=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(i=s.return),n=s.return;while(n)}return s.tag===3?i:null}function u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function h(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(a(188))}function m(n){var s=n.alternate;if(!s){if(s=c(n),s===null)throw Error(a(188));return s!==n?null:n}for(var i=n,l=s;;){var d=i.return;if(d===null)break;var f=d.alternate;if(f===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===i)return p(d),n;if(f===l)return p(d),s;f=f.sibling}throw Error(a(188))}if(i.return!==l.return)i=d,l=f;else{for(var v=!1,S=d.child;S;){if(S===i){v=!0,i=d,l=f;break}if(S===l){v=!0,l=d,i=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===i){v=!0,i=f,l=d;break}if(S===l){v=!0,l=f,i=d;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==l)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function we(n){return n===null||typeof n!="object"?null:(n=ie&&n[ie]||n["@@iterator"],typeof n=="function"?n:null)}var xe=Symbol.for("react.client.reference");function Be(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===xe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case x:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case _:return"Portal";case j:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case U:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return s=n.displayName||null,s!==null?s:Be(n.type)||"Memo";case z:s=n._payload,n=n._init;try{return Be(n(s))}catch{}}return null}var Oe=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Te=[],ee=-1;function O(n){return{current:n}}function F(n){0>ee||(n.current=Te[ee],Te[ee]=null,ee--)}function K(n,s){ee++,Te[ee]=n.current,n.current=s}var Z=O(null),W=O(null),se=O(null),Se=O(null);function be(n,s){switch(K(se,s),K(W,n),K(Z,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Fg(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Fg(s),n=Vg(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(Z),K(Z,n)}function pe(){F(Z),F(W),F(se)}
vendor: 7,427 bytes, lines 2-9
2function Nt(n){n.memoizedState!==null&&K(Se,n);var s=Z.current,i=Vg(s,n.type);s!==i&&(K(W,n),K(Z,i))}function mt(n){W.current===n&&(F(Z),F(W)),Se.current===n&&(F(Se),Wi._currentValue=ae)}var lt,Dn;function gt(n){if(lt===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);lt=s&&s[1]||"",Dn=-1<i.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+lt+n+Dn}var xs=!1;function sr(n,s){if(!n||xs)return"";xs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(H){var I=H}Reflect.construct(n,[],Y)}else{try{Y.call()}catch(H){I=H}n.call(Y.prototype)}}else{try{throw Error()}catch(H){I=H}(Y=n())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(H){if(H&&I&&typeof H.stack=="string")return[H.stack,I.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var C=v.split(`
5`),B=S.split(`
6`);for(d=l=0;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;for(;d<B.length&&!B[d].includes("DetermineComponentFrameRoot");)d++;if(l===C.length||d===B.length)for(l=C.length-1,d=B.length-1;1<=l&&0<=d&&C[l]!==B[d];)d--;for(;1<=l&&0<=d;l--,d--)if(C[l]!==B[d]){if(l!==1||d!==1)do if(l--,d--,0>d||C[l]!==B[d]){var $=`
7`+C[l].replace(" at new "," at ");return n.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",n.displayName)),$}while(1<=l&&0<=d);break}}}finally{xs=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?gt(i):""}function Fn(n,s){switch(n.tag){case 26:case 27:case 5:return gt(n.type);case 16:return gt("Lazy");case 13:return n.child!==s&&s!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return sr(n.type,!1);case 11:return sr(n.type.render,!1);case 1:return sr(n.type,!0);case 31:return gt("Activity");default:return""}}function bn(n){try{var s="",i=null;do s+=Fn(n,i),i=n,n=n.return;while(n);return s}catch(l){return`
8Error generating stack: `+l.message+`
9`+l.stack}}var Mt=Object.prototype.hasOwnProperty,ln=e.unstable_scheduleCallback,Ts=e.unstable_cancelCallback,St=e.unstable_shouldYield,Vn=e.unstable_requestPaint,Et=e.unstable_now,qe=e.unstable_getCurrentPriorityLevel,tt=e.unstable_ImmediatePriority,wn=e.unstable_UserBlockingPriority,ar=e.unstable_NormalPriority,di=e.unstable_LowPriority,ir=e.unstable_IdlePriority,Bo=e.log,Dr=e.unstable_setDisableYieldValue,As=null,$t=null;function Ln(n){if(typeof Bo=="function"&&Dr(n),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(As,n)}catch{}}var Bt=Math.clz32?Math.clz32:Gn,Wc=Math.log,hi=Math.LN2;function Gn(n){return n>>>=0,n===0?32:31-(Wc(n)/hi|0)|0}var ia=256,oa=262144,Rs=4194304;function Kn(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function _e(n,s,i){var l=n.pendingLanes;if(l===0)return 0;var d=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=l&134217727;return S!==0?(l=S&~f,l!==0?d=Kn(l):(v&=S,v!==0?d=Kn(v):i||(i=S&~n,i!==0&&(d=Kn(i))))):(S=l&~f,S!==0?d=Kn(S):v!==0?d=Kn(v):i||(i=l&~n,i!==0&&(d=Kn(i)))),d===0?0:s!==0&&s!==d&&(s&f)===0&&(f=d&-d,i=s&-s,f>=i||f===32&&(i&4194048)!==0)?s:d}function Xe(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function xt(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function It(){var n=Rs;return Rs<<=1,(Rs&62914560)===0&&(Rs=4194304),n}function Lr(n){for(var s=[],i=0;31>i;i++)s.push(n);return s}function et(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Kt(n,s,i,l,d,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,C=n.expirationTimes,B=n.hiddenUpdates;for(i=v&~i;0<i;){var $=31-Bt(i),Y=1<<$;S[$]=0,C[$]=-1;var I=B[$];if(I!==null)for(B[$]=null,$=0;$<I.length;$++){var H=I[$];H!==null&&(H.lane&=-536870913)}i&=~Y}l!==0&&Cs(n,l,0),f!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~s))}function Cs(n,s,i){n.pendingLanes|=s,n.suspendedLanes&=~s;var l=31-Bt(s);n.entangledLanes|=s,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function Yt(n,s){var i=n.entangledLanes|=s;for(n=n.entanglements;i;){var l=31-Bt(i),d=1<<l;d&s|n[l]&s&&(n[l]|=s),i&=~d}}function Qt(n,s){var i=s&-s;return i=(i&42)!==0?1:la(i),(i&(n.suspendedLanes|s))!==0?0:i}function la(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 Un(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Zc(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:py(n.type))}function kf(n,s){var i=Q.p;try{return Q.p=n,s()}finally{Q.p=i}}var Ur=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Ur,Jt="__reactProps$"+Ur,ca="__reactContainer$"+Ur,eu="__reactEvents$"+Ur,Mw="__reactListeners$"+Ur,Dw="__reactHandles$"+Ur,jf="__reactResources$"+Ur,fi="__reactMarker$"+Ur;function tu(n){delete n[Dt],delete n[Jt],delete n[eu],delete n[Mw],delete n[Dw]}function ua(n){var s=n[Dt];if(s)return s;for(var i=n.parentNode;i;){if(s=i[ca]||i[Dt]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(n=Wg(n);n!==null;){if(i=n[Dt])return i;n=Wg(n)}return s}n=i,i=n.parentNode}return null}function da(n){if(n=n[Dt]||n[ca]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function pi(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function ha(n){var s=n[jf];return s||(s=n[jf]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Tt(n){n[fi]=!0}var Nf=new Set,Mf={};function Os(n,s){fa(n,s),fa(n+"Capture",s)}function fa(n,s){for(Mf[n]=s,n=0;n<s.length;n++)Nf.add(s[n])}var Lw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Df={},Lf={};function Uw(n){return Mt.call(Lf,n)?!0:Mt.call(Df,n)?!1:Lw.test(n)?Lf[n]=!0:(Df[n]=!0,!1)}function Io(n,s,i){if(Uw(s))if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+i)}}function Ho(n,s,i){if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+i)}}function or(n,s,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(s,i,""+l)}}function _n(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Uf(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function zw(n,s,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,f=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function nu(n){if(!n._valueTracker){var s=Uf(n)?"checked":"value";n._valueTracker=zw(n,s,""+n[s])}}function zf(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var i=s.getValue(),l="";return n&&(l=Uf(n)?n.checked?"true":"false":n.value),n=l,n!==i?(s.setValue(n),!0):!1}function qo(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 Pw=/[\n"\\]/g;function Sn(n){return n.replace(Pw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function ru(n,s,i,l,d,f,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),s!=null?v==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+_n(s)):n.value!==""+_n(s)&&(n.value=""+_n(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?su(n,v,_n(s)):i!=null?su(n,v,_n(i)):l!=null&&n.removeAttribute("value"),d==null&&f!=null&&(n.defaultChecked=!!f),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+_n(S):n.removeAttribute("name")}function Pf(n,s,i,l,d,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),s!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||s!=null)){nu(n);return}i=i!=null?""+_n(i):"",s=s!=null?""+_n(s):i,S||s===n.value||(n.value=s),n.defaultValue=s}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=S?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),nu(n)}function su(n,s,i){s==="number"&&qo(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function pa(n,s,i,l){if(n=n.options,s){s={};for(var d=0;d<i.length;d++)s["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=s.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&l&&(n[i].defaultSelected=!0)}else{for(i=""+_n(i),s=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}s!==null||n[d].disabled||(s=n[d])}s!==null&&(s.selected=!0)}}function Bf(n,s,i){if(s!=null&&(s=""+_n(s),s!==n.value&&(n.value=s),i==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=i!=null?""+_n(i):""}function If(n,s,i,l){if(s==null){if(l!=null){if(i!=null)throw Error(a(92));if(Oe(l)){if(1<l.length)throw Error(a(93));l=l[0]}i=l}i==null&&(i=""),s=i}i=_n(s),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),nu(n)}function ma(n,s){if(s){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=s;return}}n.textContent=s}var Bw=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 Hf(n,s,i){var l=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":l?n.setProperty(s,i):typeof i!="number"||i===0||Bw.has(s)?s==="float"?n.cssFloat=i:n[s]=(""+i).trim():n[s]=i+"px"}function qf(n,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in s)l=s[d],s.hasOwnProperty(d)&&i[d]!==l&&Hf(n,d,l)}else for(var f in s)s.hasOwnProperty(f)&&Hf(n,f,s[f])}function au(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Iw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Hw=/^[\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 $o(n){return Hw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function lr(){}var iu=null;function ou(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ga=null,ya=null;function $f(n){var s=da(n);if(s&&(n=s.stateNode)){var i=n[Jt]||null;e:switch(n=s.stateNode,s.type){case"input":if(ru(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),s=i.name,i.type==="radio"&&s!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Sn(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var l=i[s];if(l!==n&&l.form===n.form){var d=l[Jt]||null;if(!d)throw Error(a(90));ru(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<i.length;s++)l=i[s],l.form===n.form&&zf(l)}break e;case"textarea":Bf(n,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&pa(n,!!i.multiple,s,!1)}}}var lu=!1;function Ff(n,s,i){if(lu)return n(s,i);lu=!0;try{var l=n(s);return l}finally{if(lu=!1,(ga!==null||ya!==null)&&(kl(),ga&&(s=ga,n=ya,ya=ga=null,$f(s),n)))for(s=0;s<n.length;s++)$f(n[s])}}function mi(n,s){var i=n.stateNode;if(i===null)return null;var l=i[Jt]||null;if(l===null)return null;i=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,s,typeof i));return i}var cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cu=!1;if(cr)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){cu=!0}}
vendor: 3,273 bytes, line 9
9),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{cu=!1}var zr=null,uu=null,Fo=null;function Vf(){if(Fo)return Fo;var n,s=uu,i=s.length,l,d="value"in zr?zr.value:zr.textContent,f=d.length;for(n=0;n<i&&s[n]===d[n];n++);var v=i-n;for(l=1;l<=v&&s[i-l]===d[f-l];l++);return Fo=d.slice(n,1<l?1-l:void 0)}function Vo(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Go(){return!0}function Gf(){return!1}function Xt(n){function s(i,l,d,f,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Go:Gf,this.isPropagationStopped=Gf,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Go)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Go)},persist:function(){},isPersistent:Go}),s}var ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ko=Xt(ks),yi=g({},ks,{view:0,detail:0}),qw=Xt(yi),du,hu,vi,Yo=g({},yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pu,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!==vi&&(vi&&n.type==="mousemove"?(du=n.screenX-vi.screenX,hu=n.screenY-vi.screenY):hu=du=0,vi=n),du)},movementY:function(n){return"movementY"in n?n.movementY:hu}}),Kf=Xt(Yo),$w=g({},Yo,{dataTransfer:0}),Fw=Xt($w),Vw=g({},yi,{relatedTarget:0}),fu=Xt(Vw),Gw=g({},ks,{animationName:0,elapsedTime:0,pseudoElement:0}),Kw=Xt(Gw),Yw=g({},ks,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Qw=Xt(Yw),Jw=g({},ks,{data:0}),Yf=Xt(Jw),Xw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ww={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Zw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e_(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=Zw[n])?!!s[n]:!1}function pu(){return e_}var t_=g({},yi,{key:function(n){if(n.key){var s=Xw[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Vo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?Ww[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pu,charCode:function(n){return n.type==="keypress"?Vo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Vo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),n_=Xt(t_),r_=g({},Yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qf=Xt(r_),s_=g({},yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pu}),a_=Xt(s_),i_=g({},ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),o_=Xt(i_),l_=g({},Yo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),c_=Xt(l_),u_=g({},ks,{newState:0,oldState:0}),d_=Xt(u_),h_=[9,13,27,32],mu=cr&&"CompositionEvent"in window,bi=null;cr&&"documentMode"in document&&(bi=document.documentMode);var f_=cr&&"TextEvent"in window&&!bi,Jf=cr&&(!mu||bi&&8<bi&&11>=bi),Xf=" ",Wf=!1;function Zf(n,s){switch(n){case"keyup":return h_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ep(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var va=!1;function p_(n,s){switch(n){case"compositionend":return ep(s);case"keypress":return s.which!==32?null:(Wf=!0,Xf);case"textInput":return n=s.data,n===Xf&&Wf?null:n;default:return null}}function m_(n,s){if(va)return n==="compositionend"||!mu&&Zf(n,s)?(n=Vf(),Fo=uu=zr=null,va=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Jf&&s.locale!=="ko"?null:s.data;default:return null}}var g_={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 tp(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!g_[n.type]:s==="textarea"}function np(n,s,i,l){ga?ya?ya.push(l):ya=[l]:ga=l,s=zl(s,"onChange"),0<s.length&&(i=new Ko("onChange","change",null,i,l),n.push({event:i,listeners:s}))}var wi=null,_i=null;function y_(n){Pg(n,0)}function Qo(n){var s=pi(n);if(zf(s))return n}function rp(n,s){if(n==="change")return s}var sp=!1;if(cr){var gu;if(cr){var yu="oninput"in document;if(!yu){var ap=document.createElement("div");ap.setAttribute("oninput","return;"),yu=typeof ap.oninput=="function"}gu=yu}else gu=!1;sp=gu&&(!document.documentMode||9<document.documentMode)}function ip(){wi&&(wi.detachEvent("onpropertychange",op),_i=wi=null)}function op(n){if(n.propertyName==="value"&&Qo(_i)){var s=[];np(s,_i,n,ou(n)),Ff(y_,s)}}function v_(n,s,i){n==="focusin"?(ip(),wi=s,_i=i,wi.attachEvent("onpropertychange",op)):n==="focusout"&&ip()}function b_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Qo(_i)}function w_(n,s){if(n==="click")return Qo(s)}function __(n,s){if(n==="input"||n==="change")return Qo(s)}function S_(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var cn=typeof Object.is=="function"?Object.is:S_;function Si(n,s){if(cn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var i=Object.keys(n),l=Object.keys(s);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!Mt.call(s,d)||!cn(n[d],s[d]))return!1}return!0}function lp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function cp(n,s){var i=lp(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=s&&l>=s)return{node:i,offset:s-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=lp(i)}}function up(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?up(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function dp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=qo(n.document);s instanceof n.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)n=s.contentWindow;else break;s=qo(n.document)}return s}function vu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var E_=cr&&"documentMode"in document&&11>=document.documentMode,ba=null,bu=null,Ei=null,wu=!1;function hp(n,s,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;wu||ba==null||ba!==qo(l)||(l=ba,"selectionStart"in l&&vu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focu
vendor: 16,403 bytes, line 9
9sNode:l.focusNode,focusOffset:l.focusOffset}),Ei&&Si(Ei,l)||(Ei=l,l=zl(bu,"onSelect"),0<l.length&&(s=new Ko("onSelect","select",null,s,i),n.push({event:s,listeners:l}),s.target=ba)))}function js(n,s){var i={};return i[n.toLowerCase()]=s.toLowerCase(),i["Webkit"+n]="webkit"+s,i["Moz"+n]="moz"+s,i}var wa={animationend:js("Animation","AnimationEnd"),animationiteration:js("Animation","AnimationIteration"),animationstart:js("Animation","AnimationStart"),transitionrun:js("Transition","TransitionRun"),transitionstart:js("Transition","TransitionStart"),transitioncancel:js("Transition","TransitionCancel"),transitionend:js("Transition","TransitionEnd")},_u={},fp={};cr&&(fp=document.createElement("div").style,"AnimationEvent"in window||(delete wa.animationend.animation,delete wa.animationiteration.animation,delete wa.animationstart.animation),"TransitionEvent"in window||delete wa.transitionend.transition);function Ns(n){if(_u[n])return _u[n];if(!wa[n])return n;var s=wa[n],i;for(i in s)if(s.hasOwnProperty(i)&&i in fp)return _u[n]=s[i];return n}var pp=Ns("animationend"),mp=Ns("animationiteration"),gp=Ns("animationstart"),x_=Ns("transitionrun"),T_=Ns("transitionstart"),A_=Ns("transitioncancel"),yp=Ns("transitionend"),vp=new Map,Su="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Su.push("scrollEnd");function zn(n,s){vp.set(n,s),Os(s,[n])}var Jo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},En=[],_a=0,Eu=0;function Xo(){for(var n=_a,s=Eu=_a=0;s<n;){var i=En[s];En[s++]=null;var l=En[s];En[s++]=null;var d=En[s];En[s++]=null;var f=En[s];if(En[s++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}f!==0&&bp(i,d,f)}}function Wo(n,s,i,l){En[_a++]=n,En[_a++]=s,En[_a++]=i,En[_a++]=l,Eu|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function xu(n,s,i,l){return Wo(n,s,i,l),Zo(n)}function Ms(n,s){return Wo(n,null,null,s),Zo(n)}function bp(n,s,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var d=!1,f=n.return;f!==null;)f.childLanes|=i,l=f.alternate,l!==null&&(l.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(d=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,d&&s!==null&&(d=31-Bt(i),n=f.hiddenUpdates,l=n[d],l===null?n[d]=[s]:l.push(s),s.lane=i|536870912),f):null}function Zo(n){if(50<Vi)throw Vi=0,Md=null,Error(a(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var Sa={};function R_(n,s,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(n,s,i,l){return new R_(n,s,i,l)}function Tu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ur(n,s){var i=n.alternate;return i===null?(i=un(n.tag,s,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=s,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,s=n.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function wp(n,s){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,s=i.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function el(n,s,i,l,d,f){var v=0;if(l=n,typeof n=="function")Tu(n)&&(v=1);else if(typeof n=="string")v=NS(n,i,Z.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=un(31,i,s,d),n.elementType=J,n.lanes=f,n;case A:return Ds(i.children,d,f,s);case E:v=8,d|=24;break;case x:return n=un(12,i,s,d|2),n.elementType=x,n.lanes=f,n;case X:return n=un(13,i,s,d),n.elementType=X,n.lanes=f,n;case V:return n=un(19,i,s,d),n.elementType=V,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 U:v=11;break e;case q:v=14;break e;case z:v=16,l=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),l=null}return s=un(v,i,s,d),s.elementType=n,s.type=l,s.lanes=f,s}function Ds(n,s,i,l){return n=un(7,n,l,s),n.lanes=i,n}function Au(n,s,i){return n=un(6,n,null,s),n.lanes=i,n}function _p(n){var s=un(18,null,null,0);return s.stateNode=n,s}function Ru(n,s,i){return s=un(4,n.children!==null?n.children:[],n.key,s),s.lanes=i,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var Sp=new WeakMap;function xn(n,s){if(typeof n=="object"&&n!==null){var i=Sp.get(n);return i!==void 0?i:(s={value:n,source:s,stack:bn(s)},Sp.set(n,s),s)}return{value:n,source:s,stack:bn(s)}}var Ea=[],xa=0,tl=null,xi=0,Tn=[],An=0,Pr=null,Yn=1,Qn="";function dr(n,s){Ea[xa++]=xi,Ea[xa++]=tl,tl=n,xi=s}function Ep(n,s,i){Tn[An++]=Yn,Tn[An++]=Qn,Tn[An++]=Pr,Pr=n;var l=Yn;n=Qn;var d=32-Bt(l)-1;l&=~(1<<d),i+=1;var f=32-Bt(s)+d;if(30<f){var v=d-d%5;f=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Yn=1<<32-Bt(s)+d|i<<d|l,Qn=f+n}else Yn=1<<f|i<<d|l,Qn=n}function Cu(n){n.return!==null&&(dr(n,1),Ep(n,1,0))}function Ou(n){for(;n===tl;)tl=Ea[--xa],Ea[xa]=null,xi=Ea[--xa],Ea[xa]=null;for(;n===Pr;)Pr=Tn[--An],Tn[An]=null,Qn=Tn[--An],Tn[An]=null,Yn=Tn[--An],Tn[An]=null}function xp(n,s){Tn[An++]=Yn,Tn[An++]=Qn,Tn[An++]=Pr,Yn=s.id,Qn=s.overflow,Pr=n}var Lt=null,Qe=null,De=!1,Br=null,Rn=!1,ku=Error(a(519));function Ir(n){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ti(xn(s,n)),ku}function Tp(n){var s=n.stateNode,i=n.type,l=n.memoizedProps;switch(s[Dt]=n,s[Jt]=l,i){case"dialog":je("cancel",s),je("close",s);break;case"iframe":case"object":case"embed":je("load",s);break;case"video":case"audio":for(i=0;i<Ki.length;i++)je(Ki[i],s);break;case"source":je("error",s);break;case"img":case"image":case"link":je("error",s),je("load",s);break;case"details":je("toggle",s);break;case"input":je("invalid",s),Pf(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":je("invalid",s);break;case"textarea":je("invalid",s),If(s,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||l.suppressHydrationWarning===!0||qg(s.textContent,i)?(l.popover!=null&&(je("beforetoggle",s),je("toggle",s)),l.onScroll!=null&&je("scroll",s),l.onScrollEnd!=null&&je("scrollend",s),l.onClick!=null&&(s.onclick=lr),s=!0):s=!1,s||Ir(n,!0)}function Ap(n){for(Lt=n.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Lt=Lt.return}}function Ta(n){if(n!==Lt)return!1;if(!De)return Ap(n),De=!0,!1;var s=n.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Yd(n.type,n.memoizedProps)),i=!i),i&&Qe&&Ir(n),Ap(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Qe=Xg(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Qe=Xg(n)}else s===27?(s=Qe,es(n.type)?(n=Zd,Zd=null,Qe=n):Qe=s):Qe=Lt?On(n.stateNode.nextSibling):null;return!0}function Ls(){Qe=Lt=null,De=!1}function ju(){var n=Br;return n!==null&&(tn===null?tn=n:tn.push.apply(tn,n),Br=null),n}function Ti(n){Br===null?Br=[n]:Br.push(n)}var Nu=O(null),Us=null,hr=null;function Hr(n,s,i){K(Nu,s._currentValue),s._currentValue=i}function fr(n){n._currentValue=Nu.current,F(Nu)}function Mu(n,s,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===i)break;n=n.return}}function Du(n,s,i,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var f=d.dependencies;if(f!==null){var v=d.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=d;for(var C=0;C<s.length;C++)if(S.context===s[C]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),Mu(f.return,i,n),l||(v=null);break e}f=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),Mu(v,i,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function Aa(n,s,i,l){n=null;for(var d=s,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=d.type;cn(d.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(d===Se.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Wi):n=[Wi])}d=d.return}n!==null&&Du(s,n,i,l),s.flags|=262144}function nl(n){for(n=n.firstContext;n!==null;){if(!cn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function zs(n){Us=n,hr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Ut(n){return Rp(Us,n)}function rl(n,s){return Us===null&&zs(n),Rp(n,s)}function Rp(n,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},hr===null){if(n===null)throw Error(a(308));hr=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else hr=hr.next=s;return i}var C_=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){s.aborted=!0,n.forEach(function(i){return i()})}},O_=e.unstable_scheduleCallback,k_=e.unstable_NormalPriority,ct={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lu(){return{controller:new C_,data:new Map,refCount:0}}function Ai(n){n.refCount--,n.refCount===0&&O_(k_,function(){n.controller.abort()})}var Ri=null,Uu=0,Ra=0,Ca=null;function j_(n,s){if(Ri===null){var i=Ri=[];Uu=0,Ra=Bd(),Ca={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Uu++,s.then(Cp,Cp),s}function Cp(){if(--Uu===0&&Ri!==null){Ca!==null&&(Ca.status="fulfilled");var n=Ri;Ri=null,Ra=0,Ca=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function N_(n,s){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){l.status="fulfilled",l.value=s;for(var d=0;d<i.length;d++)(0,i[d])(s)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var Op=L.S;L.S=function(n,s){hg=Et(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&j_(n,s),Op!==null&&Op(n,s)};var Ps=O(null);function zu(){var n=Ps.current;return n!==null?n:Ge.pooledCache}function sl(n,s){s===null?K(Ps,Ps.current):K(Ps,s.pool)}function kp(){var n=zu();return n===null?null:{parent:ct._currentValue,pool:n}}var Oa=Error(a(460)),Pu=Error(a(474)),al=Error(a(542)),il={then:function(){}};function jp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Np(n,s,i){switch(i=n[i],i===void 0?n.push(s):i!==s&&(s.then(lr,lr),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Dp(n),n;default:if(typeof s.status=="string")s.then(lr,lr);else{if(n=Ge,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=s,n.status="pending",n.then(function(l){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=l}},function(l){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Dp(n),n}throw Is=s,Oa}}function Bs(n){try{var s=n._init;return s(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Is=i,Oa):i}}var Is=null;function Mp(){if(Is===null)throw Error(a(459));var n=Is;return Is=null,n}function Dp(n){if(n===Oa||n===al)throw Error(a(483))}var ka=null,Ci=0;function ol(n){var s=Ci;return Ci+=1,ka===null&&(ka=[]),Np(ka,n,s)}function Oi(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function ll(n,s){throw s.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(s),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function Lp(n){function s(D,k){if(n){var P=D.deletions;P===null?(D.deletions=[k],D.flags|=16):P.push(k)}}function i(D,k){if(!n)return null;for(;k!==null;)s(D,k),k=k.sibling;return null}function l(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 d(D,k){return D=ur(D,k),D.index=0,D.sibling=null,D}function f(D,k,P){return D.index=P,n?(P=D.alternate,P!==null?(P=P.index,P<k?(D.flags|=67108866,k):P):(D.flags|=67108866,k)):(D.flags|=1048576,k)}function v(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function S(D,k,P,G){return k===null||k.tag!==6?(k=Au(P,D.mode,G),k.return=D,k):(k=d(k,P),k.return=D,k)}function C(D,k,P,G){var fe=P.type;return fe===A?$(D,k,P.props.children,G,P.key):k!==null&&(k.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===z&&Bs(fe)===k.type)?(k=d(k,P.props),Oi(k,P),k.return=D,k):(k=el(P.type,P.key,P.props,null,D.mode,G),Oi(k,P),k.return=D,k)}function B(D,k,P,G){return k===null||k.tag!==4||k.stateNode.containerInfo!==P.containerInfo||k.stateNode.implementation!==P.implementation?(k=Ru(P,D.mode,G),k.return=D,k):(k=d(k,P.children||[]),k.return=D,k)}function $(D,k,P,G,fe){return k===null||k.tag!==7?(k=Ds(P,D.mode,G,fe),k.return=D,k):(k=d(k,P),k.return=D,k)}function Y(D,k,P){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Au(""+k,D.mode,P),k.return=D,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case w:return P=el(k.type,k.key,k.props,null,D.mode,P),Oi(P,k),P.return=D,P;case _:return k=Ru(k,D.mode,P),k.return=D,k;case z:return k=Bs(k),Y(D,k,P)}if(Oe(k)||we(k))return k=Ds(k,D.mode,P,null),k.return=D,k;if(typeof k.then=="function")return Y(D,ol(k),P);if(k.$$typeof===j)return Y(D,rl(D,k),P);ll(D,k)}return null}function I(D,k,P,G){var fe=k!==null?k.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return fe!==null?null:S(D,k,""+P,G);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case w:return P.key===fe?C(D,k,P,G):null;case _:return P.key===fe?B(D,k,P,G):null;case z:return P=Bs(P),I(D,k,P,G)}if(Oe(P)||we(P))return fe!==null?null:$(D,k,P,G,null);if(typeof P.then=="function")return I(D,k,ol(P),G);if(P.$$typeof===j)return I(D,k,rl(D,P),G);ll(D,P)}return null}function H(D,k,P,G,fe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return D=D.get(P)||null,S(k,D,""+G,fe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return D=D.get(G.key===null?P:G.key)||null,C(k,D,G,fe);case _:return D=D.get(G.key===null?P:G.key)||null,B(k,D,G,fe);case z:return G=Bs(G),H(D,k,P,G,fe)}if(Oe(G)||we(G))return D=D.get(P)||null,$(k,D,G,fe,null);if(typeof G.then=="function")return H(D,k,P,ol(G),fe);if(G.$$typeof===j)return H(D,k,P,rl(k,G),fe);ll(k,G)}return null}function oe(D,k,P,G){for(var fe=null,Le=null,de=k,Re=k=0,Me=null;de!==null&&Re<P.length;Re++){de.index>
vendor: 5,354 bytes, line 9
9Re?(Me=de,de=null):Me=de.sibling;var Ue=I(D,de,P[Re],G);if(Ue===null){de===null&&(de=Me);break}n&&de&&Ue.alternate===null&&s(D,de),k=f(Ue,k,Re),Le===null?fe=Ue:Le.sibling=Ue,Le=Ue,de=Me}if(Re===P.length)return i(D,de),De&&dr(D,Re),fe;if(de===null){for(;Re<P.length;Re++)de=Y(D,P[Re],G),de!==null&&(k=f(de,k,Re),Le===null?fe=de:Le.sibling=de,Le=de);return De&&dr(D,Re),fe}for(de=l(de);Re<P.length;Re++)Me=H(de,D,Re,P[Re],G),Me!==null&&(n&&Me.alternate!==null&&de.delete(Me.key===null?Re:Me.key),k=f(Me,k,Re),Le===null?fe=Me:Le.sibling=Me,Le=Me);return n&&de.forEach(function(as){return s(D,as)}),De&&dr(D,Re),fe}function me(D,k,P,G){if(P==null)throw Error(a(151));for(var fe=null,Le=null,de=k,Re=k=0,Me=null,Ue=P.next();de!==null&&!Ue.done;Re++,Ue=P.next()){de.index>Re?(Me=de,de=null):Me=de.sibling;var as=I(D,de,Ue.value,G);if(as===null){de===null&&(de=Me);break}n&&de&&as.alternate===null&&s(D,de),k=f(as,k,Re),Le===null?fe=as:Le.sibling=as,Le=as,de=Me}if(Ue.done)return i(D,de),De&&dr(D,Re),fe;if(de===null){for(;!Ue.done;Re++,Ue=P.next())Ue=Y(D,Ue.value,G),Ue!==null&&(k=f(Ue,k,Re),Le===null?fe=Ue:Le.sibling=Ue,Le=Ue);return De&&dr(D,Re),fe}for(de=l(de);!Ue.done;Re++,Ue=P.next())Ue=H(de,D,Re,Ue.value,G),Ue!==null&&(n&&Ue.alternate!==null&&de.delete(Ue.key===null?Re:Ue.key),k=f(Ue,k,Re),Le===null?fe=Ue:Le.sibling=Ue,Le=Ue);return n&&de.forEach(function($S){return s(D,$S)}),De&&dr(D,Re),fe}function Ve(D,k,P,G){if(typeof P=="object"&&P!==null&&P.type===A&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case w:e:{for(var fe=P.key;k!==null;){if(k.key===fe){if(fe=P.type,fe===A){if(k.tag===7){i(D,k.sibling),G=d(k,P.props.children),G.return=D,D=G;break e}}else if(k.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===z&&Bs(fe)===k.type){i(D,k.sibling),G=d(k,P.props),Oi(G,P),G.return=D,D=G;break e}i(D,k);break}else s(D,k);k=k.sibling}P.type===A?(G=Ds(P.props.children,D.mode,G,P.key),G.return=D,D=G):(G=el(P.type,P.key,P.props,null,D.mode,G),Oi(G,P),G.return=D,D=G)}return v(D);case _:e:{for(fe=P.key;k!==null;){if(k.key===fe)if(k.tag===4&&k.stateNode.containerInfo===P.containerInfo&&k.stateNode.implementation===P.implementation){i(D,k.sibling),G=d(k,P.children||[]),G.return=D,D=G;break e}else{i(D,k);break}else s(D,k);k=k.sibling}G=Ru(P,D.mode,G),G.return=D,D=G}return v(D);case z:return P=Bs(P),Ve(D,k,P,G)}if(Oe(P))return oe(D,k,P,G);if(we(P)){if(fe=we(P),typeof fe!="function")throw Error(a(150));return P=fe.call(P),me(D,k,P,G)}if(typeof P.then=="function")return Ve(D,k,ol(P),G);if(P.$$typeof===j)return Ve(D,k,rl(D,P),G);ll(D,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,k!==null&&k.tag===6?(i(D,k.sibling),G=d(k,P),G.return=D,D=G):(i(D,k),G=Au(P,D.mode,G),G.return=D,D=G),v(D)):i(D,k)}return function(D,k,P,G){try{Ci=0;var fe=Ve(D,k,P,G);return ka=null,fe}catch(de){if(de===Oa||de===al)throw de;var Le=un(29,de,null,D.mode);return Le.lanes=G,Le.return=D,Le}}}var Hs=Lp(!0),Up=Lp(!1),qr=!1;function Bu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Iu(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function $r(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Fr(n,s,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Pe&2)!==0){var d=l.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s,s=Zo(n),bp(n,null,i),s}return Wo(n,l,s,i),Zo(n)}function ki(n,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,Yt(n,i)}}function Hu(n,s){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?d=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?d=f=s:f=f.next=s}else d=f=s;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=s:n.next=s,i.lastBaseUpdate=s}var qu=!1;function ji(){if(qu){var n=Ca;if(n!==null)throw n}}function Ni(n,s,i,l){qu=!1;var d=n.updateQueue;qr=!1;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var C=S,B=C.next;C.next=null,v===null?f=B:v.next=B,v=C;var $=n.alternate;$!==null&&($=$.updateQueue,S=$.lastBaseUpdate,S!==v&&(S===null?$.firstBaseUpdate=B:S.next=B,$.lastBaseUpdate=C))}if(f!==null){var Y=d.baseState;v=0,$=B=C=null,S=f;do{var I=S.lane&-536870913,H=I!==S.lane;if(H?(Ne&I)===I:(l&I)===I){I!==0&&I===Ra&&(qu=!0),$!==null&&($=$.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var oe=n,me=S;I=s;var Ve=i;switch(me.tag){case 1:if(oe=me.payload,typeof oe=="function"){Y=oe.call(Ve,Y,I);break e}Y=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=me.payload,I=typeof oe=="function"?oe.call(Ve,Y,I):oe,I==null)break e;Y=g({},Y,I);break e;case 2:qr=!0}}I=S.callback,I!==null&&(n.flags|=64,H&&(n.flags|=8192),H=d.callbacks,H===null?d.callbacks=[I]:H.push(I))}else H={lane:I,tag:S.tag,payload:S.payload,callback:S.callback,next:null}
vendor: 5,703 bytes, line 9
9,$===null?(B=$=H,C=Y):$=$.next=H,v|=I;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;H=S,S=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);$===null&&(C=Y),d.baseState=C,d.firstBaseUpdate=B,d.lastBaseUpdate=$,f===null&&(d.shared.lanes=0),Qr|=v,n.lanes=v,n.memoizedState=Y}}function zp(n,s){if(typeof n!="function")throw Error(a(191,n));n.call(s)}function Pp(n,s){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)zp(i[n],s)}var ja=O(null),cl=O(0);function Bp(n,s){n=Sr,K(cl,n),K(ja,s),Sr=n|s.baseLanes}function $u(){K(cl,Sr),K(ja,ja.current)}function Fu(){Sr=cl.current,F(ja),F(cl)}var dn=O(null),Cn=null;function Vr(n){var s=n.alternate;K(at,at.current&1),K(dn,n),Cn===null&&(s===null||ja.current!==null||s.memoizedState!==null)&&(Cn=n)}function Vu(n){K(at,at.current),K(dn,n),Cn===null&&(Cn=n)}function Ip(n){n.tag===22?(K(at,at.current),K(dn,n),Cn===null&&(Cn=n)):Gr()}function Gr(){K(at,at.current),K(dn,dn.current)}function hn(n){F(dn),Cn===n&&(Cn=null),F(at)}var at=O(0);function ul(n){for(var s=n;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Xd(i)||Wd(i)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var pr=0,Ae=null,$e=null,ut=null,dl=!1,Na=!1,qs=!1,hl=0,Mi=0,Ma=null,M_=0;function nt(){throw Error(a(321))}function Gu(n,s){if(s===null)return!1;for(var i=0;i<s.length&&i<n.length;i++)if(!cn(n[i],s[i]))return!1;return!0}function Ku(n,s,i,l,d,f){return pr=f,Ae=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=n===null||n.memoizedState===null?Em:ld,qs=!1,f=i(l,d),qs=!1,Na&&(f=qp(s,i,l,d)),Hp(n),f}function Hp(n){L.H=Ui;var s=$e!==null&&$e.next!==null;if(pr=0,ut=$e=Ae=null,dl=!1,Mi=0,Ma=null,s)throw Error(a(300));n===null||dt||(n=n.dependencies,n!==null&&nl(n)&&(dt=!0))}function qp(n,s,i,l){Ae=n;var d=0;do{if(Na&&(Ma=null),Mi=0,Na=!1,25<=d)throw Error(a(301));if(d+=1,ut=$e=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=xm,f=s(i,l)}while(Na);return f}function D_(){var n=L.H,s=n.useState()[0];return s=typeof s.then=="function"?Di(s):s,n=n.useState()[0],($e!==null?$e.memoizedState:null)!==n&&(Ae.flags|=1024),s}function Yu(){var n=hl!==0;return hl=0,n}function Qu(n,s,i){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~i}function Ju(n){if(dl){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}dl=!1}pr=0,ut=$e=Ae=null,Na=!1,Mi=hl=0,Ma=null}function Ft(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?Ae.memoizedState=ut=n:ut=ut.next=n,ut}function it(){if($e===null){var n=Ae.alternate;n=n!==null?n.memoizedState:null}else n=$e.next;var s=ut===null?Ae.memoizedState:ut.next;if(s!==null)ut=s,$e=n;else{if(n===null)throw Ae.alternate===null?Error(a(467)):Error(a(310));$e=n,n={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},ut===null?Ae.memoizedState=ut=n:ut=ut.next=n}return ut}function fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Di(n){var s=Mi;return Mi+=1,Ma===null&&(Ma=[]),n=Np(Ma,n,s),s=Ae,(ut===null?s.memoizedState:ut.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?Em:ld),n}function pl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Di(n);if(n.$$typeof===j)return Ut(n)}throw Error(a(438,String(n)))}function Xu(n){var s=null,i=Ae.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var l=Ae.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=fl(),Ae.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(n),l=0;l<n;l++)i[l]=he;return s.index++,i}function mr(n,s){return typeof s=="function"?s(n):s}function ml(n){var s=it();return Wu(s,$e,n)}function Wu(n,s,i){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var d=n.baseQueue,f=l.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}s.baseQueue=d=f,l.pending=null}if(f=n.baseState,d===null)n.memoizedState=f;else{s=d.next;var S=v=null,C=null,B=s,$=!1;do{var Y=B.lane&-536870913;if(Y!==B.lane?(Ne&Y)===Y:(pr&Y)===Y){var I=B.revertLane;if(I===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Y===Ra&&($=!0);else if((pr&I)===I){B=B.next,I===Ra&&($=!0);continue}else Y={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(S=C=Y,v=f):C=C.next=Y,Ae.lanes|=I,Qr|=I;Y=B.action,qs&&i(f,Y),f=B.hasEagerState?B.eagerState:i(f,Y)}else I={lane:Y,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(S=C=I,v=f):C=C.next=I,Ae.lanes|=Y,Qr|=Y;B=B.next}while(B!==null&&B!==s);if(C===null?v=f:C.next=S,!cn(f,n.memoizedState)&&(dt=!0,$&&(i=Ca,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=C,l.lastRenderedState=f}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function Zu(n){var s=it(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;
vendor: 4,272 bytes, line 9
9var l=i.dispatch,d=i.pending,f=s.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do f=n(f,v.action),v=v.next;while(v!==d);cn(f,s.memoizedState)||(dt=!0),s.memoizedState=f,s.baseQueue===null&&(s.baseState=f),i.lastRenderedState=f}return[f,l]}function $p(n,s,i){var l=Ae,d=it(),f=De;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!cn(($e||d).memoizedState,i);if(v&&(d.memoizedState=i,dt=!0),d=d.queue,nd(Gp.bind(null,l,d,n),[n]),d.getSnapshot!==s||v||ut!==null&&ut.memoizedState.tag&1){if(l.flags|=2048,Da(9,{destroy:void 0},Vp.bind(null,l,d,i,s),null),Ge===null)throw Error(a(349));f||(pr&127)!==0||Fp(l,s,i)}return i}function Fp(n,s,i){n.flags|=16384,n={getSnapshot:s,value:i},s=Ae.updateQueue,s===null?(s=fl(),Ae.updateQueue=s,s.stores=[n]):(i=s.stores,i===null?s.stores=[n]:i.push(n))}function Vp(n,s,i,l){s.value=i,s.getSnapshot=l,Kp(s)&&Yp(n)}function Gp(n,s,i){return i(function(){Kp(s)&&Yp(n)})}function Kp(n){var s=n.getSnapshot;n=n.value;try{var i=s();return!cn(n,i)}catch{return!0}}function Yp(n){var s=Ms(n,2);s!==null&&nn(s,n,2)}function ed(n){var s=Ft();if(typeof n=="function"){var i=n;if(n=i(),qs){Ln(!0);try{i()}finally{Ln(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:n},s}function Qp(n,s,i,l){return n.baseState=i,Wu(n,$e,typeof l=="function"?l:mr)}function L_(n,s,i,l,d){if(vl(n))throw Error(a(485));if(n=s.action,n!==null){var f={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};L.T!==null?i(!0):f.isTransition=!1,l(f),i=s.pending,i===null?(f.next=s.pending=f,Jp(s,f)):(f.next=i.next,s.pending=i.next=f)}}function Jp(n,s){var i=s.action,l=s.payload,d=n.state;if(s.isTransition){var f=L.T,v={};L.T=v;try{var S=i(d,l),C=L.S;C!==null&&C(v,S),Xp(n,s,S)}catch(B){td(n,s,B)}finally{f!==null&&v.types!==null&&(f.types=v.types),L.T=f}}else try{f=i(d,l),Xp(n,s,f)}catch(B){td(n,s,B)}}function Xp(n,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Wp(n,s,l)},function(l){return td(n,s,l)}):Wp(n,s,i)}function Wp(n,s,i){s.status="fulfilled",s.value=i,Zp(s),n.state=i,s=n.pending,s!==null&&(i=s.next,i===s?n.pending=null:(i=i.next,s.next=i,Jp(n,i)))}function td(n,s,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=i,Zp(s),s=s.next;while(s!==l)}n.action=null}function Zp(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function em(n,s){return s}function tm(n,s){if(De){var i=Ge.formState;if(i!==null){e:{var l=Ae;if(De){if(Qe){t:{for(var d=Qe,f=Rn;d.nodeType!==8;){if(!f){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f==="F!"||f==="F"?d:null}if(d){Qe=On(d.nextSibling),l=d.data==="F!";break e}}Ir(l)}l=!1}l&&(s=i[0])}}return i=Ft(),i.memoizedState=i.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:s},i.queue=l,i=wm.bind(null,Ae,l),l.dispatch=i,l=ed(!1),f=od.bind(null,Ae,!1,l.queue),l=Ft(),d={state:s,dispatch:null,action:n,pending:null},l.queue=d,i=L_.bind(null,Ae,d,f,i),d.dispatch=i,l.memoizedState=n,[s,i,!1]}function nm(n){var s=it();return rm(s,$e,n)}function rm(n,s,i){if(s=Wu(n,s,em)[0],n=ml(mr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=Di(s)}catch(v){throw v===Oa?al:v}else l=s;s=it();var d=s.queue,f=d.dispatch;return i!==s.memoizedState&&(Ae.flags|=2048,Da(9,{destroy:void 0},U_.bind(null,d,i),null)),[l,f,n]}function U_(n,s){n.action=s}function sm(n){var s=it(),i=$e;if(i!==null)return rm(s,i,n);it(),s=s.memoizedState,i=it();var l=i.queue.dispatch;return i.memoizedState=n,[s,l,!1]}function Da(n,s,i,l){return n={tag:n,create:i,deps:l,inst:s,next:null},s=Ae.updateQueue,s===null&&(s=fl(),Ae.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,s.lastEffect=n),n}function am(){return it().memoizedState}function gl(n,s,i,l){var d=Ft();Ae.flags|=n,d.memoizedState=Da(1|s,{destroy:void 0},i,l===void 0?null:l)}function yl(n,s,i,l){var d=it();l=l===void 0?null:l;var f=d.memoizedState.inst;$e!==null&&l!==null&&Gu(l,$e.memoizedState.deps)?d.memoizedState=Da(s,f,i,l):(Ae.flags|=n,d.memoizedState=Da(1|s,f,i,l))}function im(n,s){gl(8390656,8,n,s)}
vendor: 4,911 bytes, line 9
9function nd(n,s){yl(2048,8,n,s)}function z_(n){Ae.flags|=4;var s=Ae.updateQueue;if(s===null)s=fl(),Ae.updateQueue=s,s.events=[n];else{var i=s.events;i===null?s.events=[n]:i.push(n)}}function om(n){var s=it().memoizedState;return z_({ref:s,nextImpl:n}),function(){if((Pe&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function lm(n,s){return yl(4,2,n,s)}function cm(n,s){return yl(4,4,n,s)}function um(n,s){if(typeof s=="function"){n=n();var i=s(n);return function(){typeof i=="function"?i():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function dm(n,s,i){i=i!=null?i.concat([n]):null,yl(4,4,um.bind(null,s,n),i)}function rd(){}function hm(n,s){var i=it();s=s===void 0?null:s;var l=i.memoizedState;return s!==null&&Gu(s,l[1])?l[0]:(i.memoizedState=[n,s],n)}function fm(n,s){var i=it();s=s===void 0?null:s;var l=i.memoizedState;if(s!==null&&Gu(s,l[1]))return l[0];if(l=n(),qs){Ln(!0);try{n()}finally{Ln(!1)}}return i.memoizedState=[l,s],l}function sd(n,s,i){return i===void 0||(pr&1073741824)!==0&&(Ne&261930)===0?n.memoizedState=s:(n.memoizedState=i,n=pg(),Ae.lanes|=n,Qr|=n,i)}function pm(n,s,i,l){return cn(i,s)?i:ja.current!==null?(n=sd(n,i,l),cn(n,s)||(dt=!0),n):(pr&42)===0||(pr&1073741824)!==0&&(Ne&261930)===0?(dt=!0,n.memoizedState=i):(n=pg(),Ae.lanes|=n,Qr|=n,s)}function mm(n,s,i,l,d){var f=Q.p;Q.p=f!==0&&8>f?f:8;var v=L.T,S={};L.T=S,od(n,!1,s,i);try{var C=d(),B=L.S;if(B!==null&&B(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var $=N_(C,l);Li(n,s,$,mn(n))}else Li(n,s,l,mn(n))}catch(Y){Li(n,s,{then:function(){},status:"rejected",reason:Y},mn())}finally{Q.p=f,v!==null&&S.types!==null&&(v.types=S.types),L.T=v}}function P_(){}function ad(n,s,i,l){if(n.tag!==5)throw Error(a(476));var d=gm(n).queue;mm(n,d,s,ae,i===null?P_:function(){return ym(n),i(l)})}function gm(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:ae},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:i},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function ym(n){var s=gm(n);s.next===null&&(s=n.alternate.memoizedState),Li(n,s.next.queue,{},mn())}function id(){return Ut(Wi)}function vm(){return it().memoizedState}function bm(){return it().memoizedState}function B_(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var i=mn();n=$r(i);var l=Fr(s,n,i);l!==null&&(nn(l,s,i),ki(l,s,i)),s={cache:Lu()},n.payload=s;return}s=s.return}}function I_(n,s,i){var l=mn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},vl(n)?_m(s,i):(i=xu(n,s,i,l),i!==null&&(nn(i,n,l),Sm(i,s,l)))}function wm(n,s,i){var l=mn();Li(n,s,i,l)}function Li(n,s,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(vl(n))_m(s,d);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=s.lastRenderedReducer,f!==null))try{var v=s.lastRenderedState,S=f(v,i);if(d.hasEagerState=!0,d.eagerState=S,cn(S,v))return Wo(n,s,d,0),Ge===null&&Xo(),!1}catch{}if(i=xu(n,s,d,l),i!==null)return nn(i,n,l),Sm(i,s,l),!0}return!1}function od(n,s,i,l){if(l={lane:2,revertLane:Bd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},vl(n)){if(s)throw Error(a(479))}else s=xu(n,i,l,2),s!==null&&nn(s,n,2)}function vl(n){var s=n.alternate;return n===Ae||s!==null&&s===Ae}function _m(n,s){Na=dl=!0;var i=n.pending;i===null?s.next=s:(s.next=i.next,i.next=s),n.pending=s}function Sm(n,s,i){if((i&4194048)!==0){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,Yt(n,i)}}var Ui={readContext:Ut,use:pl,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};Ui.useEffectEvent=nt;var Em={readContext:Ut,use:pl,useCallback:function(n,s){return Ft().memoizedState=[n,s===void 0?null:s],n},useContext:Ut,useEffect:im,useImperativeHandle:function(n,s,i){i=i!=null?i.concat([n]):null,gl(4194308,4,um.bind(null,s,n),i)},useLayoutEffect:function(n,s){return gl(4194308,4,n,s)},useInsertionEffect:function(n,s){gl(4,2,n,s)},useMemo:function(n,s){var i=Ft();s=s===void 0?null:s;var l=n();if(qs){Ln(!0);try{n()}finally{Ln(!1)}}return i.memoizedState=[l,s],l},useReducer:function(n,s,i){var l=Ft();if(i!==void 0){var d=i(s);if(qs){Ln(!0);try{i(s)}finally{Ln(!1)}}}else d=s;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=I_.bind(null,Ae,n),[l.memoizedState,n]}
vendor: 20,015 bytes, line 9
9,useRef:function(n){var s=Ft();return n={current:n},s.memoizedState=n},useState:function(n){n=ed(n);var s=n.queue,i=wm.bind(null,Ae,s);return s.dispatch=i,[n.memoizedState,i]},useDebugValue:rd,useDeferredValue:function(n,s){var i=Ft();return sd(i,n,s)},useTransition:function(){var n=ed(!1);return n=mm.bind(null,Ae,n.queue,!0,!1),Ft().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,i){var l=Ae,d=Ft();if(De){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),Ge===null)throw Error(a(349));(Ne&127)!==0||Fp(l,s,i)}d.memoizedState=i;var f={value:i,getSnapshot:s};return d.queue=f,im(Gp.bind(null,l,f,n),[n]),l.flags|=2048,Da(9,{destroy:void 0},Vp.bind(null,l,f,i,s),null),i},useId:function(){var n=Ft(),s=Ge.identifierPrefix;if(De){var i=Qn,l=Yn;i=(l&~(1<<32-Bt(l)-1)).toString(32)+i,s="_"+s+"R_"+i,i=hl++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=M_++,s="_"+s+"r_"+i.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:id,useFormState:tm,useActionState:tm,useOptimistic:function(n){var s=Ft();s.memoizedState=s.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=od.bind(null,Ae,!0,i),i.dispatch=s,[n,s]},useMemoCache:Xu,useCacheRefresh:function(){return Ft().memoizedState=B_.bind(null,Ae)},useEffectEvent:function(n){var s=Ft(),i={impl:n};return s.memoizedState=i,function(){if((Pe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},ld={readContext:Ut,use:pl,useCallback:hm,useContext:Ut,useEffect:nd,useImperativeHandle:dm,useInsertionEffect:lm,useLayoutEffect:cm,useMemo:fm,useReducer:ml,useRef:am,useState:function(){return ml(mr)},useDebugValue:rd,useDeferredValue:function(n,s){var i=it();return pm(i,$e.memoizedState,n,s)},useTransition:function(){var n=ml(mr)[0],s=it().memoizedState;return[typeof n=="boolean"?n:Di(n),s]},useSyncExternalStore:$p,useId:vm,useHostTransitionStatus:id,useFormState:nm,useActionState:nm,useOptimistic:function(n,s){var i=it();return Qp(i,$e,n,s)},useMemoCache:Xu,useCacheRefresh:bm};ld.useEffectEvent=om;var xm={readContext:Ut,use:pl,useCallback:hm,useContext:Ut,useEffect:nd,useImperativeHandle:dm,useInsertionEffect:lm,useLayoutEffect:cm,useMemo:fm,useReducer:Zu,useRef:am,useState:function(){return Zu(mr)},useDebugValue:rd,useDeferredValue:function(n,s){var i=it();return $e===null?sd(i,n,s):pm(i,$e.memoizedState,n,s)},useTransition:function(){var n=Zu(mr)[0],s=it().memoizedState;return[typeof n=="boolean"?n:Di(n),s]},useSyncExternalStore:$p,useId:vm,useHostTransitionStatus:id,useFormState:sm,useActionState:sm,useOptimistic:function(n,s){var i=it();return $e!==null?Qp(i,$e,n,s):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Xu,useCacheRefresh:bm};xm.useEffectEvent=om;function cd(n,s,i,l){s=n.memoizedState,i=i(l,s),i=i==null?s:g({},s,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var ud={enqueueSetState:function(n,s,i){n=n._reactInternals;var l=mn(),d=$r(l);d.payload=s,i!=null&&(d.callback=i),s=Fr(n,d,l),s!==null&&(nn(s,n,l),ki(s,n,l))},enqueueReplaceState:function(n,s,i){n=n._reactInternals;var l=mn(),d=$r(l);d.tag=1,d.payload=s,i!=null&&(d.callback=i),s=Fr(n,d,l),s!==null&&(nn(s,n,l),ki(s,n,l))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var i=mn(),l=$r(i);l.tag=2,s!=null&&(l.callback=s),s=Fr(n,l,i),s!==null&&(nn(s,n,i),ki(s,n,i))}};function Tm(n,s,i,l,d,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,f,v):s.prototype&&s.prototype.isPureReactComponent?!Si(i,l)||!Si(d,f):!0}function Am(n,s,i,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,l),s.state!==n&&ud.enqueueReplaceState(s,s.state,null)}function $s(n,s){var i=s;if("ref"in s){i={};for(var l in s)l!=="ref"&&(i[l]=s[l])}if(n=n.defaultProps){i===s&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function Rm(n){Jo(n)}function Cm(n){console.error(n)}function Om(n){Jo(n)}function bl(n,s){try{var i=n.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function km(n,s,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function dd(n,s,i){return i=$r(i),i.tag=3,i.payload={element:null},i.callback=function(){bl(n,s)},i}function jm(n){return n=$r(n),n.tag=3,n}function Nm(n,s,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var f=l.value;n.payload=function(){return d(f)},n.callback=function(){km(s,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){km(s,i,l),typeof d!="function"&&(Jr===null?Jr=new Set([this]):Jr.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function H_(n,s,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=i.alternate,s!==null&&Aa(s,i,d,!0),i=dn.current,i!==null){switch(i.tag){case 31:case 13:return Cn===null?jl():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===il?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([l]):s.add(l),Ud(n,l,d)),!1;case 22:return i.flags|=65536,l===il?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([l]):i.add(l)),Ud(n,l,d)),!1}throw Error(a(435,i.tag))}return Ud(n,l,d),jl(),!1}if(De)return s=dn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,l!==ku&&(n=Error(a(422),{cause:l}),Ti(xn(n,i)))):(l!==ku&&(s=Error(a(423),{cause:l}),Ti(xn(s,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=xn(l,i),d=dd(n.stateNode,l,d),Hu(n,d),rt!==4&&(rt=2)),!1;var f=Error(a(520),{cause:l});if(f=xn(f,i),Fi===null?Fi=[f]:Fi.push(f),rt!==4&&(rt=2),s===null)return!0;l=xn(l,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=dd(i.stateNode,l,n),Hu(i,n),!1;case 1:if(s=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Jr===null||!Jr.has(f))))return i.flags|=65536,d&=-d,i.lanes|=d,d=jm(d),Nm(d,n,i,l),Hu(i,d),!1}i=i.return}while(i!==null);return!1}var hd=Error(a(461)),dt=!1;function zt(n,s,i,l){s.child=n===null?Up(s,null,i,l):Hs(s,n.child,i,l)}function Mm(n,s,i,l,d){i=i.render;var f=s.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return zs(s),l=Ku(n,s,i,v,f,d),S=Yu(),n!==null&&!dt?(Qu(n,s,d),gr(n,s,d)):(De&&S&&Cu(s),s.flags|=1,zt(n,s,l,d),s.child)}function Dm(n,s,i,l,d){if(n===null){var f=i.type;return typeof f=="function"&&!Tu(f)&&f.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=f,Lm(n,s,f,l,d)):(n=el(i.type,null,l,s,s.mode,d),n.ref=s.ref,n.return=s,s.child=n)}if(f=n.child,!wd(n,d)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:Si,i(v,l)&&n.ref===s.ref)return gr(n,s,d)}return s.flags|=1,n=ur(f,l),n.ref=s.ref,n.return=s,s.child=n}function Lm(n,s,i,l,d){if(n!==null){var f=n.memoizedProps;if(Si(f,l)&&n.ref===s.ref)if(dt=!1,s.pendingProps=l=f,wd(n,d))(n.flags&131072)!==0&&(dt=!0);else return s.lanes=n.lanes,gr(n,s,d)}return fd(n,s,i,l,d)}function Um(n,s,i,l){var d=l.children,f=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(l=s.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~f}else l=0,s.child=null;return zm(n,s,f,i,l)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&sl(s,f!==null?f.cachePool:null),f!==null?Bp(s,f):$u(),Ip(s);else return l=s.lanes=536870912,zm(n,s,f!==null?f.baseLanes|i:i,i,l)}else f!==null?(sl(s,f.cachePool),Bp(s,f),Gr(),s.memoizedState=null):(n!==null&&sl(s,null),$u(),Gr());return zt(n,s,d,i),s.child}function zi(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function zm(n,s,i,l,d){var f=zu();return f=f===null?null:{parent:ct._currentValue,pool:f},s.memoizedState={baseLanes:i,cachePool:f},n!==null&&sl(s,null),$u(),Ip(s),n!==null&&Aa(n,s,l,!0),s.childLanes=d,null}function wl(n,s){return s=Sl({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function Pm(n,s,i){return Hs(s,n.child,null,i),n=wl(s,s.pendingProps),n.flags|=2,hn(s),s.memoizedState=null,n}function q_(n,s,i){var l=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(De){if(l.mode==="hidden")return n=wl(s,l),s.lanes=536870912,zi(null,n);if(Vu(s),(n=Qe)?(n=Jg(n,Rn),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Pr!==null?{id:Yn,overflow:Qn}:null,retryLane:536870912,hydrationErrors:null},i=_p(n),i.return=s,s.child=i,Lt=s,Qe=null)):n=null,n===null)throw Ir(s);return s.lanes=536870912,null}return wl(s,l)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(Vu(s),d)if(s.flags&256)s.flags&=-257,s=Pm(n,s,i);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(a(558));else if(dt||Aa(n,s,i,!1),d=(i&n.childLanes)!==0,dt||d){if(l=Ge,l!==null&&(v=Qt(l,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,Ms(n,v),nn(l,n,v),hd;jl(),s=Pm(n,s,i)}else n=f.treeContext,Qe=On(v.nextSibling),Lt=s,De=!0,Br=null,Rn=!1,n!==null&&xp(s,n),s=wl(s,l),s.flags|=4096;return s}return n=ur(n.child,{mode:l.mode,children:l.children}),n.ref=s.ref,s.child=n,n.return=s,n}function _l(n,s){var i=s.ref;if(i===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(s.flags|=4194816)}}function fd(n,s,i,l,d){return zs(s),i=Ku(n,s,i,l,void 0,d),l=Yu(),n!==null&&!dt?(Qu(n,s,d),gr(n,s,d)):(De&&l&&Cu(s),s.flags|=1,zt(n,s,i,d),s.child)}function Bm(n,s,i,l,d,f){return zs(s),s.updateQueue=null,i=qp(s,l,i,d),Hp(n),l=Yu(),n!==null&&!dt?(Qu(n,s,f),gr(n,s,f)):(De&&l&&Cu(s),s.flags|=1,zt(n,s,i,f),s.child)}function Im(n,s,i,l,d){if(zs(s),s.stateNode===null){var f=Sa,v=i.contextType;typeof v=="object"&&v!==null&&(f=Ut(v)),f=new i(l,f),s.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ud,s.stateNode=f,f._reactInternals=s,f=s.stateNode,f.props=l,f.state=s.memoizedState,f.refs={},Bu(s),v=i.contextType,f.context=typeof v=="object"&&v!==null?Ut(v):Sa,f.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(cd(s,i,v,l),f.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&ud.enqueueReplaceState(f,f.state,null),Ni(s,l,f,d),ji(),f.state=s.memoizedState),typeof f.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(n===null){f=s.stateNode;var S=s.memoizedProps,C=$s(i,S);f.props=C;var B=f.context,$=i.contextType;v=Sa,typeof $=="object"&&$!==null&&(v=Ut($));var Y=i.getDerivedStateFromProps;$=typeof Y=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||B!==v)&&Am(s,f,l,v),qr=!1;var I=s.memoizedState;f.state=I,Ni(s,l,f,d),ji(),B=s.memoizedState,S||I!==B||qr?(typeof Y=="function"&&(cd(s,i,Y,l),B=s.memoizedState),(C=qr||Tm(s,i,C,l,I,B,v))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(s.flags|=4194308)):(typeof f.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=B),f.props=l,f.state=B,f.context=v,l=C):(typeof f.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{f=s.stateNode,Iu(n,s),v=s.memoizedProps,$=$s(i,v),f.props=$,Y=s.pendingProps,I=f.context,B=i.contextType,C=Sa,typeof B=="object"&&B!==null&&(C=Ut(B)),S=i.getDerivedStateFromProps,(B=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==Y||I!==C)&&Am(s,f,l,C),qr=!1,I=s.memoizedState,f.state=I,Ni(s,l,f,d),ji();var H=s.memoizedState;v!==Y||I!==H||qr||n!==null&&n.dependencies!==null&&nl(n.dependencies)?(typeof S=="function"&&(cd(s,i,S,l),H=s.memoizedState),($=qr||Tm(s,i,$,l,I,H,C)||n!==null&&n.dependencies!==null&&nl(n.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,H,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,H,C)),typeof f.componentDidUpdate=="function"&&(s.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=H),f.props=l,f.state=H,f.context=C,l=$):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=1024),l=!1)}return f=l,_l(n,s),l=(s.flags&128)!==0,f||l?(f=s.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:f.render(),s.flags|=1,n!==null&&l?(s.child=Hs(s,n.child,null,d),s.child=Hs(s,null,i,d)):zt(n,s,i,d),s.memoizedState=f.state,n=s.child):n=gr(n,s,d),n}function Hm(n,s,i,l){return Ls(),s.flags|=256,zt(n,s,i,l),s.child}var pd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function md(n){return{baseLanes:n,cachePool:kp()}}function gd(n,s,i){return n=n!==null?n.childLanes&~i:0,s&&(n|=pn),n}function qm(n,s,i){var l=s.pendingProps,d=!1,f=(s.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(at.current&2)!==0),v&&(d=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(De){if(d?Vr(s):Gr(),(n=Qe)?(n=Jg(n,Rn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Pr!==null?{id:Yn,overflow:Qn}:null,retryLane:536870912,hydrationErrors:null},i=_p(n),i.return=s,s.child=i,Lt=s,Qe=null)):n=null,n===null)throw Ir(s);return Wd(n)?s.lanes=32:s.lanes=536870912,null}var S=l.children;return l=l.fallback,d?(Gr(),d=s.mode,S=Sl({mode:"hidden",children:S},d),l=Ds(l,d,i,null),S.return=s,l.return=s,S.sibling=l,s.child=S,l=s.child,l.memoizedState=md(i),l.childLanes=gd(n,v,i),s.memoizedState=pd,zi(null,l)):(Vr(s),yd(s,S))}var C=n.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(f)s.flags&256?(Vr(s),s.flags&=-257,s=vd(n,s,i)):s.memoizedState!==null?(Gr(),s.child=n.child,s.flags|=128,s=null):(Gr(),S=l.fallback,d=s.mode,l=Sl({mode:"visible",children:l.children},d),S=Ds(S,d,i,null),S.flags|=2,l.return=s,S.return=s,l.sibling=S,s.child=l,Hs(s,n.child,null,i),l=s.child,l.memoizedState=md(i),l.childLanes=gd(n,v,i),s.memoizedState=pd,s=zi(null,l));else if(Vr(s),Wd(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var B=v.dgst;v=B,l=Error(a(419)),l.stack="",l.digest=v,Ti({value:l,source:null,stack:null}),s=vd(n,s,i)}else if(dt||Aa(n,s,i,!1),v=(i&n.childLanes)!==0,dt||v){if(v=Ge,v!==null&&(l=Qt(v,i),l!==0&&l!==C.retryLane))throw C.retryLane=l,Ms(n,l),nn(v,n,l),hd;Xd(S)||jl(),s=vd(n,s,i)}else Xd(S)?(s.flags|=192,s.child=n.child,s=null):(n=C.treeContext,Qe=On(S.nextSibling),Lt=s,De=!0,Br=null,Rn=!1,n!==null&&xp(s,n),s=yd(s,l.children),s.flags|=4096);return s}return d?(Gr(),S=l.fallback,d=s.mode,C=n.child,B=C.sibling,l=ur(C,{mode:"hidden",children:l.children}),l.subtreeFlags=C.subtreeFlags&65011712,B!==null?S=ur(B,S):(S=Ds(S,d,i,null),S.flags|=2),S.return=s,l.return=s,l.sibling=S,s.child=l,zi(null,l),l=s.child,S=n.child.memoizedState,S===null?S=md(i):(d=S.cachePool,d!==null?(C=ct._currentValue,d=d.parent!==C?{parent:C,pool:C}:d):d=kp(),S={baseLanes:S.baseLanes|i,cachePool:d}),l.memoizedState=S,l.childLanes=gd(n,v,i),s.memoizedState=pd,zi(n.child,l)):(Vr(s),i=n.child,n=i.sibling,i=ur(i,{mode:"visible",children:l.children}),i.return=s,i.sibling=null,n!==null&&(v=s.deletions,v===null?(s.deletions=[n],s.flags|=16):v.push(n)),s.child=i,s.memoizedState=null,i)}function yd(n,s){return s=Sl({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function Sl(n,s){return n=un(22,n,null,s),n.lanes=0,n}function vd(n,s,i){return Hs(s,n.child,null,i),n=yd(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function $m(n,s,i){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),Mu(n.return,s,i)}function bd(n,s,i,l,d,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:f}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=f)}function Fm(n,s,i){var l=s.pendingProps,d=l.revealOrder,f=l.tail;l=l.children;var v=at.current,S=(v&2)!==0;if(S?(v=v&1|2,s.flags|=128):v&=1,K(at,v),zt(n,s,l,i),l=De?xi:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&$m(n,i,s);else if(n.tag===19)$m(n,i,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=s.child,d=null;i!==null;)n=i.alternate,n!==null&&ul(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=s.child,s.child=null):(d=i.sibling,i.sibling=null),bd(s,!1,d,i,f,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=s.child,s.child=null;d!==null;){if(n=d.alternate,n!==null&&ul(n)===null){s.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}bd(s,!0,i,null,f,l);break;case"together":bd(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function gr(n,s,i){if(n!==null&&(s.dependencies=n.dependencies),Qr|=s.lanes,(i&s.childLanes)===0)if(n!==null){if(Aa(n,s,i,!1),(i&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(a(153));if(s.child!==null){for(n=s.child,i=ur(n,n.pendingProps),s.child=i,i.return=s;n.sibling!==null;)n=n.sibling,i=i.sibling=ur(n,n.pendingProps),i.return=s;i.sibling=null}return s.child}function wd(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&nl(n)))}function $_(n,s,i){switch(s.tag){case 3:be(s,s.stateNode.containerInfo),Hr(s,ct,n.memoizedState.cache),Ls();break;case 27:case 5:Nt(s);break;case 4:be(s,s.stateNode.containerInfo);break;case 10:Hr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Vu(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(Vr(s),s.flags|=128,null):(i&s.child.childLanes)!==0?qm(n,s,i):(Vr(s),n=gr(n,s,i),n!==null?n.sibling:null);Vr(s);break;case 19:var d=(n.flags&128)!==0;if(l=(i&s.childLanes)!==0,l||(Aa(n,s,i,!1),l=(i&s.childLanes)!==0),d){if(l)return Fm(n,s,i);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),K(at,at.current),l)break;return null;case 22:return s.lanes=0,Um(n,s,i,s.pendingProps);case 24:Hr(s,ct,n.memoizedState.cache)}return gr(n,s,i)}function Vm(n,s,i){if(n!==null)if(n.memoizedProps!==s.pendingProps)dt=!0;else{if(!wd(n,i)&&(s.flags&128)===0)return dt=!1,$_(n,s,i);dt=(n.flags&131072)!==0}else dt=!1,De&&(s.flags&1048576)!==0&&Ep(s,xi,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(n=Bs(s.elementType),s.type=n,typeof n=="function")Tu(n)?(l=$s(n,l),s.tag=1,s=Im(null,s,n,l,i)):(s.tag=0,s=fd(null,
vendor: 6,056 bytes, line 9
9s,n,l,i));else{if(n!=null){var d=n.$$typeof;if(d===U){s.tag=11,s=Mm(null,s,n,l,i);break e}else if(d===q){s.tag=14,s=Dm(null,s,n,l,i);break e}}throw s=Be(n)||n,Error(a(306,s,""))}}return s;case 0:return fd(n,s,s.type,s.pendingProps,i);case 1:return l=s.type,d=$s(l,s.pendingProps),Im(n,s,l,d,i);case 3:e:{if(be(s,s.stateNode.containerInfo),n===null)throw Error(a(387));l=s.pendingProps;var f=s.memoizedState;d=f.element,Iu(n,s),Ni(s,l,null,i);var v=s.memoizedState;if(l=v.cache,Hr(s,ct,l),l!==f.cache&&Du(s,[ct],i,!0),ji(),l=v.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=f,s.memoizedState=f,s.flags&256){s=Hm(n,s,l,i);break e}else if(l!==d){d=xn(Error(a(424)),s),Ti(d),s=Hm(n,s,l,i);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Qe=On(n.firstChild),Lt=s,De=!0,Br=null,Rn=!0,i=Up(s,null,l,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ls(),l===d){s=gr(n,s,i);break e}zt(n,s,l,i)}s=s.child}return s;case 26:return _l(n,s),n===null?(i=ny(s.type,null,s.pendingProps,null))?s.memoizedState=i:De||(i=s.type,n=s.pendingProps,l=Pl(se.current).createElement(i),l[Dt]=s,l[Jt]=n,Pt(l,i,n),Tt(l),s.stateNode=l):s.memoizedState=ny(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return Nt(s),n===null&&De&&(l=s.stateNode=Zg(s.type,s.pendingProps,se.current),Lt=s,Rn=!0,d=Qe,es(s.type)?(Zd=d,Qe=On(l.firstChild)):Qe=d),zt(n,s,s.pendingProps.children,i),_l(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&De&&((d=l=Qe)&&(l=bS(l,s.type,s.pendingProps,Rn),l!==null?(s.stateNode=l,Lt=s,Qe=On(l.firstChild),Rn=!1,d=!0):d=!1),d||Ir(s)),Nt(s),d=s.type,f=s.pendingProps,v=n!==null?n.memoizedProps:null,l=f.children,Yd(d,f)?l=null:v!==null&&Yd(d,v)&&(s.flags|=32),s.memoizedState!==null&&(d=Ku(n,s,D_,null,null,i),Wi._currentValue=d),_l(n,s),zt(n,s,l,i),s.child;case 6:return n===null&&De&&((n=i=Qe)&&(i=wS(i,s.pendingProps,Rn),i!==null?(s.stateNode=i,Lt=s,Qe=null,n=!0):n=!1),n||Ir(s)),null;case 13:return qm(n,s,i);case 4:return be(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=Hs(s,null,l,i):zt(n,s,l,i),s.child;case 11:return Mm(n,s,s.type,s.pendingProps,i);case 7:return zt(n,s,s.pendingProps,i),s.child;case 8:return zt(n,s,s.pendingProps.children,i),s.child;case 12:return zt(n,s,s.pendingProps.children,i),s.child;case 10:return l=s.pendingProps,Hr(s,s.type,l.value),zt(n,s,l.children,i),s.child;case 9:return d=s.type._context,l=s.pendingProps.children,zs(s),d=Ut(d),l=l(d),s.flags|=1,zt(n,s,l,i),s.child;case 14:return Dm(n,s,s.type,s.pendingProps,i);case 15:return Lm(n,s,s.type,s.pendingProps,i);case 19:return Fm(n,s,i);case 31:return q_(n,s,i);case 22:return Um(n,s,i,s.pendingProps);case 24:return zs(s),l=Ut(ct),n===null?(d=zu(),d===null&&(d=Ge,f=Lu(),d.pooledCache=f,f.refCount++,f!==null&&(d.pooledCacheLanes|=i),d=f),s.memoizedState={parent:l,cache:d},Bu(s),Hr(s,ct,d)):((n.lanes&i)!==0&&(Iu(n,s),Ni(s,null,null,i),ji()),d=n.memoizedState,f=s.memoizedState,d.parent!==l?(d={parent:l,cache:l},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),Hr(s,ct,l)):(l=f.cache,Hr(s,ct,l),l!==d.cache&&Du(s,[ct],i,!0))),zt(n,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function yr(n){n.flags|=4}function _d(n,s,i,l,d){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(vg())n.flags|=8192;else throw Is=il,Pu}else n.flags&=-16777217}function Gm(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!oy(s))if(vg())n.flags|=8192;else throw Is=il,Pu}function El(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?It():536870912,n.lanes|=s,Pa|=s)}function Pi(n,s){if(!De)switch(n.tailMode){case"hidden":s=n.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Je(n){var s=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(s)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=i,s}function F_(n,s,i){var l=s.pendingProps;switch(Ou(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(s),null;case 1:return Je(s),null;case 3:return i=s.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),fr(ct),pe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Ta(s)?yr(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ju())),Je(s),null;case 26:var d=s.type,f=s.memoizedState;return n===null?(yr(s),f!==null?(Je(s),Gm(s,f)):(Je(s),_d(s,d,null,l,i))):f?f!==n.memoizedState?(yr(s),Je(s),Gm(s,f)):(Je(s),s.flags&=-16777217):(n=n.memoizedProps,n!==l&&yr(s),Je(s),_d(s,d,n,l,i)),null;case 27:if(mt(s),i=se.current,d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&yr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Je(s),null}n=Z.current,Ta(s)?Tp(s):(n=Zg(d,l,i),s.stateNode=n,yr(s))}return Je(s),null;case 5:if(mt(s),d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&yr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Je(s),null}if(f=Z.current,Ta(s))Tp(s);else{var v=Pl(se.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
9",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}f[Dt]=s,f[Jt]=l;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=f;e:switch(Pt(f,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&yr(s)}}return Je(s),_d(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,i),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==l&&yr(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(a(166));if(n=se.current,Ta(s)){if(n=s.stateNode,i=s.memoizedProps,l=null,d=Lt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[Dt]=s,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||qg(n.nodeValue,i)),n||Ir(s,!0)}else n=Pl(n).createTextNode(l),n[Dt]=s,s.stateNode=n}return Je(s),null;case 31:if(i=s.memoizedState,n===null||n.memoizedState!==null){if(l=Ta(s),i!==null){if(n===null){if(!l)throw Error(a(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Dt]=s}else Ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Je(s),n=!1}else i=ju(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return s.flags&256?(hn(s),s):(hn(s),null);if((s.flags&128)!==0)throw Error(a(558))}return Je(s),null;case 13:if(l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Ta(s),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(a(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Dt]=s}else Ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Je(s),d=!1}else d=ju(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(hn(s),s):(hn(s),null)}return hn(s),(s.flags&128)!==0?(s.lanes=i,s):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=s.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==d&&(l.flags|=2048)),i!==n&&i&&(s.child.flags|=8192),El(s,s.updateQueue),Je(s),null);case 4:return pe(),n===null&&$d(s.stateNode.containerInfo),Je(s),null;case 10:return fr(s.type),Je(s),null;case 19:if(F(at),l=s.memoizedState,l===null)return Je(s),null;if(d=(s.flags&128)!==0,f=l.rendering,f===null)if(d)Pi(l,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(f=ul(n),f!==null){for(s.flags|=128,Pi(l,!1),n=f.updateQueue,s.updateQueue=n,El(s,n),s.subtreeFlags=0,n=i,i=s.child;i!==null;)wp(i,n),i=i.sibling;return K(at,at.current&1|2),De&&dr(s,l.treeForkCount),s.child}n=n.sibling}l.tail!==null&&Et()>Cl&&(s.flags|=128,d=!0,Pi(l,!1),s.lanes=4194304)}else{if(!d)if(n=ul(f),n!==null){if(s.flags|=128,d=!0,n=n.updateQueue,s.updateQueue=n,El(s,n),Pi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!De)return Je(s),null}else 2*Et()-l.renderingStartTime>Cl&&i!==536870912&&(s.flags|=128,d=!0,Pi(l,!1),s.lanes=4194304);l.isBackwards?(f.sibling=s.child,s.child=f):(n=l.last,n!==null?n.sibling=f:s.child=f,l.last=f)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Et(),n.sibling=null,i=at.current,K(at,d?i&1|2:i&1),De&&dr(s,l.treeForkCount),n):(Je(s),null);case 22:case 23:return hn(s),Fu(),l=s.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(i&536870912)!==0&&(s.flags&128)===0&&(Je(s),s.subtreeFlags&6&&(s.flags|=8192)):Je(s),i=s.updateQueue,i!==null&&El(s,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==i&&(s.flags|=2048),n!==null&&F(Ps),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),fr(ct),Je(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function V_(n,s){switch(Ou(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return fr(ct),pe(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return mt(s),null;case 31:if(s.memoizedState!==null){if(hn(s),s.alternate===null)throw Error(a(340));Ls()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(hn(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));Ls()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return F(at),null;case 4:return pe(),null;case 10:return fr(s.type),null;case 22:case 23:return hn(s),Fu(),n!==null&&F(Ps),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return fr(ct),null;case 25:return null;default:return null}}function Km(n,s){switch(Ou(s),s.tag){case 3:fr(ct),pe();break;case 26:case 27:case 5:mt(s);break;case 4:pe();break;case 31:s.memoizedState!==null&&hn(s);break;case 13:hn(s);break;case 19:F(at);break;case 10:fr(s.type);break;case 22:case 23:hn(s),Fu(),n!==null&&F(Ps);break;case 24:fr(ct)}}function Bi(n,s){try{var i=s.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&n)===n){l=void 0;var f=i.create,v=i.inst;l=f(),v.destroy=l}i=i.next}while(i!==d)}}catch(S){He(s,s.return,S)}}function Kr(n,s,i){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var f=d.next;l=f;do{if((l.tag&n)===n){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=s;var C=i,B=S;try{B()}catch($){He(d,C,$)}}}l=l.next}while(l!==f)}}catch($){He(s,s.return,$)}}function Ym(n){var s=n.updateQueue;if(s!==null){var i=n.stateNode;try{Pp(s,i)}catch(l){He(n,n.return,l)}}}function Qm(n,s,i){i.props=$s(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 19,807 bytes, line 9
9try{i.componentWillUnmount()}catch(l){He(n,s,l)}}function Ii(n,s){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof i=="function"?n.refCleanup=i(l):i.current=l}}catch(d){He(n,s,d)}}function Jn(n,s){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){He(n,s,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){He(n,s,d)}else i.current=null}function Jm(n){var s=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(d){He(n,n.return,d)}}function Sd(n,s,i){try{var l=n.stateNode;fS(l,n.type,i,s),l[Jt]=s}catch(d){He(n,n.return,d)}}function Xm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&es(n.type)||n.tag===4}function Ed(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Xm(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&&es(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 xd(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,s):(s=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.appendChild(n),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=lr));else if(l!==4&&(l===27&&es(n.type)&&(i=n.stateNode,s=null),n=n.child,n!==null))for(xd(n,s,i),n=n.sibling;n!==null;)xd(n,s,i),n=n.sibling}function xl(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?i.insertBefore(n,s):i.appendChild(n);else if(l!==4&&(l===27&&es(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(xl(n,s,i),n=n.sibling;n!==null;)xl(n,s,i),n=n.sibling}function Wm(n){var s=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);Pt(s,l,i),s[Dt]=n,s[Jt]=i}catch(f){He(n,n.return,f)}}var vr=!1,ht=!1,Td=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,At=null;function G_(n,s){if(n=n.containerInfo,Gd=Vl,n=dp(n),vu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,S=-1,C=-1,B=0,$=0,Y=n,I=null;t:for(;;){for(var H;Y!==i||d!==0&&Y.nodeType!==3||(S=v+d),Y!==f||l!==0&&Y.nodeType!==3||(C=v+l),Y.nodeType===3&&(v+=Y.nodeValue.length),(H=Y.firstChild)!==null;)I=Y,Y=H;for(;;){if(Y===n)break t;if(I===i&&++B===d&&(S=v),I===f&&++$===l&&(C=v),(H=Y.nextSibling)!==null)break;Y=I,I=Y.parentNode}Y=H}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Kd={focusedElem:n,selectionRange:i},Vl=!1,At=s;At!==null;)if(s=At,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,At=n;else for(;At!==null;){switch(s=At,f=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=s,d=f.memoizedProps,f=f.memoizedState,l=i.stateNode;try{var oe=$s(i.type,d);n=l.getSnapshotBeforeUpdate(oe,f),l.__reactInternalSnapshotBeforeUpdate=n}catch(me){He(i,i.return,me)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,i=n.nodeType,i===9)Jd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Jd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=s.sibling,n!==null){n.return=s.return,At=n;break}At=s.return}}function eg(n,s,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:wr(n,i),l&4&&Bi(5,i);break;case 1:if(wr(n,i),l&4)if(n=i.stateNode,s===null)try{n.componentDidMount()}catch(v){He(i,i.return,v)}else{var d=$s(i.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(d,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){He(i,i.return,v)}}l&64&&Ym(i),l&512&&Ii(i,i.return);break;case 3:if(wr(n,i),l&64&&(n=i.updateQueue,n!==null)){if(s=null,i.child!==null)switch(i.child.tag){case 27:case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}try{Pp(n,s)}catch(v){He(i,i.return,v)}}break;case 27:s===null&&l&4&&Wm(i);case 26:case 5:wr(n,i),s===null&&l&4&&Jm(i),l&512&&Ii(i,i.return);break;case 12:wr(n,i);break;case 31:wr(n,i),l&4&&rg(n,i);break;case 13:wr(n,i),l&4&&sg(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=tS.bind(null,i),_S(n,i))));break;case 22:if(l=i.memoizedState!==null||vr,!l){s=s!==null&&s.memoizedState!==null||ht,d=vr;var f=ht;vr=l,(ht=s)&&!f?_r(n,i,(i.subtreeFlags&8772)!==0):wr(n,i),vr=d,ht=f}break;case 30:break;default:wr(n,i)}}function tg(n){var s=n.alternate;s!==null&&(n.alternate=null,tg(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&tu(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var We=null,Wt=!1;function br(n,s,i){for(i=i.child;i!==null;)ng(n,s,i),i=i.sibling}function ng(n,s,i){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(As,i)}catch{}switch(i.tag){case 26:ht||Jn(i,s),br(n,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||Jn(i,s);var l=We,d=Wt;es(i.type)&&(We=i.stateNode,Wt=!1),br(n,s,i),Qi(i.stateNode),We=l,Wt=d;break;case 5:ht||Jn(i,s);case 6:if(l=We,d=Wt,We=null,br(n,s,i),We=l,Wt=d,We!==null)if(Wt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(i.stateNode)}catch(f){He(i,s,f)}else try{We.removeChild(i.stateNode)}catch(f){He(i,s,f)}break;case 18:We!==null&&(Wt?(n=We,Yg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Ga(n)):Yg(We,i.stateNode));break;case 4:l=We,d=Wt,We=i.stateNode.containerInfo,Wt=!0,br(n,s,i),We=l,Wt=d;break;case 0:case 11:case 14:case 15:Kr(2,i,s),ht||Kr(4,i,s),br(n,s,i);break;case 1:ht||(Jn(i,s),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Qm(i,s,l)),br(n,s,i);break;case 21:br(n,s,i);break;case 22:ht=(l=ht)||i.memoizedState!==null,br(n,s,i),ht=l;break;default:br(n,s,i)}}function rg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ga(n)}catch(i){He(s,s.return,i)}}}function sg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ga(n)}catch(i){He(s,s.return,i)}}function K_(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Zm),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Zm),s;default:throw Error(a(435,n.tag))}}function Tl(n,s){var i=K_(n);s.forEach(function(l){if(!i.has(l)){i.add(l);var d=nS.bind(null,n,l);l.then(d,d)}})}function Zt(n,s){var i=s.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],f=n,v=s,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(es(S.type)){We=S.stateNode,Wt=!1;break e}break;case 5:We=S.stateNode,Wt=!1;break e;case 3:case 4:We=S.stateNode.containerInfo,Wt=!0;break e}S=S.return}if(We===null)throw Error(a(160));ng(f,v,d),We=null,Wt=!1,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)ag(s,n),s=s.sibling}var Pn=null;function ag(n,s){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Zt(s,n),en(n),l&4&&(Kr(3,n,n.return),Bi(3,n),Kr(5,n,n.return));break;case 1:Zt(s,n),en(n),l&512&&(ht||i===null||Jn(i,i.return)),l&64&&vr&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=Pn;if(Zt(s,n),en(n),l&512&&(ht||i===null||Jn(i,i.return)),l&4){var f=i!==null?i.memoizedState:null;if(l=n.memoizedState,i===null)if(l===null)if(n.stateNode===null){e:{l=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":f=d.getElementsByTagName("title")[0],(!f||f[fi]||f[Dt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=d.createElement(l),d.head.insertBefore(f,d.querySelector("head > title"))),Pt(f,l,i),f[Dt]=n,Tt(f),l=f;break e;case"link":var v=ay("link","href",d).get(l+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}f=d.createElement(l),Pt(f,l,i),d.head.appendChild(f);break;case"meta":if(v=ay("meta","content",d).get(l+(i.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}f=d.createElement(l),Pt(f,l,i),d.head.appendChild(f);break;default:throw Error(a(468,l))}f[Dt]=n,Tt(f),l=f}n.stateNode=l}else iy(d,n.type,n.stateNode);else n.stateNode=sy(d,l,n.memoizedProps);else f!==l?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,l===null?iy(d,n.type,n.stateNode):sy(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Sd(n,n.memoizedProps,i.memoizedProps)}break;case 27:Zt(s,n),en(n),l&512&&(ht||i===null||Jn(i,i.return)),i!==null&&l&4&&Sd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Zt(s,n),en(n),l&512&&(ht||i===null||Jn(i,i.return)),n.flags&32){d=n.stateNode;try{ma(d,"")}catch(oe){He(n,n.return,oe)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,Sd(n,d,i!==null?i.memoizedProps:d)),l&1024&&(Td=!0);break;case 6:if(Zt(s,n),en(n),l&4){if(n.stateNode===null)throw Error(a(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(oe){He(n,n.return,oe)}}break;case 3:if(Hl=null,d=Pn,Pn=Bl(s.containerInfo),Zt(s,n),Pn=d,en(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Ga(s.containerInfo)}catch(oe){He(n,n.return,oe)}Td&&(Td=!1,ig(n));break;case 4:l=Pn,Pn=Bl(n.stateNode.containerInfo),Zt(s,n),en(n),Pn=l;break;case 12:Zt(s,n),en(n);break;case 31:Zt(s,n),en(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Tl(n,l)));break;case 13:Zt(s,n),en(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Rl=Et()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Tl(n,l)));break;case 22:d=n.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,B=vr,$=ht;if(vr=B||d,ht=$||C,Zt(s,n),ht=$,vr=B,en(n),l&8192)e:for(s=n.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(i===null||C||vr||ht||Fs(n)),i=null,s=n;;){if(s.tag===5||s.tag===26){if(i===null){C=i=s;try{if(f=C.stateNode,d)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var Y=C.memoizedProps.style,I=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;S.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(oe){He(C,C.return,oe)}}}else if(s.tag===6){if(i===null){C=s;try{C.stateNode.nodeValue=d?"":C.memoizedProps}catch(oe){He(C,C.return,oe)}}}else if(s.tag===18){if(i===null){C=s;try{var H=C.stateNode;d?Qg(H,!0):Qg(C.stateNode,!1)}catch(oe){He(C,C.return,oe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;i===s&&(i=null),s=s.return}i===s&&(i=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Tl(n,i))));break;case 19:Zt(s,n),en(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Tl(n,l)));break;case 30:break;case 21:break;default:Zt(s,n),en(n)}}function en(n){var s=n.flags;if(s&2){try{for(var i,l=n.return;l!==null;){if(Xm(l)){i=l;break}l=l.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var d=i.stateNode,f=Ed(n);xl(n,f,d);break;case 5:var v=i.stateNode;i.flags&32&&(ma(v,""),i.flags&=-33);var S=Ed(n);xl(n,S,v);break;case 3:case 4:var C=i.stateNode.containerInfo,B=Ed(n);xd(n,B,C);break;default:throw Error(a(161))}}catch($){He(n,n.return,$)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function ig(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;ig(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function wr(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)eg(n,s.alternate,s),s=s.sibling}function Fs(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Kr(4,s,s.return),Fs(s);break;case 1:Jn(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Qm(s,s.return,i),Fs(s);break;case 27:Qi(s.stateNode);case 26:case 5:Jn(s,s.return),Fs(s);break;case 22:s.memoizedState===null&&Fs(s);break;case 30:Fs(s);break;default:Fs(s)}n=n.sibling}}function _r(n,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,d=n,f=s,v=f.flags;switch(f.tag){case 0:case 11:case 15:_r(d,f,i),Bi(4,f);break;case 1:if(_r(d,f,i),l=f,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(B){He(l,l.return,B)}if(l=f,d=l.updateQueue,d!==null){var S=l.stateNode;try{var C=d.shared.hiddenCallbacks;if(C!==null)for(d.shared.hiddenCallbacks=null,d=0;d<C.length;d++)zp(C[d],S)}catch(B){He(l,l.return,B)}}i&&v&64&&Ym(f),Ii(f,f.return);break;case 27:Wm(f);case 26:case 5:_r(d,f,i),i&&l===null&&v&4&&Jm(f),Ii(f,f.return);break;case 12:_r(d,f,i);break;case 31:_r(d,f,i),i&&v&4&&rg(d,f);break;case 13:_r(d,f,i),i&&v&4&&sg(d,f);break;case 22:f.memoizedState===null&&_r(d,f,i),Ii(f,f.return);break;case 30:break;default:_r(d,f,i)}s=s.sibling}}function Ad(n,s){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&Ai(i))}function Rd(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Ai(n))}function Bn(n,s,i,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)og(n,s,i,l),s=s.sibling}function og(n,s,i,l){var d=s.flags;switch(s.tag){case 0:case 11:case 15:Bn(n,s,i,l),d&2048&&Bi(9,s);break;case 1:Bn(n,s,i,l);break;case 3:Bn(n,s,i,l),d&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Ai(n)));break;case 12:if(d&2048){Bn(n,s,i,l),n=s.stateNode;try{var f=s.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){He(s,s.return,C)}}else Bn(n,s,i,l);break;case 31:Bn(n,s,i,l);break;case 13:Bn(n,s,i,l);break;case 23:break;case 22:f=s.stateNode,v=s.alternate,s.memoizedState!==null?f._visibility&2?Bn(n,s,i,l):Hi(n,s):f._visibility&2?Bn(n,s,i,l):(f._visibility|=2,La(n,s,i,l,(s.subtreeFlags&10256)!==0||!1)),d&2048&&Ad(v,s);break;case 24:Bn(n,s,i,l),d&2048&&Rd(s.alternate,s);break;default:Bn(n,s,i,l)}}function La(n,s,i,l,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var f=n,v=s,S=i,C=l,B=v.flags;switch(v.tag){case 0:case 11:case 15:La(f,v,S,C,d),Bi(8,v);break;case 23:break;case 22:var $=v.stateNode;v.memoizedState!==null?$._visibility&2?La(f,v,S,C,d):Hi(f,v):($._visibility|=2,La(f,v,S,C,d)),d&&B&2048&&Ad(v.alternate,v);break;case 24:La(f,v,S,C,d),d&&B&2048&&Rd(v.alternate,v);break;default:La(f,v,S,C,d)}s=s.sibling}}function Hi(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=n,l=s,d=l.flags;switch(l.tag){case 22:Hi(i,l),d&2048&&Ad(l.alternate,l);break;case 24:Hi(i,l),d&2048&&Rd(l.alternate,l);break;default:Hi(i,l)}s=s.sibling}}var qi=8192;function Ua(n,s,i){if(n.subtreeFlags&qi)for(n=n.child;n!==null;)lg(n,s,i),n=n.sibling}function lg(n,s,i){switch(n.tag){case 26:Ua(n,s,i),n.flags&qi&&n.memoizedState!==null&&MS(i,Pn,n.memoizedState,n.memoizedProps);break;case 5:Ua(n,s,i);break;case 3:case 4:var l=Pn;Pn=Bl(n.stateNode.containerInfo),Ua(n,s,i),Pn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=qi,qi=16777216,Ua(n,s,i),qi=l):Ua(n,s,i));break;default:Ua(n,s,i)}}function cg(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function $i(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];At=l,dg(l,n)}cg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ug(n),n=n.sibling}function ug(n){switch(n.tag){case 0:case 11:case 15:$i(n),n.flags&2048&&Kr(9,n,n.return);break;case 3:$i(n);break;case 12:$i(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,Al(n)):$i(n);break;default:$i(n)}}function Al(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];At=l,dg(l,n)}cg(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Kr(8,s,s.return),Al(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,Al(s));break;default:Al(s)}n=n.sibling}}function dg(n,s){for(;At!==null;){var i=At;switch(i.tag){case 0:case 11:case 15:Kr(8,i,s);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ai(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,At=l;else e:for(i=n;At!==null;){l=At;var d=l.sibling,f=l.return;if(tg(l),l===i){At=null;break e}if(d!==null){d.return=f,At=d;break e}At=f}}}var Y_={getCacheForType:function(n){var s=Ut(ct),i=s.data.get(n);return i===void 0&&(i=n(),s.data.set(n,i)),i},cacheSignal:function(){return Ut(ct).controller.signal}},Q_=typeof WeakMap=="function"?WeakMap:Map,Pe=0,Ge=null,ke=null,Ne=0,Ie=0,fn=null,Yr=!1,za=!1,Cd=!1,Sr=0,rt=0,Qr=0,Vs=0,Od=0,pn=0,Pa=0,Fi=null,tn=null,kd=!1,Rl=0,hg=0,Cl=1/0,Ol=null,Jr=null,yt=0,Xr=null,Ba=null,Er=0,jd=0,Nd=null,fg=null,Vi=0,Md=null;function mn(){return(Pe&2)!==0&&Ne!==0?Ne&-Ne:L.T!==null?Bd():Zc()}function pg(){if(pn===0)if((Ne&536870912)===0||De){var n=oa;oa<<=1,(oa&3932160)===0&&(oa=262144),pn=n}else pn=536870912;return n=dn.current,n!==null&&(n.flags|=32),pn}function nn(n,s,i){(n===Ge&&(Ie===2||Ie===9)||n.cancelPendingCommit!==null)&&(Ia(n,0),Wr(n,Ne,pn,!1)),et(n,i),((Pe&2)===0||n!==Ge)&&(n===Ge&&((Pe&2)===0&&(Vs|=i),rt===4&&Wr(n,Ne,pn,!1)),Xn(n))}function mg(n,s,i){if((Pe&6)!==0)throw Error(a(327));var l=!i&&(s&127)===0&&(s&n.expiredLanes)===0||Xe(n,s),d=l?W_(n,s):Ld(n,s,!0),f=l;do{if(d===0){za&&!l&&Wr(n,s,0,!1);break}else{if(i=n.current.alternate,f&&!J_(i)){d=Ld(n,s,!1),f=!1;continue}if(d===2){if(f=s,n.errorRecoveryDisabledLanes&f)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var S=n;d=Fi;var C=S.current.memoizedState.isDehydrated;if(C&&(Ia(S,v).flags|=256),v=Ld(S,v,!1),v!==2){if(Cd&&!C){S.errorRecoveryDisabledLanes|=f,Vs|=f,d=4;break e}f=tn,tn=d,f!==null&&(tn===null?tn=f:tn.push.apply(tn,f))}d=v}if(f=!1,d!==2)continue}}if(d===1){Ia(n,0),Wr(n,s,0,!0);break}e:{switch(l=n,f=d,f){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Wr(l,s,pn,!Yr);break e;case 2:tn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(d=Rl+300-Et(),10<d)){if(Wr(l,s,pn,!Yr),_e(l,0,!0)!==0)break e;
vendor: 18,818 bytes, line 9
9Er=s,l.timeoutHandle=Gg(gg.bind(null,l,i,tn,Ol,kd,s,pn,Vs,Pa,Yr,f,"Throttled",-0,0),d);break e}gg(l,i,tn,Ol,kd,s,pn,Vs,Pa,Yr,f,null,-0,0)}}break}while(!0);Xn(n)}function gg(n,s,i,l,d,f,v,S,C,B,$,Y,I,H){if(n.timeoutHandle=-1,Y=s.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:lr},lg(s,f,Y);var oe=(f&62914560)===f?Rl-Et():(f&4194048)===f?hg-Et():0;if(oe=DS(Y,oe),oe!==null){Er=f,n.cancelPendingCommit=oe(xg.bind(null,n,s,f,i,l,d,v,S,C,$,Y,null,I,H)),Wr(n,f,v,!B);return}}xg(n,s,f,i,l,d,v,S,C)}function J_(n){for(var s=n;;){var i=s.tag;if((i===0||i===11||i===15)&&s.flags&16384&&(i=s.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],f=d.getSnapshot;d=d.value;try{if(!cn(f(),d))return!1}catch{return!1}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Wr(n,s,i,l){s&=~Od,s&=~Vs,n.suspendedLanes|=s,n.pingedLanes&=~s,l&&(n.warmLanes|=s),l=n.expirationTimes;for(var d=s;0<d;){var f=31-Bt(d),v=1<<f;l[f]=-1,d&=~v}i!==0&&Cs(n,i,s)}function kl(){return(Pe&6)===0?(Gi(0),!1):!0}function Dd(){if(ke!==null){if(Ie===0)var n=ke.return;else n=ke,hr=Us=null,Ju(n),ka=null,Ci=0,n=ke;for(;n!==null;)Km(n.alternate,n),n=n.return;ke=null}}function Ia(n,s){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,gS(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Er=0,Dd(),Ge=n,ke=i=ur(n.current,null),Ne=s,Ie=0,fn=null,Yr=!1,za=Xe(n,s),Cd=!1,Pa=pn=Od=Vs=Qr=rt=0,tn=Fi=null,kd=!1,(s&8)!==0&&(s|=s&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=s;0<l;){var d=31-Bt(l),f=1<<d;s|=n[d],l&=~f}return Sr=s,Xo(),i}function yg(n,s){Ae=null,L.H=Ui,s===Oa||s===al?(s=Mp(),Ie=3):s===Pu?(s=Mp(),Ie=4):Ie=s===hd?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,fn=s,ke===null&&(rt=1,bl(n,xn(s,n.current)))}function vg(){var n=dn.current;return n===null?!0:(Ne&4194048)===Ne?Cn===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?n===Cn:!1}function bg(){var n=L.H;return L.H=Ui,n===null?Ui:n}function wg(){var n=L.A;return L.A=Y_,n}function jl(){rt=4,Yr||(Ne&4194048)!==Ne&&dn.current!==null||(za=!0),(Qr&134217727)===0&&(Vs&134217727)===0||Ge===null||Wr(Ge,Ne,pn,!1)}function Ld(n,s,i){var l=Pe;Pe|=2;var d=bg(),f=wg();(Ge!==n||Ne!==s)&&(Ol=null,Ia(n,s)),s=!1;var v=rt;e:do try{if(Ie!==0&&ke!==null){var S=ke,C=fn;switch(Ie){case 8:Dd(),v=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(s=!0);var B=Ie;if(Ie=0,fn=null,Ha(n,S,C,B),i&&za){v=0;break e}break;default:B=Ie,Ie=0,fn=null,Ha(n,S,C,B)}}X_(),v=rt;break}catch($){yg(n,$)}while(!0);return s&&n.shellSuspendCounter++,hr=Us=null,Pe=l,L.H=d,L.A=f,ke===null&&(Ge=null,Ne=0,Xo()),v}function X_(){for(;ke!==null;)_g(ke)}function W_(n,s){var i=Pe;Pe|=2;var l=bg(),d=wg();Ge!==n||Ne!==s?(Ol=null,Cl=Et()+500,Ia(n,s)):za=Xe(n,s);e:do try{if(Ie!==0&&ke!==null){s=ke;var f=fn;t:switch(Ie){case 1:Ie=0,fn=null,Ha(n,s,f,1);break;case 2:case 9:if(jp(f)){Ie=0,fn=null,Sg(s);break}s=function(){Ie!==2&&Ie!==9||Ge!==n||(Ie=7),Xn(n)},f.then(s,s);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:jp(f)?(Ie=0,fn=null,Sg(s)):(Ie=0,fn=null,Ha(n,s,f,7));break;case 5:var v=null;switch(ke.tag){case 26:v=ke.memoizedState;case 5:case 27:var S=ke;if(v?oy(v):S.stateNode.complete){Ie=0,fn=null;var C=S.sibling;if(C!==null)ke=C;else{var B=S.return;B!==null?(ke=B,Nl(B)):ke=null}break t}}Ie=0,fn=null,Ha(n,s,f,5);break;case 6:Ie=0,fn=null,Ha(n,s,f,6);break;case 8:Dd(),rt=6;break e;default:throw Error(a(462))}}Z_();break}catch($){yg(n,$)}while(!0);return hr=Us=null,L.H=l,L.A=d,Pe=i,ke!==null?0:(Ge=null,Ne=0,Xo(),rt)}function Z_(){for(;ke!==null&&!St();)_g(ke)}function _g(n){var s=Vm(n.alternate,n,Sr);n.memoizedProps=n.pendingProps,s===null?Nl(n):ke=s}function Sg(n){var s=n,i=s.alternate;switch(s.tag){case 15:case 0:s=Bm(i,s,s.pendingProps,s.type,void 0,Ne);break;case 11:s=Bm(i,s,s.pendingProps,s.type.render,s.ref,Ne);break;case 5:Ju(s);default:Km(i,s),s=ke=wp(s,Sr),s=Vm(i,s,Sr)}n.memoizedProps=n.pendingProps,s===null?Nl(n):ke=s}function Ha(n,s,i,l){hr=Us=null,Ju(s),ka=null,Ci=0;var d=s.return;try{if(H_(n,d,s,i,Ne)){rt=1,bl(n,xn(i,n.current)),ke=null;return}}catch(f){if(d!==null)throw ke=d,f;rt=1,bl(n,xn(i,n.current)),ke=null;return}s.flags&32768?(De||l===1?n=!0:za||(Ne&536870912)!==0?n=!1:(Yr=n=!0,(l===2||l===9||l===3||l===6)&&(l=dn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Eg(s,n)):Nl(s)}function Nl(n){var s=n;do{if((s.flags&32768)!==0){Eg(s,Yr);return}n=s.return;var i=F_(s.alternate,s,Sr);if(i!==null){ke=i;return}if(s=s.sibling,s!==null){ke=s;return}ke=s=n}while(s!==null);rt===0&&(rt=5)}function Eg(n,s){do{var i=V_(n.alternate,n);if(i!==null){i.flags&=32767,ke=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!s&&(n=n.sibling,n!==null)){ke=n;return}ke=n=i}while(n!==null);rt=6,ke=null}function xg(n,s,i,l,d,f,v,S,C){n.cancelPendingCommit=null;do Ml();while(yt!==0);if((Pe&6)!==0)throw Error(a(327));if(s!==null){if(s===n.current)throw Error(a(177));if(f=s.lanes|s.childLanes,f|=Eu,Kt(n,i,f,v,S,C),n===Ge&&(ke=Ge=null,Ne=0),Ba=s,Xr=n,Er=i,jd=f,Nd=d,fg=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,rS(ar,function(){return Og(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,d=Q.p,Q.p=2,v=Pe,Pe|=4;try{G_(n,s,i)}finally{Pe=v,Q.p=d,L.T=l}}yt=1,Tg(),Ag(),Rg()}}function Tg(){if(yt===1){yt=0;var n=Xr,s=Ba,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=L.T,L.T=null;var l=Q.p;Q.p=2;var d=Pe;Pe|=4;try{ag(s,n);var f=Kd,v=dp(n.containerInfo),S=f.focusedElem,C=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&up(S.ownerDocument.documentElement,S)){if(C!==null&&vu(S)){var B=C.start,$=C.end;if($===void 0&&($=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min($,S.value.length);else{var Y=S.ownerDocument||document,I=Y&&Y.defaultView||window;if(I.getSelection){var H=I.getSelection(),oe=S.textContent.length,me=Math.min(C.start,oe),Ve=C.end===void 0?me:Math.min(C.end,oe);!H.extend&&me>Ve&&(v=Ve,Ve=me,me=v);var D=cp(S,me),k=cp(S,Ve);if(D&&k&&(H.rangeCount!==1||H.anchorNode!==D.node||H.anchorOffset!==D.offset||H.focusNode!==k.node||H.focusOffset!==k.offset)){var P=Y.createRange();P.setStart(D.node,D.offset),H.removeAllRanges(),me>Ve?(H.addRange(P),H.extend(k.node,k.offset)):(P.setEnd(k.node,k.offset),H.addRange(P))}}}}for(Y=[],H=S;H=H.parentNode;)H.nodeType===1&&Y.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Y.length;S++){var G=Y[S];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Vl=!!Gd,Kd=Gd=null}finally{Pe=d,Q.p=l,L.T=i}}n.current=s,yt=2}}function Ag(){if(yt===2){yt=0;var n=Xr,s=Ba,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=L.T,L.T=null;var l=Q.p;Q.p=2;var d=Pe;Pe|=4;try{eg(n,s.alternate,s)}finally{Pe=d,Q.p=l,L.T=i}}yt=3}}function Rg(){if(yt===4||yt===3){yt=0,Vn();var n=Xr,s=Ba,i=Er,l=fg;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?yt=5:(yt=0,Ba=Xr=null,Cg(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(Jr=null),Un(i),s=s.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(As,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=L.T,d=Q.p,Q.p=2,L.T=null;try{for(var f=n.onRecoverableError,v=0;v<l.length;v++){var S=l[v];f(S.value,{componentStack:S.stack})}}finally{L.T=s,Q.p=d}}(Er&3)!==0&&Ml(),Xn(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===Md?Vi++:(Vi=0,Md=n):Vi=0,Gi(0)}}function Cg(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Ai(s)))}function Ml(){return Tg(),Ag(),Rg(),Og()}function Og(){if(yt!==5)return!1;var n=Xr,s=jd;jd=0;var i=Un(Er),l=L.T,d=Q.p;try{Q.p=32>i?32:i,L.T=null,i=Nd,Nd=null;var f=Xr,v=Er;if(yt=0,Ba=Xr=null,Er=0,(Pe&6)!==0)throw Error(a(331));var S=Pe;if(Pe|=4,ug(f.current),og(f,f.current,v,i),Pe=S,Gi(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(As,f)}catch{}return!0}finally{Q.p=d,L.T=l,Cg(n,s)}}function kg(n,s,i){s=xn(i,s),s=dd(n.stateNode,s,2),n=Fr(n,s,2),n!==null&&(et(n,2),Xn(n))}function He(n,s,i){if(n.tag===3)kg(n,n,i);else for(;s!==null;){if(s.tag===3){kg(s,n,i);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Jr===null||!Jr.has(l))){n=xn(i,n),i=jm(2),l=Fr(s,i,2),l!==null&&(Nm(i,l,s,n),et(l,2),Xn(l));break}}s=s.return}}function Ud(n,s,i){var l=n.pingCache;if(l===null){l=n.pingCache=new Q_;var d=new Set;l.set(s,d)}else d=l.get(s),d===void 0&&(d=new Set,l.set(s,d));d.has(i)||(Cd=!0,d.add(i),n=eS.bind(null,n,s,i),s.then(n,n))}function eS(n,s,i){var l=n.pingCache;l!==null&&l.delete(s),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ge===n&&(Ne&i)===i&&(rt===4||rt===3&&(Ne&62914560)===Ne&&300>Et()-Rl?(Pe&2)===0&&Ia(n,0):Od|=i,Pa===Ne&&(Pa=0)),Xn(n)}function jg(n,s){s===0&&(s=It()),n=Ms(n,s),n!==null&&(et(n,s),Xn(n))}function tS(n){var s=n.memoizedState,i=0;s!==null&&(i=s.retryLane),jg(n,i)}function nS(n,s){var i=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(s),jg(n,i)}function rS(n,s){return ln(n,s)}var Dl=null,qa=null,zd=!1,Ll=!1,Pd=!1,Zr=0;function Xn(n){n!==qa&&n.next===null&&(qa===null?Dl=qa=n:qa=qa.next=n),Ll=!0,zd||(zd=!0,aS())}function Gi(n,s){if(!Pd&&Ll){Pd=!0;do for(var i=!1,l=Dl;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var f=0;else{var v=l.suspendedLanes,S=l.pingedLanes;f=(1<<31-Bt(42|n)+1)-1,f&=d&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,Lg(l,f))}else f=Ne,f=_e(l,l===Ge?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Xe(l,f)||(i=!0,Lg(l,f));l=l.next}while(i);Pd=!1}}function sS(){Ng()}function Ng(){Ll=zd=!1;var n=0;Zr!==0&&mS()&&(n=Zr);for(var s=Et(),i=null,l=Dl;l!==null;){var d=l.next,f=Mg(l,s);f===0?(l.next=null,i===null?Dl=d:i.next=d,d===null&&(qa=i)):(i=l,(n!==0||(f&3)!==0)&&(Ll=!0)),l=d}yt!==0&&yt!==5||Gi(n),Zr!==0&&(Zr=0)}function Mg(n,s){for(var i=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-Bt(f),S=1<<v,C=d[v];C===-1?((S&i)===0||(S&l)!==0)&&(d[v]=xt(S,s)):C<=s&&(n.expiredLanes|=S),f&=~S}if(s=Ge,i=Ne,i=_e(n,n===s?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===s&&(Ie===2||Ie===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Ts(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Xe(n,i)){if(s=i&-i,s===n.callbackPriority)return s;switch(l!==null&&Ts(l),Un(i)){case 2:case 8:i=wn;break;case 32:i=ar;break;case 268435456:i=ir;break;default:i=ar}return l=Dg.bind(null,n),i=ln(i,l),n.callbackPriority=s,n.callbackNode=i,s}return l!==null&&l!==null&&Ts(l),n.callbackPriority=2,n.callbackNode=null,2}function Dg(n,s){if(yt!==0&&yt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Ml()&&n.callbackNode!==i)return null;var l=Ne;return l=_e(n,n===Ge?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(mg(n,l,s),Mg(n,Et()),n.callbackNode!=null&&n.callbackNode===i?Dg.bind(null,n):null)}function Lg(n,s){if(Ml())return null;mg(n,s,!0)}function aS(){yS(function(){(Pe&6)!==0?ln(tt,sS):Ng()})}function Bd(){if(Zr===0){var n=Ra;n===0&&(n=ia,ia<<=1,(ia&261888)===0&&(ia=256)),Zr=n}return Zr}function Ug(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:$o(""+n)}function zg(n,s){var i=s.ownerDocument.createElement("input");return i.name=s.name,i.value=s.value,n.id&&i.setAttribute("form",n.id),s.parentNode.insertBefore(i,s),n=new FormData(n),i.parentNode.removeChild(i),n}function iS(n,s,i,l,d){if(s==="submit"&&i&&i.stateNode===d){var f=Ug((d[Jt]||null).action),v=l.submitter;v&&(s=(s=v[Jt]||null)?Ug(s.formAction):v.getAttribute("formAction"),s!==null&&(f=s,v=null));var S=new Ko("action","action",null,l,d);n.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Zr!==0){var C=v?zg(d,v):new FormData(d);ad(i,{pending:!0,data:C,method:d.method,action:f},null,C)}}else typeof f=="function"&&(S.preventDefault(),C=v?zg(d,v):new FormData(d),ad(i,{pending:!0,data:C,method:d.method,action:f},f,C))},currentTarget:d}]})}}for(var Id=0;Id<Su.length;Id++){var Hd=Su[Id],oS=Hd.toLowerCase(),lS=Hd[0].toUpperCase()+Hd.slice(1);zn(oS,"on"+lS)}zn(pp,"onAnimationEnd"),zn(mp,"onAnimationIteration"),zn(gp,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(x_,"onTransitionRun"),zn(T_,"onTransitionStart"),zn(A_,"onTransitionCancel"),zn(yp,"onTransitionEnd"),fa("onMouseEnter",["mouseout","mouseover"]),fa("onMouseLeave",["mouseout","mouseover"]),fa("onPointerEnter",["pointerout","pointerover"]),fa("onPointerLeave",["pointerout","pointerover"]),Os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Os("onBeforeInput",["compositionend","keypress","textInput","paste"]),Os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ki="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ki));function Pg(n,s){s=(s&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],d=l.event;l=l.listeners;e:{var f=void 0;if(s)for(var v=l.length-1;0<=v;v--){var S=l[v],C=S.instance,B=S.currentTarget;if(S=S.listener,C!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=B;try{f(d)}catch($){Jo($)}d.currentTarget=null,f=C}else for(v=0;v<l.length;v++){if(S=l[v],C=S.instance,B=S.currentTarget,S=S.listener,C!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=B;try{f(d)}catch($){Jo($)}d.currentTarget=null,f=C}}}}function je(n,s){var i=s[eu];i===void 0&&(i=s[eu]=new Set);var l=n+"__bubble";i.has(l)||(Bg(s,n,2,!1),i.add(l))}function qd(n,s,i){var l=0;s&&(l|=4),Bg(i,n,l,s)}var Ul="_reactListening"+Math.random().toString(36).slice(2);function $d(n){if(!n[Ul]){n[Ul]=!0,Nf.forEach(function(i){i!=="selectionchange"&&(cS.has(i)||qd(i,!1,n),qd(i,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Ul]||(s[Ul]=!0,qd("selectionchange",!1,s))}}function Bg(n,s,i,l){switch(py(s)){case 2:var d=zS;break;case 8:d=PS;break;default:d=sh}i=d.bind(null,s,i,n),d=void 0,!cu||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(s,i,{capture:!0,passive:d}):n.addEventListener(s,i,!0):d!==void 0?n.addEventListener(s,i,{passive:d}):n.addEventListener(s,i,!1)}function Fd(n,s,i,l,d){var f=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var S=l.stateNode.containerInfo;if(S===d)break;if(v===4)for(v=l.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=ua(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){l=f=v;continue e}S=S.parentNode}}l=l.return}Ff(function(){var B=f,$=ou(i),Y=[];e:{var I=vp.get(n);if(I!==void 0){var H=Ko,oe=n;switch(n){case"keypress":if(Vo(i)===0)break e;case"keydown":case"keyup":H=n_;break;case"focusin":oe="focus",H=fu;break;case"focusout":oe="blur",H=fu;break;case"beforeblur":case"afterblur":H=fu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Kf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Fw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=a_;break;case pp:case mp:case gp:H=Kw;break;case yp:H=o_;break;case"scroll":case"scrollend":H=qw;break;case"wheel":H=c_;break;case"copy":case"cut":case"paste":H=Qw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Qf;break;case"toggle":case"beforetoggle":H=d_}var me=(s&4)!==0,Ve=!me&&(n==="scroll"||n==="scrollend"),D=me?I!==null?I+"Capture":null:I;me=[];for(var k=B,P;k!==null;){var G=k;if(P=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||P===null||D===null||(G=mi(k,D),G!=null&&me.push(Yi(k,G,P))),Ve)break;k=k.return}0<me.length&&(I=new H(I,oe,null,i,$),Y.push({event:I,listeners:me}))}}if((s&7)===0){e:{if(I=n==="mouseover"||n==="pointerover",H=n==="mouseout"||n==="pointerout",I&&i!==iu&&(oe=i.relatedTarget||i.fromElement)&&(ua(oe)||oe[ca]))break e;if((H||I)&&(I=$.window===$?$:(I=$.ownerDocument)?I.defaultView||I.parentWindow:window,H?(oe=i.relatedTarget||i.toElement,H=B,oe=oe?ua(oe):null,oe!==null&&(Ve=c(oe),me=oe.tag,oe!==Ve||me!==5&&me!==27&&me!==6)&&(oe=null)):(H=null,oe=B),H!==oe)){if(me=Kf,G="onMouseLeave",D="onMouseEnter",k="mouse",(n==="pointerout"||n==="pointerover")&&(me=Qf,G="onPointerLeave",D="onPointerEnter",k="pointer"),Ve=H==null?I:pi(H),P=oe==null?I:pi(oe),I=new me(G,k+"leave",H,i,$),I.target=Ve,I.relatedTarget=P,G=null,ua($)===B&&(me=new me(D,k+"enter",oe,i,$),me.target=P,me.relatedTarget=Ve,G=me),Ve=G,H&&oe)t:{for(me=uS,D=H,k=oe,P=0,G=D;G;G=me(G))P++;G=0;for(var fe=k;fe;fe=me(fe))G++;for(;0<P-G;)D=me(D),P--;for(;0<G-P;)k=me(k),G--;for(;P--;){if(D===k||k!==null&&D===k.alternate){me=D;break t}D=me(D),k=me(k)}me=null}else me=null;H!==null&&Ig(Y,I,H,me,!1),oe!==null&&Ve!==null&&Ig(Y,Ve,oe,me,!0)}}e:{if(I=B?pi(B):window,H=I.nodeName&&I.nodeName.toLowerCase(),H==="select"||H==="input"&&I.type==="file")var Le=rp;else if(tp(I))if(sp)Le=__;else{Le=b_;var de=v_}else H=I.nodeName,!H||H.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&au(B.elementType)&&(Le=rp):Le=w_;if(Le&&(Le=Le(n,B))){np(Y,Le,i,$);break e}de&&de(n,I,B),n==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&su(I,"number",I.value)}switch(de=B?pi(B):window,n){case"focusin":(tp(de)||de.contentEditable==="true")&&(ba=de,bu=B,Ei=null);break;case"focusout":Ei=bu=ba=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,hp(Y,i,$);break;case"selectionchange":if(E_)break;case"keydown":case"keyup":hp(Y,i,$)}var Re;
vendor: 4,442 bytes, lines 9-10
9if(mu)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else va?Zf(n,i)&&(Me="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Me="onCompositionStart");Me&&(Jf&&i.locale!=="ko"&&(va||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&va&&(Re=Vf()):(zr=$,uu="value"in zr?zr.value:zr.textContent,va=!0)),de=zl(B,Me),0<de.length&&(Me=new Yf(Me,n,null,i,$),Y.push({event:Me,listeners:de}),Re?Me.data=Re:(Re=ep(i),Re!==null&&(Me.data=Re)))),(Re=f_?p_(n,i):m_(n,i))&&(Me=zl(B,"onBeforeInput"),0<Me.length&&(de=new Yf("onBeforeInput","beforeinput",null,i,$),Y.push({event:de,listeners:Me}),de.data=Re)),iS(Y,n,B,i,$)}Pg(Y,s)})}function Yi(n,s,i){return{instance:n,listener:s,currentTarget:i}}function zl(n,s){for(var i=s+"Capture",l=[];n!==null;){var d=n,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=mi(n,i),d!=null&&l.unshift(Yi(n,d,f)),d=mi(n,s),d!=null&&l.push(Yi(n,d,f))),n.tag===3)return l;n=n.return}return[]}function uS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Ig(n,s,i,l,d){for(var f=s._reactName,v=[];i!==null&&i!==l;){var S=i,C=S.alternate,B=S.stateNode;if(S=S.tag,C!==null&&C===l)break;S!==5&&S!==26&&S!==27||B===null||(C=B,d?(B=mi(i,f),B!=null&&v.unshift(Yi(i,B,C))):d||(B=mi(i,f),B!=null&&v.push(Yi(i,B,C)))),i=i.return}v.length!==0&&n.push({event:s,listeners:v})}var dS=/\r\n?/g,hS=/\u0000|\uFFFD/g;function Hg(n){return(typeof n=="string"?n:""+n).replace(dS,`
10`).replace(hS,"")}function qg(n,s){return s=Hg(s),Hg(n)===s}function Fe(n,s,i,l,d,f){switch(i){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||ma(n,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&ma(n,""+l);break;case"className":Ho(n,"class",l);break;case"tabIndex":Ho(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ho(n,i,l);break;case"style":qf(n,l,f);break;case"data":if(s!=="object"){Ho(n,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=$o(""+l),n.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(s!=="input"&&Fe(n,s,"name",d.name,d,null),Fe(n,s,"formEncType",d.formEncType,d,null),Fe(n,s,"formMethod",d.formMethod,d,null),Fe(n,s,"formTarget",d.formTarget,d,null)):(Fe(n,s,"encType",d.encType,d,null),Fe(n,s,"method",d.method,d,null),Fe(n,s,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=$o(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=lr);break;case"onScroll":l!=null&&je("scroll",n);break;case"onScrollEnd":l!=null&&je("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}i=$o(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""+l):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":l===!0?n.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,l):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(i,l):n.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(i):n.setAttribute(i,l);break;case"popover":je("beforetoggle",n),je("toggle",n),Io(n,"popover",l);break;case"xlinkActuate":or(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":or(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":or(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":or(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":or(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":or(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":or(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":or(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":or(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Io(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Iw.get(i)||i,Io(n,i,l))}}function Vd(n,s,i,l,d,f){switch(i){case"style":qf(n,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof l=="string"?ma(n,l):(typeof l=="number"||typeof l=="bigint")&&ma(n,""+l);break;case"onScroll":l!=null&&je("scroll",n);break;case"onScrollEnd":l!=null&&je("scrollend",n);break;case"onClick":l!=null&&(n.onclick=lr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),s=i.slice(2,d?i.length-7:void 0),f=n[Jt]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(s,f,d),typeof l=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(s,l,d);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):Io(n,i,l)}}}function Pt(n,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",n),je("load",n);var l=!1,d=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Fe(n,s,f,v,i,null)}}d&&Fe(n,s,"srcSet",i.srcSet,i,null),l&&Fe(n,s,"src",i.src,i,null);return;case"input":je("invalid",n);var S=f=v=d=null,C=null,B=null;for(l in i)if(i.hasOwnProperty(l)){var $=i[l];if($!=null)switch(l){case"name":d=$;break;case"type":v=$;break;case"checked":C=$;break;case"defaultChecked":B=$;break;case"value":f=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,s));break;default:Fe(n,s,l,$,i,null)}}Pf(n,f,S,C,B,v,d,!1);return;case"select":je("invalid",n),l=v=f=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:Fe(n,s,d,S,i,null)}s=f,i=v,n.multiple=!!l,s!=null?pa(n,!!l,s,!1):i!=null&&pa(n,!!l,i,!0);return;case"textarea":je("invalid",n),f=d=l=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":l=S;break;case"defaultValue":d=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Fe(n,s,v,S,i,null)}If(n,l,d,f);return;case"option":for(C in i)i.hasOwnProperty(C)&&(l=i[C],l!=null)&&(C==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Fe(n,s,C,l,i,null));return;case"dialog":je("beforetoggle",n),je("toggle",n),je("cancel",n),je("close",n);break;case"iframe":case"object":je("load",n);break;case"video":case"audio":for(l=0;l<Ki.length;l++)je(Ki[l],n);break;case"image":je("error",n),je("load",n);break;case"details":je("toggle",n);break;case"embed":case"source":case"link":je("error",n),je("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(B in i)if(i.hasOwnProperty(B)&&(l=i[B],l!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Fe(n,s,B,l,i,null)}return;default:if(au(s)){for($ in i)i.hasOwnProperty($)&&(l=i[$],l!==void 0&&Vd(n,s,$,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&Fe(n,s,S,l,i,null))}function fS(n,s,i,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,v=null,S=null,C=null,B=null,$=null;for(H in i){var Y=i[H];if(i.hasOwnProperty(H)&&Y!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":C=Y;default:l.hasOwnProperty(H)||Fe(n,s,H,null,l,Y)}}for(var I in l){var H=l[I];if(Y=i[I],l.hasOwnProperty(I)&&(H!=null||Y!=null))switch(I){case"type":f=H;break;case"name":d=H;break;case"checked":B=H;break;case"defaultChecked":$=H;break;case"value":v=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,s));break;default:H!==Y&&Fe(n,s,I,H,l,Y)}}ru(n,v,S,C,B,$,f,d);return;case"select":H=v=S=I=null;for(f in i)if(C=i[f],i.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":H=C;default:l.hasOwnProperty(f)||Fe(n,s,f,null,l,C)}for(d in l)if(f=l[d],C=i[d],l.hasOwnProperty(d)&&(f!=null||C!=null))switch(d){case"value":I=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==C&&Fe(n,s,d,f,l,C)}s=S,i=v,l=H,I!=null?pa(n,!!i,I,!1):!!l!=!!i&&(s!=null?pa(n,!!i,s,!0):pa(n,!!i,i?[]:"",!1));return;case"textarea":H=I=null;for(S in i)if(d=i[S],i.hasOwnProperty(S)&&d!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Fe(n,s,S,null,l,d)}for(v in l)if(d=l[v],f=i[v],l.hasOwnProperty(v)&&(d!=null||f!=null))switch(v){case"value":I=d;break;case"defaultValue":H=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==f&&Fe(n,s,v,d,l,f)}Bf(n,I,H);return;case"option":for(var oe in i)I=i[oe],i.hasOwnProperty(oe)&&I!=null&&!l.hasOwnProperty(oe)&&(oe==="selected"?n.selected=!1:Fe(n,s,oe,null,l,I));for(C in l)I=l[C],H=i[C],l.hasOwnProperty(C)&&I!==H&&(I!=null||H!=null)&&(C==="selected"?n.selected=I&&typeof I!="function"&&typeof I!="symbol":Fe(n,s,C,I,l,H));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in i)I=i[me],i.hasOwnProperty(me)&&I!=null&&!l.hasOwnProperty(me)&&Fe(n,s,me,null,l,I);for(B in l)if(I=l[B],H=i[B],l.hasOwnProperty(B)&&I!==H&&(I!=null||H!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(137,s));break;default:Fe(n,s,B,I,l,H)}return;
vendor: 5,458 bytes, line 10
10default:if(au(s)){for(var Ve in i)I=i[Ve],i.hasOwnProperty(Ve)&&I!==void 0&&!l.hasOwnProperty(Ve)&&Vd(n,s,Ve,void 0,l,I);for($ in l)I=l[$],H=i[$],!l.hasOwnProperty($)||I===H||I===void 0&&H===void 0||Vd(n,s,$,I,l,H);return}}for(var D in i)I=i[D],i.hasOwnProperty(D)&&I!=null&&!l.hasOwnProperty(D)&&Fe(n,s,D,null,l,I);for(Y in l)I=l[Y],H=i[Y],!l.hasOwnProperty(Y)||I===H||I==null&&H==null||Fe(n,s,Y,I,l,H)}function $g(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],f=d.transferSize,v=d.initiatorType,S=d.duration;if(f&&S&&$g(v)){for(v=0,S=d.responseEnd,l+=1;l<i.length;l++){var C=i[l],B=C.startTime;if(B>S)break;var $=C.transferSize,Y=C.initiatorType;$&&$g(Y)&&(C=C.responseEnd,v+=$*(C<S?1:(S-B)/(C-B)))}if(--l,s+=8*(f+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Gd=null,Kd=null;function Pl(n){return n.nodeType===9?n:n.ownerDocument}function Fg(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 Vg(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Yd(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Qd=null;function mS(){var n=window.event;return n&&n.type==="popstate"?n===Qd?!1:(Qd=n,!0):(Qd=null,!1)}var Gg=typeof setTimeout=="function"?setTimeout:void 0,gS=typeof clearTimeout=="function"?clearTimeout:void 0,Kg=typeof Promise=="function"?Promise:void 0,yS=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(n){return Kg.resolve(null).then(n).catch(vS)}:Gg;function vS(n){setTimeout(function(){throw n})}function es(n){return n==="head"}function Yg(n,s){var i=s,l=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){n.removeChild(d),Ga(s);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Qi(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Qi(i);for(var f=i.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[fi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&Qi(n.ownerDocument.body);i=d}while(i);Ga(s)}function Qg(n,s){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?s?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(s?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=l}while(i)}function Jd(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var i=s;switch(s=s.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Jd(i),tu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function bS(n,s,i,l){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[fi])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=On(n.nextSibling),n===null)break}return null}function wS(n,s,i){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=On(n.nextSibling),n===null))return null;return n}function Jg(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=On(n.nextSibling),n===null))return null;return n}function Xd(n){return n.data==="$?"||n.data==="$~"}function Wd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function _S(n,s){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||i.readyState!=="loading")s();else{var l=function(){s(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function On(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;
vendor: 5,062 bytes, line 10
10if(s==="/$"||s==="/&")return null}}return n}var Zd=null;function Xg(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(s===0)return On(n.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}n=n.nextSibling}return null}function Wg(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(s===0)return n;s--}else i!=="/$"&&i!=="/&"||s++}n=n.previousSibling}return null}function Zg(n,s,i){switch(s=Pl(i),n){case"html":if(n=s.documentElement,!n)throw Error(a(452));return n;case"head":if(n=s.head,!n)throw Error(a(453));return n;case"body":if(n=s.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Qi(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);tu(n)}var kn=new Map,ey=new Set;function Bl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var xr=Q.d;Q.d={f:SS,r:ES,D:xS,C:TS,L:AS,m:RS,X:OS,S:CS,M:kS};function SS(){var n=xr.f(),s=kl();return n||s}function ES(n){var s=da(n);s!==null&&s.tag===5&&s.type==="form"?ym(s):xr.r(n)}var $a=typeof document>"u"?null:document;function ty(n,s,i){var l=$a;if(l&&typeof s=="string"&&s){var d=Sn(s);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),ey.has(d)||(ey.add(d),n={rel:n,crossOrigin:i,href:s},l.querySelector(d)===null&&(s=l.createElement("link"),Pt(s,"link",n),Tt(s),l.head.appendChild(s)))}}function xS(n){xr.D(n),ty("dns-prefetch",n,null)}function TS(n,s){xr.C(n,s),ty("preconnect",n,s)}function AS(n,s,i){xr.L(n,s,i);var l=$a;if(l&&n&&s){var d='link[rel="preload"][as="'+Sn(s)+'"]';s==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+Sn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+Sn(i.imageSizes)+'"]')):d+='[href="'+Sn(n)+'"]';var f=d;switch(s){case"style":f=Fa(n);break;case"script":f=Va(n)}kn.has(f)||(n=g({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:n,as:s},i),kn.set(f,n),l.querySelector(d)!==null||s==="style"&&l.querySelector(Ji(f))||s==="script"&&l.querySelector(Xi(f))||(s=l.createElement("link"),Pt(s,"link",n),Tt(s),l.head.appendChild(s)))}}function RS(n,s){xr.m(n,s);var i=$a;if(i&&n){var l=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+Sn(l)+'"][href="'+Sn(n)+'"]',f=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Va(n)}if(!kn.has(f)&&(n=g({rel:"modulepreload",href:n},s),kn.set(f,n),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Xi(f)))return}l=i.createElement("link"),Pt(l,"link",n),Tt(l),i.head.appendChild(l)}}}function CS(n,s,i){xr.S(n,s,i);var l=$a;if(l&&n){var d=ha(l).hoistableStyles,f=Fa(n);s=s||"default";var v=d.get(f);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(Ji(f)))S.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},i),(i=kn.get(f))&&eh(n,i);var C=v=l.createElement("link");Tt(C),Pt(C,"link",n),C._p=new Promise(function(B,$){C.onload=B,C.onerror=$}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Il(v,s,l)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(f,v)}}}function OS(n,s){xr.X(n,s);var i=$a;if(i&&n){var l=ha(i).hoistableScripts,d=Va(n),f=l.get(d);f||(f=i.querySelector(Xi(d)),f||(n=g({src:n,async:!0},s),(s=kn.get(d))&&th(n,s),f=i.createElement("script"),Tt(f),Pt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}function kS(n,s){xr.M(n,s);var i=$a;if(i&&n){var l=ha(i).hoistableScripts,d=Va(n),f=l.get(d);f||(f=i.querySelector(Xi(d)),f||(n=g({src:n,async:!0,type:"module"},s),(s=kn.get(d))&&th(n,s),f=i.createElement("script"),Tt(f),Pt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}function ny(n,s,i,l){var d=(d=se.current)?Bl(d):null;if(!d)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(s=Fa(i.href),i=ha(d).hoistableStyles,l=i.get(s),l||(l={type:"style",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Fa(i.href);var f=ha(d).hoistableStyles,v=f.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=d.querySelector(Ji(n)))&&!f._p&&(v.instance=f,v.state.loading=5),kn.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},kn.set(n,i),f||jS(d,n,i,v.state))),s&&l===null)throw Error(a(528,""));return v}if(s&&l!==null)throw Error(a(529,""));return null;case"script":return s=i.async,i=i.src,typeof i=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?
vendor: 5,251 bytes, line 10
10(s=Va(i),i=ha(d).hoistableScripts,l=i.get(s),l||(l={type:"script",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Fa(n){return'href="'+Sn(n)+'"'}function Ji(n){return'link[rel="stylesheet"]['+n+"]"}function ry(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function jS(n,s,i,l){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=n.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),Pt(s,"link",i),Tt(s),n.head.appendChild(s))}function Va(n){return'[src="'+Sn(n)+'"]'}function Xi(n){return"script[async]"+n}function sy(n,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var l=n.querySelector('style[data-href~="'+Sn(i.href)+'"]');if(l)return s.instance=l,Tt(l),l;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Tt(l),Pt(l,"style",d),Il(l,i.precedence,n),s.instance=l;case"stylesheet":d=Fa(i.href);var f=n.querySelector(Ji(d));if(f)return s.state.loading|=4,s.instance=f,Tt(f),f;l=ry(i),(d=kn.get(d))&&eh(l,d),f=(n.ownerDocument||n).createElement("link"),Tt(f);var v=f;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),Pt(f,"link",l),s.state.loading|=4,Il(f,i.precedence,n),s.instance=f;case"script":return f=Va(i.src),(d=n.querySelector(Xi(f)))?(s.instance=d,Tt(d),d):(l=i,(d=kn.get(f))&&(l=g({},i),th(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),Tt(d),Pt(d,"link",l),n.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,Il(l,i.precedence,n));return s.instance}function Il(n,s,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,f=d,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===s)f=S;else if(f!==d)break}f?f.parentNode.insertBefore(n,f.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(n,s.firstChild))}function eh(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function th(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var Hl=null;function ay(n,s,i){if(Hl===null){var l=new Map,d=Hl=new Map;d.set(i,l)}else d=Hl,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(n))return l;for(l.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var f=i[d];if(!(f[fi]||f[Dt]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(s)||"";v=n+v;var S=l.get(v);S?S.push(f):l.set(v,[f])}}return l}function iy(n,s,i){n=n.ownerDocument||n,n.head.insertBefore(i,s==="title"?n.querySelector("head > title"):null)}function NS(n,s,i){if(i===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(n=s.disabled,typeof s.precedence=="string"&&n==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function oy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function MS(n,s,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Fa(l.href),f=s.querySelector(Ji(d));if(f){s=f._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=ql.bind(n),s.then(n,n)),i.state.loading|=4,i.instance=f,Tt(f);return}f=s.ownerDocument||s,l=ry(l),(d=kn.get(d))&&eh(l,d),f=f.createElement("link"),Tt(f);var v=f;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),Pt(f,"link",l),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=ql.bind(n),s.addEventListener("load",i),s.addEventListener("error",i))}}var nh=0;function DS(n,s){return n.stylesheets&&n.count===0&&Fl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&Fl(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+s);0<n.imgBytes&&nh===0&&(nh=62500*pS());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Fl(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>nh?50:800)+s);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function ql(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var $l=null;function Fl(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,$l=new Map,s.forEac
vendor: 10,011 bytes, line 10
10h(LS,n),$l=null,ql.call(n))}function LS(n,s){if(!(s.state.loading&4)){var i=$l.get(n);if(i)var l=i.get(null);else{i=new Map,$l.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var v=d[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=s.instance,v=d.getAttribute("data-precedence"),f=i.get(v)||l,f===l&&i.set(null,d),i.set(v,d),this.count++,l=ql.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),f?f.parentNode.insertBefore(d,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),s.state.loading|=4}}var Wi={$$typeof:j,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function US(n,s,i,l,d,f,v,S,C){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lr(0),this.hiddenUpdates=Lr(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function ly(n,s,i,l,d,f,v,S,C,B,$,Y){return n=new US(n,s,i,v,C,B,$,Y,S),s=1,f===!0&&(s|=24),f=un(3,null,null,s),n.current=f,f.stateNode=n,s=Lu(),s.refCount++,n.pooledCache=s,s.refCount++,f.memoizedState={element:l,isDehydrated:i,cache:s},Bu(f),n}function cy(n){return n?(n=Sa,n):Sa}function uy(n,s,i,l,d,f){d=cy(d),l.context===null?l.context=d:l.pendingContext=d,l=$r(s),l.payload={element:i},f=f===void 0?null:f,f!==null&&(l.callback=f),i=Fr(n,l,s),i!==null&&(nn(i,n,s),ki(i,n,s))}function dy(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<s?i:s}}function rh(n,s){dy(n,s),(n=n.alternate)&&dy(n,s)}function hy(n){if(n.tag===13||n.tag===31){var s=Ms(n,67108864);s!==null&&nn(s,n,67108864),rh(n,67108864)}}function fy(n){if(n.tag===13||n.tag===31){var s=mn();s=la(s);var i=Ms(n,s);i!==null&&nn(i,n,s),rh(n,s)}}var Vl=!0;function zS(n,s,i,l){var d=L.T;L.T=null;var f=Q.p;try{Q.p=2,sh(n,s,i,l)}finally{Q.p=f,L.T=d}}function PS(n,s,i,l){var d=L.T;L.T=null;var f=Q.p;try{Q.p=8,sh(n,s,i,l)}finally{Q.p=f,L.T=d}}function sh(n,s,i,l){if(Vl){var d=ah(l);if(d===null)Fd(n,s,l,Gl,i),my(n,l);else if(IS(d,n,s,i,l))l.stopPropagation();else if(my(n,l),s&4&&-1<BS.indexOf(n)){for(;d!==null;){var f=da(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Kn(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-Bt(v);S.entanglements[1]|=C,v&=~C}Xn(f),(Pe&6)===0&&(Cl=Et()+500,Gi(0))}}break;case 31:case 13:S=Ms(f,2),S!==null&&nn(S,f,2),kl(),rh(f,2)}if(f=ah(l),f===null&&Fd(n,s,l,Gl,i),f===d)break;d=f}d!==null&&l.stopPropagation()}else Fd(n,s,l,null,i)}}function ah(n){return n=ou(n),ih(n)}var Gl=null;function ih(n){if(Gl=null,n=ua(n),n!==null){var s=c(n);if(s===null)n=null;else{var i=s.tag;if(i===13){if(n=u(s),n!==null)return n;n=null}else if(i===31){if(n=h(s),n!==null)return n;n=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return Gl=n,null}function py(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(qe()){case tt:return 2;case wn:return 8;case ar:case di:return 32;case ir:return 268435456;default:return 32}default:return 32}}var oh=!1,ts=null,ns=null,rs=null,Zi=new Map,eo=new Map,ss=[],BS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function my(n,s){switch(n){case"focusin":case"focusout":ts=null;break;case"dragenter":case"dragleave":ns=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":Zi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":eo.delete(s.pointerId)}}function to(n,s,i,l,d,f){return n===null||n.nativeEvent!==f?(n={blockedOn:s,domEventName:i,eventSystemFlags:l,nativeEvent:f,targetContainers:[d]},s!==null&&(s=da(s),s!==null&&hy(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),n)}function IS(n,s,i,l,d){switch(s){case"focusin":return ts=to(ts,n,s,i,l,d),!0;case"dragenter":return ns=to(ns,n,s,i,l,d),!0;case"mouseover":return rs=to(rs,n,s,i,l,d),!0;case"pointerover":var f=d.pointerId;return Zi.set(f,to(Zi.get(f)||null,n,s,i,l,d)),!0;case"gotpointercapture":return f=d.pointerId,eo.set(f,to(eo.get(f)||null,n,s,i,l,d)),!0}return!1}function gy(n){var s=ua(n.target);if(s!==null){var i=c(s);if(i!==null){if(s=i.tag,s===13){if(s=u(i),s!==null){n.blockedOn=s,kf(n.priority,function(){fy(i)});return}}else if(s===31){if(s=h(i),s!==null){n.blockedOn=s,kf(n.priority,function(){fy(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Kl(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var i=ah(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);iu=l,i.target.dispatchEvent(l),iu=null}else return s=da(i),s!==null&&hy(s),n.blockedOn=i,!1;s.shift()}return!0}function yy(n,s,i){Kl(n)&&i.delete(s)}function HS(){oh=!1,ts!==null&&Kl(ts)&&(ts=null),ns!==null&&Kl(ns)&&(ns=null),rs!==null&&Kl(rs)&&(rs=null),Zi.forEach(yy),eo.forEach(yy)}function Yl(n,s){n.blockedOn===s&&(n.blockedOn=null,oh||(oh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,HS)))}var Ql=null;function vy(n){Ql!==n&&(Ql=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ql===n&&(Ql=null);for(var s=0;s<n.length;s+=3){var i=n[s],l=n[s+1],d=n[s+2];if(typeof l!="function"){if(ih(l||i)===null)continue;break}var f=da(i);f!==null&&(n.splice(s,3),s-=3,ad(f,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Ga(n){function s(C){return Yl(C,n)}ts!==null&&Yl(ts,n),ns!==null&&Yl(ns,n),rs!==null&&Yl(rs,n),Zi.forEach(s),eo.forEach(s);for(var i=0;i<ss.length;i++){var l=ss[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<ss.length&&(i=ss[0],i.blockedOn===null);)gy(i),i.blockedOn===null&&ss.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],f=i[l+1],v=d[Jt]||null;if(typeof f=="function")v||vy(i);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Jt]||null)S=v.formAction;else if(ih(d)!==null)continue}else S=v.action;typeof S=="function"?i[l+1]=S:(i.splice(l,3),l-=3),vy(i)}}}function by(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!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 l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function lh(n){this._internalRoot=n}Jl.prototype.render=lh.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,l=mn();uy(i,l,n,s,null,null)},Jl.prototype.unmount=lh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;uy(n.current,2,null,n,null,null),kl(),s[ca]=null}};function Jl(n){this._internalRoot=n}Jl.prototype.unstable_scheduleHydration=function(n){if(n){var s=Zc();n={blockedOn:null,target:n,priority:s};for(var i=0;i<ss.length&&s!==0&&s<ss[i].priority;i++);ss.splice(i,0,n),i===0&&gy(n)}};var wy=t.version;if(wy!=="19.2.5")throw Error(a(527,wy,"19.2.5"));Q.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var qS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xl.isDisabled&&Xl.supportsFiber)try{As=Xl.inject(qS),$t=Xl}catch{}}
10return ro.createRoot=function(n,s){if(!o(n))throw Error(a(299));var i=!1,l="",d=Rm,f=Cm,v=Om;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(f=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=ly(n,1,!1,null,null,i,l,null,d,f,v,by),n[ca]=s.current,$d(n),new lh(s)},ro.hydrateRoot=function(n,s,i){if(!o(n))throw Error(a(299));var l=!1,d="",f=Rm,v=Cm,S=Om,C=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),s=ly(n,1,!0,s,i??null,l,d,C,f,v,S,by),s.context=cy(null),i=s.current,l=mn(),l=la(l),d=$r(l),d.callback=null,Fr(i,d,l),i=l,s.current.lanes=i,et(s,i),Xn(s),n[ca]=s.current,$d(n),new Jl(s)},ro.version="19.2.5",ro}var ky;function WS(){if(ky)return dh.exports;ky=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),dh.exports=XS(),dh.exports}var ZS=WS(),e1="__TSS_CONTEXT",Ph=Symbol.for("TSS_SERVER_FUNCTION"),jy=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),t1="application/x-tss-framed",Tr={JSON:0,CHUNK:1,END:2,ERROR:3},n1=/;\s*v=(\d+)/;function r1(e){const t=e.match(n1);return t?parseInt(t[1],10):void 0}function s1(e){const t=r1(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var hf=()=>window.__TSS_START_OPTIONS__,xb=!1;function _o(e){return e[e.length-1]}function a1(e){return typeof e=="function"}function fs(e,t){return a1(e)?e(t):e}var i1=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,o1=()=>Object.create(null),Gs=(e,t)=>ps(e,t,o1);function ps(e,t,r=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const o=t,c=Ly(e)&&Ly(o);if(!c&&!(ci(e)&&ci(o)))return o;const u=c?e:My(e);if(!u)return o;const h=c?o:My(o);if(!h)return o;const p=u.length,m=h.length,y=c?new Array(m):r();let g=0;for(let b=0;b<m;b++){const w=c?b:h[b],_=e[w],A=o[w];if(_===A){y[w]=_,(c?b<p:i1.call(e,w))&&g++;continue}if(_===null||A===null||typeof _!="object"||typeof A!="object"){y[w]=A;continue}const E=ps(_,A,r,a+1);y[w]=E,E===_&&g++}return p===m&&g===p?e:y}function My(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Ny.call(e,o))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const a=t;for(const o of r){if(!Ny.call(e,o))return!1;a.push(o)}return a}function ci(e){if(!Dy(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!Dy(r)||!r.hasOwnProperty("isPrototypeOf"))}function Dy(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ly(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function an(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!an(e[a],t[a],r))return!1;return!0}if(ci(e)&&ci(t)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!an(e[u],t[u],r))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let c=0;for(const u in t)if((!a||t[u]!==void 0)&&(c++,c>o||!an(e[u],t[u],r)))return!1;return o===c}return!1}function na(e){let t,r;const a=new Promise((o,c)=>{t=o,r=c});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",r(o)},a}function l1(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function So(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function c1(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Uy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return c1(t)}var u1=["http:","https:","mailto:","tel:"];function _c(e,t){if(!e)return!1;
10try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}var d1={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},h1=/[&><\u2028\u2029]/g;function f1(e){return e.replace(h1,t=>d1[t])}function so(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,a="",o;for(;(o=t.exec(e))!==null;)a+=Uy(e.slice(r,o.index))+o[0],r=t.lastIndex;a=a+Uy(r?e.slice(r):e);let c=!1;return a.startsWith("//")&&(c=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:c}}function p1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function m1(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function on(){throw new Error("Invariant failed")}function Eo(e){const t=new Map;let r,a;const o=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,a&&(a.next=c,c.prev=a)):(c.next.prev=void 0,r=c.next,c.next=void 0,a&&(c.prev=a,a.next=c)),a=c)};return{get(c){const u=t.get(c);if(u)return o(u),u.value},set(c,u){if(t.size>=e&&r){const p=r;t.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const h=t.get(c);if(h)h.value=u,o(h);else{const p={key:c,value:u,prev:a};a&&(a.next=p),a=p,r||(r=p),t.set(c,p)}},clear(){t.clear(),r=void 0,a=void 0}}}var ms=4,Tb=5;function g1(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function ff(e,t,r=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,c=e.substring(t,o);if(!c||!c.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r;if(c==="$"){const h=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=h,r[4]=h,r[5]=h,r}if(c.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=o,r[4]=o,r[5]=o,r;const u=g1(c);if(u){const[h,p]=u,m=c.charCodeAt(h+1);if(m===45){if(h+2<c.length&&c.charCodeAt(h+2)===36){const y=h+3,g=p;if(y<g)return r[0]=3,r[1]=t+h,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=o,r}}else if(m===36){const y=h+1,g=h+2;return g===p?(r[0]=2,r[1]=t+h,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=e.length,r):(r[0]=1,r[1]=t+h,r[2]=t+g,r[3]=t+p,r[4]=t+p+1,r[5]=o,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r}function Bc(e,t,r,a,o,c,u){u?.(r);let h=a;{const p=r.fullPath??r.from,m=p.length,y=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;h<m;){const w=ff(p,h,t);let _;const A=h,E=w[5];switch(h=E+1,c++,w[0]){case 0:{const x=p.substring(w[2],w[3]);if(y){const M=o.static?.get(x);if(M)_=M;else{o.static??=new Map;const j=Js(r.fullPath??r.from);j.parent=o,j.depth=c,_=j,o.static.set(x,j)}}else{const M=x.toLowerCase(),j=o.staticInsensitive?.get(M);if(j)_=j;else{o.staticInsensitive??=new Map;const U=Js(r.fullPath??r.from);U.parent=o,U.depth=c,_=U,o.staticInsensitive.set(M,U)}}break}case 1:{const x=p.substring(A,w[1]),M=p.substring(w[4],E),j=y&&!!(x||M),U=x?j?x:x.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,V=!g&&o.dynamic?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===U&&q.suffix===X);if(V)_=V;else{const q=gh(1,r.fullPath??r.from,j,U,X);_=q,q.depth=c,q.parent=o,o.dynamic??=[],o.dynamic.push(q)}break}case 3:{const x=p.substring(A,w[1]),M=p.substring(w[4],E),j=y&&!!(x||M),U=x?j?x:x.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,V=!g&&o.optional?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===U&&q.suffix===X);if(V)_=V;else{const q=gh(3,r.fullPath??r.from,j,U,X);_=q,q.parent=o,q.depth=c,o.optional??=[],o.optional.push(q)}break}case 2:{const x=p.substring(A,w[1]),M=p.substring(w[4],E),j=y&&!!(x||M),U=x?j?x:x.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,V=gh(2,r.fullPath??r.from,j,U,X);_=V,V.parent=o,V.depth=c,o.wildcard??=[],o.wildcard.push(V)}}o=_}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=Js(r.fullPath??r.from);w.kind=Tb,w.parent=o,c++,w.depth=c,o.pathless??=[],o.pathless.push(w),o=w}const b=(r.path||!r.children)&&!r.isRoot;if(b&&p.endsWith("/")){const w=Js(r.fullPath??r.from);w.kind=ms,w.parent=o,c++,w.depth=c,o.index=w,o=w}o.parse=r.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Bc(e,t,p,h,o,c,u)}function mh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function cs(e){if(e.pathless)for(const t of e.pathless)cs(t);if(e.static)for(const t of e.static.values())cs(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())cs(t);if(e.dynamic?.length){e.dynamic.sort(mh);for(const t of e.dynamic)cs(t)}if(e.optional?.length){e.optional.sort(mh);for(const t of e.optional)cs(t)}if(e.wildcard?.length){e.wildcard.sort(mh);for(const t of e.wildcard)cs(t)}}function Js(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function gh(e,t,r,a,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:a,suffix:o}}function y1(e,t){const r=Js("/"),a=new Uint16Array(6);for(const o of e)Bc(!1,a,o,1,r,0);cs(r),t.masksTree=r,t.flatCache=Eo(1e3)}function v1(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;
10const a=pf(e,t.masksTree);return t.flatCache.set(e,a),a}function b1(e,t,r,a,o){e||="/",a||="/";const c=t?`case\0${e}`:e;let u=o.singleCache.get(c);return u||(u=Js("/"),Bc(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(c,u)),pf(a,u,r)}function w1(e,t,r=!1){const a=r?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";let c;try{c=pf(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=E1(c.route)),t.matchCache.set(a,c),c}function _1(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function S1(e,t=!1,r){const a=Js(e.fullPath),o=new Uint16Array(6),c={},u={};let h=0;return Bc(t,o,e,1,a,0,p=>{if(r?.(p,h),p.id in c&&on(),c[p.id]=p,h!==0&&p.path){const m=_1(p.fullPath);(!u[m]||p.fullPath.endsWith("/"))&&(u[m]=p)}h++}),cs(a),{processedTree:{segmentTree:a,singleCache:Eo(1e3),matchCache:Eo(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function pf(e,t,r=!1){const a=e.split("/"),o=T1(e,a,t,r);if(!o)return null;const[c]=Ab(e,a,o);return{route:o.node.route,rawParams:c,parsedParams:o.parsedParams}}function Ab(e,t,r){const a=x1(r.node);let o=null;const c=Object.create(null);let u=r.extract?.part??0,h=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;h<a.length;u++,h++,p++,m++){const y=a[h];if(y.kind===ms)break;if(y.kind===Tb){m--,u--,p--;continue}const g=t[u],b=p;if(g&&(p+=g.length),y.kind===1){o??=r.node.fullPath.split("/");const w=o[m],_=y.prefix?.length??0;if(w.charCodeAt(_)===123){const A=y.suffix?.length??0,E=w.substring(_+2,w.length-A-1),x=g.substring(_,g.length-A);c[E]=decodeURIComponent(x)}else{const A=w.substring(1);c[A]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<h){u--,p=b-1;continue}o??=r.node.fullPath.split("/");const w=o[m],_=y.prefix?.length??0,A=y.suffix?.length??0,E=w.substring(_+3,w.length-A-1),x=y.suffix||y.prefix?g.substring(_,g.length-A):g;x&&(c[E]=decodeURIComponent(x))}else if(y.kind===2){const w=y,_=e.substring(b+(w.prefix?.length??0),e.length-(w.suffix?.length??0)),A=decodeURIComponent(_);c["*"]=A,c._splat=A;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:h,path:p,segment:m}]}function E1(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function x1(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function T1(e,t,r,a){if(e==="/"&&r.index)return{node:r.index,skipped:0};const o=!_o(t),c=o&&e!=="/",u=t.length-(o?1:0),h=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const y=h.pop(),{node:g,index:b,skipped:w,depth:_,statics:A,dynamics:E,optionals:x}=y;let{extract:M,rawParams:j,parsedParams:U}=y;if(g.kind===2&&g.route&&!Zl(m,y))continue;if(g.skipOnParamError){if(!zy(e,t,y))continue;j=y.rawParams,M=y.extract,U=y.parsedParams}a&&g.route&&g.kind!==ms&&Zl(p,y)&&(p=y);const X=b===u;if(X&&(g.route&&(!c||g.kind===ms||g.kind===2)&&Zl(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const V=X?void 0:t[b];let q;if(X&&g.index){const z={node:g.index,index:b,skipped:w,depth:_+1,statics:A,dynamics:E,optionals:x,extract:M,rawParams:j,parsedParams:U};let J=!0;if(g.index.skipOnParamError&&(zy(e,t,z)||(J=!1)),J){if(!E&&!x&&!w&&A1(A,u))return z;Zl(m,z)&&(m=z)}}if(g.wildcard)for(let z=g.wildcard.length-1;z>=0;z--){const J=g.wildcard[z],{prefix:he,suffix:ie}=J;if(!(he&&(X||!(J.caseSensitive?V:q??=V.toLowerCase()).startsWith(he)))){if(ie){if(X)continue;const we=t.slice(b).join("/").slice(-ie.length);if((J.caseSensitive?we:we.toLowerCase())!==ie)continue}h.push({node:J,index:u,skipped:w,depth:_+1,statics:A,dynamics:E,optionals:x,extract:M,rawParams:j,parsedParams:U})}}if(g.optional){const z=w|1<<_,J=_+1;for(let he=g.optional.length-1;he>=0;he--){const ie=g.optional[he];h.push({node:ie,index:b,skipped:z,depth:J,statics:A,dynamics:E,optionals:x,extract:M,rawParams:j,parsedParams:U})}if(!X)for(let he=g.optional.length-1;he>=0;he--){const ie=g.optional[he],{prefix:we,suffix:xe}=ie;if(we||xe){const Be=ie.caseSensitive?V:q??=V.toLowerCase();if(we&&!Be.startsWith(we)||xe&&!Be.endsWith(xe))continue}h.push({node:ie,index:b+1,skipped:w,depth:J,statics:A,dynamics:E,optionals:x+Wl(u,b),extract:M,rawParams:j,parsedParams:U})}}if(!X&&g.dynamic&&V)for(let z=g.dynamic.length-1;z>=0;z--){const J=g.dynamic[z],{prefix:he,suffix:ie}=J;if(he||ie){const we=J.caseSensitive?V:q??=V.toLowerCase();if(he&&!we.startsWith(he)||ie&&!we.endsWith(ie))continue}h.push({node:J,index:b+1,skipped:w,depth:_+1,statics:A,dynamics:E+Wl(u,b),optionals:x,extract:M,rawParams:j,parsedParams:U})}
10if(!X&&g.staticInsensitive){const z=g.staticInsensitive.get(q??=V.toLowerCase());z&&h.push({node:z,index:b+1,skipped:w,depth:_+1,statics:A+Wl(u,b),dynamics:E,optionals:x,extract:M,rawParams:j,parsedParams:U})}if(!X&&g.static){const z=g.static.get(V);z&&h.push({node:z,index:b+1,skipped:w,depth:_+1,statics:A+Wl(u,b),dynamics:E,optionals:x,extract:M,rawParams:j,parsedParams:U})}if(g.pathless){const z=_+1;for(let J=g.pathless.length-1;J>=0;J--){const he=g.pathless[J];h.push({node:he,index:b,skipped:w,depth:z,statics:A,dynamics:E,optionals:x,extract:M,rawParams:j,parsedParams:U})}}}if(m)return m;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=t[b].length;const g=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Wl(e,t){return 2**(e-t-1)}function A1(e,t){return e===2**(t-1)-1}function zy(e,t,r){try{const[a,o]=Ab(e,t,r);r.rawParams=a,r.extract=o;const c=r.node.parse(a);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,c),!0}catch{return null}}function Zl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ms)>(e.node.kind===ms)||t.node.kind===ms==(e.node.kind===ms)&&t.depth>e.depth))):!0}function mc(e){return mf(e.filter(t=>t!==void 0).join("/"))}function mf(e){return e.replace(/\/{2,}/g,"/")}function Rb(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ys(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Cb(e){return ys(Rb(e))}function Sc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function R1(e,t,r){return Sc(e,r)===Sc(t,r)}function C1({base:e,to:t,trailingSlash:r="never",cache:a}){const o=t.startsWith("/"),c=!o&&t===".";let u;if(a){u=o?t:c?e:e+"\0"+t;const g=a.get(u);if(g)return g}let h;if(c)h=e.split("/");else if(o)h=t.split("/");else{for(h=e.split("/");h.length>1&&_o(h)==="";)h.pop();const g=t.split("/");for(let b=0,w=g.length;b<w;b++){const _=g[b];_===""?b?b===w-1&&h.push(_):h=[_]:_===".."?h.pop():_==="."||h.push(_)}}h.length>1&&(_o(h)===""?r==="never"&&h.pop():r==="always"&&h.push(""));let p,m="";for(let g=0;g<h.length;g++){g>0&&(m+="/");const b=h[g];if(!b)continue;p=ff(b,0,p);const w=p[0];if(w===0){m+=b;continue}const _=p[5],A=b.substring(0,p[1]),E=b.substring(p[4],_),x=b.substring(p[2],p[3]);w===1?m+=A||E?`${A}{$${x}}${E}`:`$${x}`:w===2?m+=A||E?`${A}{$}${E}`:"$":m+=`${A}{-$${x}}${E}`}m=mf(m);const y=m||"/";return u&&a&&a.set(u,y),y}function O1(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),r=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return o=>o.replace(a,c=>t.get(c)??c)}function yh(e,t,r){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>By(o,r)).join("/"):By(a,r)}function Py({path:e,params:t,decoder:r,...a}){let o=!1;const c=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:c,isMissingParams:o};const u=e.length;let h=0,p,m="";for(;h<u;){const y=h;p=ff(e,y,p);const g=p[5];if(h=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+e.substring(y,g);continue}if(b===2){const w=t._splat;c._splat=w,c["*"]=w;const _=e.substring(y,p[1]),A=e.substring(p[4],g);if(!w){o=!0,(_||A)&&(m+="/"+_+A);continue}const E=yh("_splat",t,r);m+="/"+_+E+A;continue}if(b===1){const w=e.substring(p[2],p[3]);!o&&!(w in t)&&(o=!0),c[w]=t[w];const _=e.substring(y,p[1]),A=e.substring(p[4],g),E=yh(w,t,r)??"undefined";m+="/"+_+E+A;continue}if(b===3){const w=e.substring(p[2],p[3]),_=t[w];if(_==null)continue;c[w]=_;const A=e.substring(y,p[1]),E=e.substring(p[4],g),x=yh(w,t,r)??"";m+="/"+A+x+E;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:o}}function By(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function Ob(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Ct(e){return e?.isNotFound===!0}function k1(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var j1="tsr-scroll-restoration-v1_3";function N1(){const e=k1();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");ci(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=fs(a,t)||t},persist:()=>{try{e.setItem(j1,JSON.stringify(t))}catch{}}}}var Iy=N1(),M1=e=>e.state.__TSR_key||e.href;function D1(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var ec=!1,ao="window",Hy="data-scroll-restoration-id";function L1(e,t){if(!Iy)return;const r=Iy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,ec=!1;const a=e.options.getScrollRestorationKey||M1,o=new Map;window.history.scrollRestoration="manual";const c=h=>{if(!(ec||!e.isScrollRestoring))if(h.target===document||h.target===window)o.set(ao,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=h.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},u=h=>{if(!e.isScrollRestoring||!h||o.size===0||!r)return;const p=r.state[h]||={};for(const[m,y]of o){let g;if(m===ao)g=ao;else if(m.isConnected){const b=m.getAttribute(Hy);g=b?`[${Hy}="${b}"]`:D1(m)}g&&(p[g]=y)}};document.addEventListener("scroll",c,!0),e.subscribe("onBeforeLoad",h=>{u(h.fromLocation?a(h.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(a(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",h=>{const p=a(h.toLocation),m=e.options.scrollRestorationBehavior,y=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}
10if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){ec=!0;try{const g=e.isScrollRestoring?r.state[p]:void 0;let b=!1;if(g)for(const w in g){const _=g[w];if(!ci(_))continue;const{scrollX:A,scrollY:E}=_;if(!(!Number.isFinite(A)||!Number.isFinite(E))){if(w===ao)window.scrollTo({top:E,left:A,behavior:m}),b=!0;else if(w){let x;try{x=document.querySelector(w)}catch{continue}x&&(x.scrollLeft=A,x.scrollTop=E,b=!0)}}}if(!b){const w=e.history.location.hash.slice(1);if(w){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const A=document.getElementById(w);A&&A.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:m};if(window.scrollTo(_),y)for(const A of y){if(A===ao)continue;const E=typeof A=="function"?A():document.querySelector(A);E&&E.scrollTo(_)}}}}finally{ec=!1}e.isScrollRestoring&&r.set(g=>(g[p]||={},g))}})}function kb(e,t=String){const r=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&r.set(a,t(o))}return r.toString()}function vh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function U1(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[a,o]of t.entries()){const c=r[a];c==null?r[a]=vh(o):Array.isArray(c)?c.push(vh(o)):r[a]=[c,vh(o)]}return r}var z1=B1(JSON.parse),P1=I1(JSON.stringify,JSON.parse);function B1(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=U1(t);for(const a in r){const o=r[a];if(typeof o=="string")try{r[a]=e(o)}catch{}}return r}}function I1(e,t){const r=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(r&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const c=kb(o,a);return c?`?${c}`:""}}var ea="__root__";function jb(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function Gt(e){return e instanceof Response&&!!e.options}function Nb(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return jb(e)}function H1(e){return{input:({url:t})=>{for(const r of e)t=Bh(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=Mb(e[r],t);return t}}}function q1(e){const t=Cb(e.basepath),r=`/${t}`,a=`${r}/`,o=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const h=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return h===o?u.pathname="/":h.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=mc(["/",t,u.pathname]),u)}}function Bh(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function Mb(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function $1(e,t){const{createMutableStore:r,createReadonlyStore:a,batch:o,init:c}=t,u=new Map,h=new Map,p=new Map,m=r(e.status),y=r(e.loadedAt),g=r(e.isLoading),b=r(e.isTransitioning),w=r(e.location),_=r(e.resolvedLocation),A=r(e.statusCode),E=r(e.redirect),x=r([]),M=r([]),j=r([]),U=a(()=>bh(u,x.get())),X=a(()=>bh(h,M.get())),V=a(()=>bh(p,j.get())),q=a(()=>x.get()[0]),z=a(()=>x.get().some(Q=>u.get(Q)?.get().status==="pending")),J=a(()=>({locationHref:w.get().href,resolvedLocationHref:_.get()?.href,status:m.get()})),he=a(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:b.get(),matches:U.get(),location:w.get(),resolvedLocation:_.get(),statusCode:A.get(),redirect:E.get()})),ie=Eo(64);function we(Q){let ae=ie.get(Q);return ae||(ae=a(()=>{const Te=x.get();for(const ee of Te){const O=u.get(ee);if(O&&O.routeId===Q)return O.get()}}),ie.set(Q,ae)),ae}const xe={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:w,resolvedLocation:_,statusCode:A,redirect:E,matchesId:x,pendingIds:M,cachedIds:j,matches:U,pendingMatches:X,cachedMatches:V,firstId:q,hasPending:z,matchRouteDeps:J,matchStores:u,pendingMatchStores:h,cachedMatchStores:p,__store:he,getRouteMatchStore:we,setMatches:Be,setPending:Oe,setCac
10hed:L};Be(e.matches),c?.(xe);function Be(Q){wh(Q,u,x,r,o)}function Oe(Q){wh(Q,h,M,r,o)}function L(Q){wh(Q,p,j,r,o)}return xe}function bh(e,t){const r=[];for(const a of t){const o=e.get(a);o&&r.push(o.get())}return r}function wh(e,t,r,a,o){const c=e.map(h=>h.id),u=new Set(c);o(()=>{for(const h of t.keys())u.has(h)||t.delete(h);for(const h of e){const p=t.get(h.id);if(!p){const m=a(h);m.routeId=h.routeId,t.set(h.id,m);continue}p.routeId=h.routeId,p.get()!==h&&p.set(h)}m1(r.get(),c)||r.set(c)})}var Ih=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},F1=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ic=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),ta=(e,t,r=!0)=>{const a={...e.router.options.context??{}},o=r?t:t-1;for(let c=0;c<=o;c++){const u=e.matches[c];if(!u)continue;const h=e.router.getMatch(u.id);h&&Object.assign(a,h.__routeContext,h.__beforeLoadContext)}return a},qy=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,a=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),o=a>=0?a:0;let c=r?e.matches.findIndex(u=>u.routeId===r):e.firstBadMatchIndex??e.matches.length-1;c<0&&(c=o);for(let u=c;u>=0;u--){const h=e.matches[u];if(e.router.looseRoutesById[h.routeId].options.notFoundComponent)return u}return r?c:o},gs=(e,t,r)=>{if(!(!Gt(r)&&!Ct(r)))throw Gt(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,a=>({...a,status:Gt(r)?"redirected":Ct(r)?"notFound":a.status==="pending"?"success":a.status,context:ta(e,t.index),isFetching:!1,error:r})),Ct(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Gt(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},Db=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},$y=(e,t,r)=>{const a=ta(e,r);e.updateMatch(t,o=>({...o,context:a}))},io=(e,t,r,a)=>{const{id:o,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=a,e.firstBadMatchIndex??=t,gs(e,e.router.getMatch(o),r);try{u.options.onError?.(r)}catch(h){r=h,gs(e,e.router.getMatch(o),r)}e.updateMatch(o,h=>(h._nonReactive.beforeLoadPromise?.resolve(),h._nonReactive.beforeLoadPromise=void 0,h._nonReactive.loadPromise?.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Gt(r)&&!Ct(r)&&(e.serialError??=r)},Lb=(e,t,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ic(e,t)&&(r.options.loader||r.options.beforeLoad||zb(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{Ih(e)},o);a._nonReactive.pendingTimeout=c}},V1=(e,t,r)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Lb(e,t,r,a);const o=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&gs(e,c,c.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},G1=(e,t,r,a)=>{const o=e.router.getMatch(t);let c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=na(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:h}=o;u&&io(e,r,u,"PARSE_PARAMS"),h&&io(e,r,h,"VALIDATE_SEARCH"),Lb(e,t,a,o);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(t,U=>({...U,isFetching:"beforeLoad",fetchCount:U.fetchCount+1,abortController:p})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,U=>({...U,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=na();const b={...ta(e,r,!1),...o.__routeContext},{search:w,params:_,cause:A}=o,E=Ic(e,t),x={search:w,abortController:p,params:_,preload:E,context:b,location:e.location,navigate:U=>e.router.navigate({...U,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":A,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},M=U=>{if(U===void 0){e.router.batch(()=>{y(),g()});return}(Gt(U)||Ct(U))&&(y(),io(e,r,U,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,X=>({...X,__beforeLoadContext:U})),g()})};let j;try{if(j=a.options.beforeLoad(x),So(j))return y(),j.catch(U=>{io(e,r,U,"BEFORE_LOAD")}).then(M)}catch(U){y(),io(e,r,U,"BEFORE_LOAD")}M(j)},K1=(e,t)=>{const{id:r,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],c=()=>h(),u=()=>G1(e,r,t,o),h=()=>
10{if(Db(e,r))return;const p=V1(e,r,o);return So(p)?p.then(u):u()};return c()},Y1=(e,t,r)=>{const a=e.router.getMatch(t);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([c,u,h])=>({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:h,scripts:u,styles:c?.styles}))},Ub=(e,t,r,a,o)=>{const c=t[a-1],{params:u,loaderDeps:h,abortController:p,cause:m}=e.router.getMatch(r),y=ta(e,a),g=Ic(e,r);return{params:u,deps:h,preload:!!g,parentMatchPromise:c,abortController:p,context:y,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:g?"preload":m,route:o,...e.router.options.additionalContext}},Fy=async(e,t,r,a,o)=>{try{const c=e.router.getMatch(r);try{(!(xb??e.router.isServer)||c.ssr===!0)&&xo(o);const u=o.options.loader,h=typeof u=="function"?u:u?.handler,p=h?.(Ub(e,t,r,a,o)),m=!!h&&So(p);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(r,g=>({...g,isFetching:"loader"})),h){const g=m?await p:p;gs(e,e.router.getMatch(r),g),g!==void 0&&e.updateMatch(r,b=>({...b,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,e.updateMatch(r,g=>({...g,error:void 0,context:ta(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let h=u;if(h?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:ta(e,a)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,Ct(u)&&await o.options.notFoundComponent?.preload?.(),gs(e,e.router.getMatch(r),u);try{o.options.onError?.(u)}catch(m){h=m,gs(e,e.router.getMatch(r),m)}!Gt(h)&&!Ct(h)&&await xo(o,["errorComponent"]),e.updateMatch(r,m=>({...m,error:h,context:ta(e,a),status:"error",isFetching:!1}))}}catch(c){const u=e.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),gs(e,u,c)}},Q1=async(e,t,r)=>{async function a(w,_,A,E,x){const M=Date.now()-_.updatedAt,j=w?x.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??e.router.options.defaultStaleTime??0,U=x.options.shouldReload,X=typeof U=="function"?U(Ub(e,t,o,r,x)):U,{status:V,invalid:q}=E,z=M>=j&&(!!e.forceStaleReload||E.cause==="enter"||A!==void 0&&A!==E.id);u=V==="success"&&(q||(X??z)),w&&x.options.preload===!1||(u&&!e.sync&&y?(h=!0,(async()=>{try{await Fy(e,t,o,r,x);const J=e.router.getMatch(o);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){Gt(J)&&await e.router.navigate(J.options)}})()):V!=="success"||u?await Fy(e,t,o,r,x):$y(e,o,r))}const{id:o,routeId:c}=e.matches[r];let u=!1,h=!1;const p=e.router.looseRoutesById[c],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Db(e,o)){if(!e.router.getMatch(o))return e.matches[r];$y(e,o,r)}else{const w=e.router.getMatch(o),_=e.router.stores.matchesId.get()[r],A=(_&&e.router.stores.matchStores.get(_)||null)?.routeId===c?_:e.router.stores.matches.get().find(x=>x.routeId===c)?.id,E=Ic(e,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!e.sync&&!w.preload&&y)return w;await w._nonReactive.loaderPromise;const x=e.router.getMatch(o),M=x._nonReactive.error||x.error;M&&gs(e,x,M),x.status==="pending"&&await a(E,w,A,x,p)}else{const x=E&&!e.router.stores.matchStores.has(o),M=e.router.getMatch(o);M._nonReactive.loaderPromise=na(),x!==M.preload&&e.updateMatch(o,j=>({...j,preload:x})),await a(E,w,A,M,p)}}const g=e.router.getMatch(o);h||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pen
10dingTimeout),g._nonReactive.pendingTimeout=void 0,h||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=h?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(e.updateMatch(o,w=>({...w,isFetching:b,invalid:!1})),e.router.getMatch(o)):g};async function Vy(e){const t=e,r=[];F1(t.router)&&Ih(t);let a;for(let b=0;b<t.matches.length;b++){try{const w=K1(t,b);So(w)&&await w}catch(w){if(Gt(w))throw w;if(Ct(w))a=w;else if(!t.preload)throw w;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,c=a&&!t.preload?qy(t,a):void 0,u=a&&t.preload?0:c!==void 0?Math.min(c+1,o):o;let h,p;for(let b=0;b<u;b++)r.push(Q1(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const _=w.reason;if(Gt(_))throw _;Ct(_)?h??=_:p??=_}if(p!==void 0)throw p}const m=h??(a&&!t.preload?a:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!m&&a&&t.preload)return t.matches;if(m){const b=qy(t,m);b===void 0&&on();const w=t.matches[b],_=t.router.looseRoutesById[w.routeId],A=t.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&A&&(_.options.notFoundComponent=A),m.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,x=>({...x,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await xo(_,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await xo(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:w,routeId:_}=t.matches[b],A=t.router.looseRoutesById[_];try{const E=Y1(t,w,A);if(E){const x=await E;t.updateMatch(w,M=>({...M,...x}))}}catch(E){console.error(`Error executing head for route ${_}:`,E)}}const g=Ih(t);if(So(g)&&await g,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Gy(e,t){const r=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function xo(e,t=gc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:o,...c}=a.options;Object.assign(e.options,c),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===gc?(()=>{if(e._componentsPromise===void 0){const a=Gy(e,gc);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Gy(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function zb(e){for(const t of gc)if(e.options[t]?.preload)return!0;return!1}var gc=["component","errorComponent","pendingComponent","notFoundComponent"],vs="__TSR_index",Ky="popstate",Yy="beforeunload";function J1(e){let t=e.getLocation();const r=new Set,a=u=>{t=e.getLocation(),r.forEach(h=>h({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},c=async({task:u,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=Ec(p.path,p.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,h,p)=>{const m=t.state[vs];h=Qy(m+1,h),c({task:()=>{e.pushState(u,h),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:h})},replace:(u,h,p)=>{const m=t.state[vs];h=Qy(m,h),c({task:()=>{e.replaceState(u,h),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:h})},go:(u,h)=>{c({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:h,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[vs]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const h=e.getBlockers?.()??[];return e.setBlockers([...h,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function Qy(e,t){t||(t={});const r=gf();return{...t,key:r,__TSR_key:r,[vs]:e}}function X1(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,a=t.history.replaceState;let o=[];const c=()=>o,u=z=>o=z,h=(z=>z),p=(()=>Ec(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const z=gf();t.history.replaceState({[vs]:0,key:z,__TSR_key:z},"")}let m=p(),y,g=!1,b=!1,w=!1,_=!1;const A=()=>m;let E,x;const M=()=>{E&&(q._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),q._ignoreSubscribers=!1,E=void 0,x=void 0,y=void 0)},j=(z,J,he)=>{const ie=h(J);x||(y=m),m=Ec(J,he),E={href:ie,state:he,isPush:E?.isPush||z==="push"},x||(x=Promise.resolve().then(()=>M()))},U=z=>{m=p(),q.notify({type:z})},X=async()=>
10{if(b){b=!1;return}const z=p(),J=z.state[vs]-m.state[vs],he=J===1,ie=J===-1,we=!he&&!ie||g;g=!1;const xe=we?"GO":ie?"BACK":"FORWARD",Be=we?{type:"GO",index:J}:{type:ie?"BACK":"FORWARD"};if(w)w=!1;else{const Oe=c();if(typeof document<"u"&&Oe.length){for(const L of Oe)if(await L.blockerFn({currentLocation:m,nextLocation:z,action:xe})){b=!0,t.history.go(1),q.notify(Be);return}}}m=p(),q.notify(Be)},V=z=>{if(_){_=!1;return}let J=!1;const he=c();if(typeof document<"u"&&he.length)for(const ie of he){const we=ie.enableBeforeUnload??!0;if(we===!0){J=!0;break}if(typeof we=="function"&&we()===!0){J=!0;break}}if(J)return z.preventDefault(),z.returnValue=""},q=J1({getLocation:A,getLength:()=>t.history.length,pushState:(z,J)=>j("push",z,J),replaceState:(z,J)=>j("replace",z,J),back:z=>(z&&(w=!0),_=!0,t.history.back()),forward:z=>{z&&(w=!0),_=!0,t.history.forward()},go:z=>{g=!0,t.history.go(z)},createHref:z=>h(z),flush:M,destroy:()=>{t.history.pushState=r,t.history.replaceState=a,t.removeEventListener(Yy,V,{capture:!0}),t.removeEventListener(Ky,X)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Yy,V,{capture:!0}),t.addEventListener(Ky,X),t.history.pushState=function(...z){const J=r.apply(t.history,z);return q._ignoreSubscribers||U("PUSH"),J},t.history.replaceState=function(...z){const J=a.apply(t.history,z);return q._ignoreSubscribers||U("REPLACE"),J},q}function W1(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Ec(e,t){const r=W1(e),a=r.indexOf("#"),o=r.indexOf("?"),c=gf();return{href:r,pathname:r.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:r.length),hash:a>-1?r.substring(a):"",search:o>-1?r.slice(o,a===-1?void 0:a):"",state:t||{[vs]:0,key:c,__TSR_key:c}}}function gf(){return(Math.random()+1).toString(36).substring(7)}function Z1(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function ai(e,t){const r=t,a=e;return{fromLocation:r,toLocation:a,pathChanged:r?.pathname!==a.pathname,hrefChanged:r?.href!==a.href,hashChanged:r?.hash!==a.hash}}var eE=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const a=this.options,o=this.basepath??a?.basepath??"/",c=this.basepath===void 0,u=a?.rewrite;if(this.options={...a,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=O1(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=X1()),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=Eo(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=$1(nE(this.latestLocation),y),L1(this)}let h=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(c||o!==p||u!==m){this.basepath=p;const y=[],g=Cb(p);g&&g!=="/"&&y.push(q1({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:H1(y),this.history&&this.updateLatestLocation(),h=!0}h&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=S1(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&y1(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const o={eventType:r,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>
10{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const o=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const x=this.options.parseSearch(m),M=this.options.stringifySearch(x);return{href:p+M+y,publicHref:p+M+y,pathname:so(p).path,external:!1,searchStr:M,search:Gs(a?.search,x),hash:so(y.slice(1)).path,state:ps(a?.state,b)}}const w=new URL(g,this.origin),_=Bh(this.rewrite,w),A=this.options.parseSearch(_.search),E=this.options.stringifySearch(A);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:g,pathname:so(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:E,search:Gs(a?.search,A),hash:so(_.hash.slice(1)).path,state:ps(a?.state,b)}},c=o(r),{__tempLocation:u,__tempKey:h}=c.state;if(u&&(!h||h===this.tempLocationKey)){const p=o(u);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(r,a)=>C1({base:r,to:mf(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},o):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>rE({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const a=this.getMatch(r);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const a=this.stores.matchStores.get(r)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const a=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(u);c.from;const p=c.unsafeRelative==="path"?u.pathname:c.from??h.fullPath,m=this.resolvePathWithBase(p,"."),y=h.search,g=Object.assign(Object.create(null),h.params),b=c.to?this.resolvePathWithBase(m,`${c.to}`):this.resolvePathWithBase(m,"."),w=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?g:Object.assign(g,fs(c.params,g)),_=this.getMatchedRoutes(b);let A=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!=="/"&&_.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(w).length>0)for(const he of A){const ie=he.options.params?.stringify??he.options.stringifyParams;if(ie)try{Object.assign(w,ie(w))}catch{}}const E=r.leaveParams?b:so(Py({path:b,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=y;if(r._includeValidateSearch&&this.options.search?.strict){const he={};A.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(he,yc(ie.options.validateSearch,{...he,...x}))}catch{}}),x=he}x=sE({search:x,dest:c,destRoutes:A,_includeValidateSearch:r._includeValidateSearch}),x=Gs(y,x);const M=this.options.stringifySearch(x),j=c.hash===!0?u.hash:c.hash?fs(c.hash,u.hash):void 0,U=j?`#${j}`:"";let X=c.state===!0?u.state:c.state?fs(c.state,u.state):{};X=ps(u.state,X);const V=`${E}${M}${U}`;let q,z,J=!1;if(this.rewrite){const he=new URL(V,this.origin),ie=Mb(this.rewrite,he);q=he.href.replace(he.origin,""),ie.origin!==this.origin?(z=ie.href,J=!0):z=ie.pathname+ie.search+ie.hash}else q=p1(V),z=q;return{publicHref:z,href:q,pathname:E,search:x,searchStr:M,state:X,hash:j??"",external:J,unmaskOnReload:c.unmaskOnReload}},o=(c={},u)=>{const h=a(c);let p=u?a(u):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=v1(h.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,...w}=y.route,_=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,fs(b,m));u={from:r.from,...w,params:_},p=a(u)}}}return p&&(h.maskedLocation=p),h};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:a,...o})=>{const c=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{o.state[y]=this.latestLocation.state[y]});const m=an(o.state,this.latestLocation.state);return p.forEach(y=>{delete o.state[y]}),m},u=ys(this.latestLocation.href)===ys(o.href);let h=this.commitLocationPromise;if(this.commitLocationPromise=na(()=>{h?.resolve(),h=void 0}),u&&c())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...y}=o;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[o.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:a,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,href:h,...p}={})=>
10{if(h){const g=this.history.location.state.__TSR_index,b=Ec(h,{__TSR_index:r?g:g+1}),w=new URL(b.pathname,this.origin);p.to=Bh(this.rewrite,w).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:c,replace:r,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:a,href:o,publicHref:c,...u})=>{let h=!1;if(o)try{new URL(`${o}`),h=!0}catch{}if(h&&!a&&(a=!0),a){if(r!==void 0||!o){const m=this.buildLocation({to:r,...u});o=o??m.publicHref,c=c??m.publicHref}const p=!h&&c?c:o;if(_c(p,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!r.some(c=>c.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(a)})},this.load=async r=>{let a,o,c;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(c=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,y=ai(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await Vy({router:this,sync:r?.sync,forceStaleReload:u.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,b=null,w=null,_=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),E=A.length,x=this.stores.matches.get();g=E?x.filter(U=>!this.stores.pendingMatchStores.has(U.id)):null;const M=new Set;for(const U of this.stores.pendingMatchStores.values())U.routeId&&M.add(U.routeId);const j=new Set;for(const U of this.stores.matchStores.values())U.routeId&&j.add(U.routeId);b=E?x.filter(U=>!M.has(U.routeId)):null,w=E?A.filter(U=>!j.has(U.routeId)):null,_=E?A.filter(U=>j.has(U.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(U=>U.status!=="error"&&U.status!=="notFound"&&U.status!=="redirected")]),this.clearExpiredCache())});for(const[A,E]of[[b,"onLeave"],[w,"onEnter"],[_,"onStay"]])if(A)for(const x of A)this.looseRoutesById[x.routeId].options[E]?.(x)})})}})}catch(m){Gt(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Ct(m)&&(o=m);const y=a?a.status:o?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let h;this.hasNotFoundMatch()?h=404:this.stores.matches.get().some(p=>p.status==="error")&&(h=500),h!==void 0&&this.stores.statusCode.set(h)},this.startViewTransition=r=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),h=typeof a.types=="function"?a.types(ai(c,u)):a.types;if(h===!1){r();return}o={update:r,types:h}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>
10{const o=this.stores.pendingMatchStores.get(r);if(o){o.set(a);return}const c=this.stores.matchStores.get(r);if(c){c.set(a);return}const u=this.stores.cachedMatchStores.get(r);if(u){const h=a(u.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):u.set(h)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const a=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(o);r.options.href=c,r.headers.set("Location",c)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const c=o.pathname+o.search+o.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&_c(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const a=r?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),a=o=>{const c=this.looseRoutesById[o.routeId];if(!c.options.loader)return!0;const u=(o.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:r-o.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=xo,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),h=o.filter(p=>!u.has(p.id));if(h.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...h])}try{return o=await Vy({router:this,matches:o,location:a,preload:!0,updateMatch:(p,m)=>{c.has(p)?o=o.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),o}catch(p){if(Gt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});Ct(p)||console.error(p);return}},this.matchRoute=(r,a)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(o);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const u=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=b1(c.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!h||r.params&&!an(h.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?an(u.search,c.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??P1,parseSearch:e.parseSearch??z1,protocolAllowlist:e.protocolAllowlist??u1}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const r=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParam
10s:o,parsedParams:c}=r;let{matchedRoutes:u}=r,h=!1;(a?a.path!=="/"&&o["**"]:ys(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:h=!0);const p=h?iE(this.options.notFoundMode,u):void 0,m=new Array(u.length),y=new Map;for(const g of this.stores.matchStores.values())g.routeId&&y.set(g.routeId,g.get());for(let g=0;g<u.length;g++){const b=u[g],w=m[g-1];let _,A,E;{const xe=w?.search??e.search,Be=w?._strictSearch??void 0;try{const Oe=yc(b.options.validateSearch,{...xe})??void 0;_={...xe,...Oe},A={...Be,...Oe},E=void 0}catch(Oe){let L=Oe;if(Oe instanceof xc||(L=new xc(Oe.message,{cause:Oe})),t?.throwOnError)throw L;_=xe,A={},E=L}}const x=b.options.loaderDeps?.({search:_})??"",M=x?JSON.stringify(x):"",{interpolatedPath:j,usedParams:U}=Py({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),X=b.id+j+M,V=this.getMatch(X),q=y.get(b.id),z=V?._strictParams??U;let J;if(!V)try{Jy(b,U,c,z)}catch(xe){if(Ct(xe)||Gt(xe)?J=xe:J=new tE(xe.message,{cause:xe}),t?.throwOnError)throw J}Object.assign(o,z);const he=q?"stay":"enter";let ie;if(V)ie={...V,cause:he,params:q?.params??o,_strictParams:z,search:Gs(q?q.search:V.search,_),_strictSearch:A};else{const xe=b.options.loader||b.options.beforeLoad||b.lazyFn||zb(b)?"pending":"success";ie={id:X,ssr:b.options.ssr,index:g,routeId:b.id,params:q?.params??o,_strictParams:z,pathname:j,updatedAt:Date.now(),search:q?Gs(q.search,_):_,_strictSearch:A,searchError:void 0,status:xe,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:na()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:he,loaderDeps:q?ps(q.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(ie.globalNotFound=p===b.id),ie.searchError=E;const we=this.getParentContext(w);ie.context={...we,...ie.__routeContext,...ie.__beforeLoadContext},m[g]=ie}for(let g=0;g<m.length;g++){const b=m[g],w=this.looseRoutesById[b.routeId],_=this.getMatch(b.id),A=y.get(b.routeId);if(b.params=A?Gs(A.params,o):o,!_){const E=m[g-1],x=this.getParentContext(E);if(w.options.context){const M={deps:b.loaderDeps,params:b.params,context:x??{},location:e,navigate:j=>this.navigate({...j,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:w.id};b.__routeContext=w.options.context(M)??void 0}b.context={...x,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r,parsedParams:a}=this.getMatchedRoutes(e.pathname),o=_o(t),c={...e.search};for(const y of t)try{Object.assign(c,yc(y.options.validateSearch,c))}catch{}const u=_o(this.stores.matchesId.get()),h=u&&this.stores.matchStores.get(u)?.get(),p=h&&h.routeId===o.id&&h.pathname===e.pathname;let m;if(p)m=h.params;else{const y=Object.assign(Object.create(null),r);for(const g of t)try{Jy(g,r,a??{},y)}catch{}m=y}return{matchedRoutes:t,fullPath:o.fullPath,search:c,params:m}}},xc=class extends Error{},tE=class extends Error{};function nE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function yc(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new xc("Async validation not supported");if(r.issues)throw new xc(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function rE({pathname:e,routesById:t,processedTree:r}){const a=Object.create(null),o=ys(e);let c,u;const h=w1(o,r,!0);return h&&(c=h.route,Object.assign(a,h.rawParams),u=Object.assign(Object.create(null),h.parsedParams)),{matchedRoutes:h?.branch||[t.__root__],routeParams:a,foundRoute:c,parsedParams:u}}function sE({search:e,dest:t,destRoutes:r,_includeValidateSearch:a}){return aE(r)(e,t,a??!1)}function aE(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const c=({search:u,next:h})=>{let p=u;
10"preSearchFilters"in o.options&&o.options.preSearchFilters&&(p=o.options.preSearchFilters.reduce((y,g)=>g(y),u));const m=h(p);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,g)=>g(y),m):m};t.middlewares.push(c)}if(o.options.validateSearch){const c=({search:u,next:h})=>{const p=h(u);if(!t._includeValidateSearch)return p;try{return{...p,...yc(o.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(c)}}const r=({search:o})=>{const c=t.dest;return c.search?c.search===!0?o:fs(c.search,o):{}};t.middlewares.push(r);const a=(o,c,u)=>{if(o>=u.length)return c;const h=u[o];return h({search:c,next:m=>a(o+1,m,u)})};return function(c,u,h){return t.dest=u,t._includeValidateSearch=h,a(0,c,t.middlewares)}}function iE(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.children)return a.id}return ea}function Jy(e,t,r,a){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const c in t)c in r&&(a[c]=r[c]);else{const c=o(a);Object.assign(a,c)}}var tr=Symbol.for("TSR_DEFERRED_PROMISE");function oE(e,t){const r=e;return r[tr]||(r[tr]={status:"pending"},r.then(a=>{r[tr].status="success",r[tr].data=a}).catch(a=>{r[tr].status="error",r[tr].error={data:Z1(a),__isServerError:!0}})),r}var lE="Error preloading route! ☝️";function Xy(e,t){if(e)return typeof e=="string"?e:e[t]}function cE(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function uE(e){if(e.tag!=="link")return;const t=e.attrs?.rel,r=e.attrs?.href;if(typeof r=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return r}function dE(e,t){const r=uE(t);return!!r&&e?.inlineCss?.styles[r]!==void 0}var Pb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=ea:this.parentRoute||on();let o=a?ea:r?.path;o&&o!=="/"&&(o=Rb(o));const c=r?.id||o;let u=a?ea:mc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=mc(["/",u]));const h=u==="__root__"?"/":mc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=h,this._to=ys(h)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>jb({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},hE=class extends Pb{constructor(e){super(e)}};function fE(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(r)}}}var pE=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(pE||{}),jr=Symbol.asyncIterator,Bb=Symbol.hasInstance,ii=Symbol.isConcatSpreadable,Nr=Symbol.iterator,Ib=Symbol.match,Hb=Symbol.matchAll,qb=Symbol.replace,$b=Symbol.search,Fb=Symbol.species,Vb=Symbol.split,Gb=Symbol.toPrimitive,oi=Symbol.toStringTag,Kb=Symbol.unscopables,Yb={[jr]:0,[Bb]:1,[ii]:2,[Nr]:3,[Ib]:4,[Hb]:5,[qb]:6,[$b]:7,[Fb]:8,[Vb]:9,[Gb]:10,[oi]:11,[Kb]:12},mE={0:jr,1:Bb,2:ii,3:Nr,4:Ib,5:Hb,6:qb,7:$b,8:Fb,9:Vb,10:Gb,11:oi,12:Kb},R=void 0,gE={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},yE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},vE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function ze(e,t,r,a,o,c,u,h,p,m,y,g){return{t:e,i:t,s:r,c:a,m:o,p:c,e:u,a:h,f:p,b:m,o:y,l:g}}function bs(e){return ze(2,R,e,R,R,R,R,R,R,R,R,R)}var Qb=bs(2),Jb=bs(3),bE=bs(1),wE=bs(0),_E=bs(4),SE=bs(5),EE=bs(6),xE=bs(7);function TE(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return R}}function ws(e){let t="",r=0,a;for(let o=0,c=e.length;o<c;o++)a=TE(e[o]),a&&(t+=e.slice(r,o)+a,r=o+1);return r===0?t=e:t+=e.slice(r),t}function AE(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function _s(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,AE)}var tc="__SEROVAL_REFS__",Xb=new Map,ri=new Map;function Wb(e){return Xb.has(e)}function RE(e){return ri.has(e)}function CE(e){if(Wb(e))return Xb.get(e);throw new ax(e)}function OE(e){if(RE(e))return ri.get(e);throw new ix(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,tc,{value:ri,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,tc,{value:ri,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,tc,{value:ri,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,tc,{value:ri,configurable:!0,writable:!1,enumerable:!1});function yf(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function kE(e){let t=yE[yf(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Zb(e,t){let r=kE(e),a=Object.getOwnPropertyNames(e);for(let o=0,c=a.length,u;o<c;o++)u=a[o],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function e0(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}
12function jE(e){switch(e){case Number.POSITIVE_INFINITY:return SE;case Number.NEGATIVE_INFINITY:return EE}return e!==e?xE:Object.is(e,-0)?_E:ze(0,R,e,R,R,R,R,R,R,R,R,R)}function t0(e){return ze(1,R,ws(e),R,R,R,R,R,R,R,R,R)}function NE(e){return ze(3,R,""+e,R,R,R,R,R,R,R,R,R)}function ME(e){return ze(4,e,R,R,R,R,R,R,R,R,R,R)}function DE(e,t){let r=t.valueOf();return ze(5,e,r!==r?"":t.toISOString(),R,R,R,R,R,R,R,R,R)}function LE(e,t){return ze(6,e,R,ws(t.source),t.flags,R,R,R,R,R,R,R)}function UE(e,t){return ze(17,e,Yb[t],R,R,R,R,R,R,R,R,R)}function zE(e,t){return ze(18,e,ws(CE(t)),R,R,R,R,R,R,R,R,R)}function PE(e,t,r){return ze(25,e,r,ws(t),R,R,R,R,R,R,R,R)}function BE(e,t,r){return ze(9,e,R,R,R,R,R,r,R,R,e0(t),R)}function IE(e,t){return ze(21,e,R,R,R,R,R,R,t,R,R,R)}function HE(e,t,r){return ze(15,e,R,t.constructor.name,R,R,R,R,r,t.byteOffset,R,t.length)}function qE(e,t,r){return ze(16,e,R,t.constructor.name,R,R,R,R,r,t.byteOffset,R,t.byteLength)}function $E(e,t,r){return ze(20,e,R,R,R,R,R,R,r,t.byteOffset,R,t.byteLength)}function FE(e,t,r){return ze(13,e,yf(t),R,ws(t.message),r,R,R,R,R,R,R)}function VE(e,t,r){return ze(14,e,yf(t),R,ws(t.message),r,R,R,R,R,R,R)}function GE(e,t){return ze(7,e,R,R,R,R,R,t,R,R,R,R)}function KE(e,t){return ze(28,R,R,R,R,R,R,[e,t],R,R,R,R)}function YE(e,t){return ze(30,R,R,R,R,R,R,[e,t],R,R,R,R)}function QE(e,t,r){return ze(31,e,R,R,R,R,R,r,t,R,R,R)}function JE(e,t){return ze(32,e,R,R,R,R,R,R,t,R,R,R)}function XE(e,t){return ze(33,e,R,R,R,R,R,R,t,R,R,R)}function WE(e,t){return ze(34,e,R,R,R,R,R,R,t,R,R,R)}function ZE(e,t,r,a){return ze(35,e,r,R,R,R,R,t,R,R,R,a)}var ex={parsing:1,serialization:2,deserialization:3};function tx(e){return`Seroval Error (step: ${ex[e]})`}var nx=(e,t)=>tx(e),n0=class extends Error{constructor(e,t){super(nx(e)),this.cause=t}},Wy=class extends n0{constructor(e){super("parsing",e)}},rx=class extends n0{constructor(e){super("deserialization",e)}};function Mr(e){return`Seroval Error (specific: ${e})`}var Hc=class extends Error{constructor(t){super(Mr(1)),this.value=t}},r0=class extends Error{constructor(t){super(Mr(2))}},sx=class extends Error{constructor(e){super(Mr(3))}},zo=class extends Error{constructor(e){super(Mr(4))}},ax=class extends Error{constructor(e){super(Mr(5)),this.value=e}},ix=class extends Error{constructor(e){super(Mr(6))}},ox=class extends Error{constructor(e){super(Mr(7))}},Ss=class extends Error{constructor(e){super(Mr(8))}},lx=class extends Error{constructor(t){super(Mr(9))}},cx=class{constructor(e,t){this.value=e,this.replacement=t}},qc=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},ux=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},dx=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};qc.toString();ux.toString();dx.toString();var hx=()=>{let e=[],t=[],r=!0,a=!1,o=0,c=(p,m,y)=>{for(y=0;y<o;y++)t[y]&&t[y][m](p)},u=(p,m,y,g)=>{for(m=0,y=e.length;m<y;m++)g=e[m],!r&&m===y-1?p[a?"return":"throw"](g):p.next(g)},h=(p,m)=>(r&&(m=o++,t[m]=p),u(p),()=>{r&&(t[m]=t[o],t[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>h(p),next:p=>{r&&(e.push(p),c(p,"next"))},throw:p=>{r&&(e.push(p),c(p,"throw"),r=!1,a=!1,t.length=0)},return:p=>{r&&(e.push(p),c(p,"return"),r=!1,a=!0,t.length=0)}}},fx=e=>t=>()=>{let r=0,a={[e]:()=>a,next:()=>{if(r>t.d)return{done:!0,value:void 0};let o=r++,c=t.v[o];if(o===t.t)throw c;return{done:o===t.d,value:c}}};return a},px=(e,t)=>r=>()=>{let a=0,o=-1,c=!1,u=[],h=[],p=(y=0,g=h.length)=>{for(;y<g;y++)h[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=h.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw:y=>{let g=h.shift();g&&g.f(y),p(),o=u.length,c=!0,u.push(y)},return:y=>{let g=h.shift();g&&g.s({done:!0,value:y}),p(),o=u.length,u.push(y)}});let m={[e]:()=>m,next:()=>{if(o===-1){let b=a++;if(b>=u.length){let w=t();return h.push(w),w.p}return{done:!1,value:u[b]}}if(a>o)return{done:!0,value:void 0};let y=a++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},s0=e=>{let t=atob(e),r=t.length,a=new Uint8Array(r);for(let o=0;o<r;o++)a[o]=t.charCodeAt(o);return a.buffer};s0.toString();
12function mx(e){return"__SEROVAL_SEQUENCE__"in e}function a0(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function gx(e){let t=[],r=-1,a=-1,o=e[Nr]();for(;;)try{let c=o.next();if(t.push(c.value),c.done){a=t.length-1;break}}catch(c){r=t.length,t.push(c)}return a0(t,r,a)}var yx=fx(Nr);function vx(e){return yx(e)}var bx={},wx={},_x={0:{},1:{},2:{},3:{},4:{},5:{}};function $c(e){return"__SEROVAL_STREAM__"in e}function ra(){return hx()}function Sx(e){let t=ra(),r=e[jr]();async function a(){try{let o=await r.next();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var Ex=px(jr,qc);function xx(e){return Ex(e)}async function Tx(e){try{return[1,await e]}catch(t){return[0,t]}}function Ax(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function vc(e,t){e.marked.add(t)}function Rx(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function Fc(e,t){let r=e.refs.get(t);return r!=null?(vc(e,r),{type:1,value:ME(r)}):{type:0,value:Rx(e,t)}}function vf(e,t){let r=Fc(e,t);return r.type===1?r:Wb(t)?{type:2,value:zE(r.value,t)}:r}function Xs(e,t){let r=vf(e,t);if(r.type!==0)return r.value;if(t in Yb)return UE(r.value,t);throw new Hc(t)}function Vc(e,t){let r=Fc(e,_x[t]);return r.type===1?r.value:ze(26,r.value,t,R,R,R,R,R,R,R,R,R)}function Cx(e){let t=Fc(e,bx);return t.type===1?t.value:ze(27,t.value,R,R,R,R,R,R,Xs(e,Nr),R,R,R)}function Ox(e){let t=Fc(e,wx);return t.type===1?t.value:ze(29,t.value,R,R,R,R,R,[Vc(e,1),Xs(e,jr)],R,R,R,R)}function kx(e,t,r,a){return ze(r?11:10,e,R,R,R,a,R,R,R,R,e0(t),R)}function jx(e,t,r,a){return ze(8,t,R,R,R,R,{k:r,v:a},R,Vc(e,0),R,R,R)}function Nx(e,t,r){let a=new Uint8Array(r),o="";for(let c=0,u=a.length;c<u;c++)o+=String.fromCharCode(a[c]);return ze(19,t,ws(btoa(o)),R,R,R,R,R,Vc(e,5),R,R,R)}function Mx(e,t){return{base:Ax(e,t),child:void 0}}var Dx=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return wt(this._p,this.depth,e)}};async function Lx(e,t,r){let a=[];for(let o=0,c=r.length;o<c;o++)o in r?a[o]=await wt(e,t,r[o]):a[o]=0;return a}async function Ux(e,t,r,a){return BE(r,a,await Lx(e,t,a))}async function bf(e,t,r){let a=Object.entries(r),o=[],c=[];for(let u=0,h=a.length;u<h;u++)o.push(ws(a[u][0])),c.push(await wt(e,t,a[u][1]));return Nr in r&&(o.push(Xs(e.base,Nr)),c.push(KE(Cx(e.base),await wt(e,t,gx(r))))),jr in r&&(o.push(Xs(e.base,jr)),c.push(YE(Ox(e.base),await wt(e,t,Sx(r))))),oi in r&&(o.push(Xs(e.base,oi)),c.push(t0(r[oi]))),ii in r&&(o.push(Xs(e.base,ii)),c.push(r[ii]?Qb:Jb)),{k:o,v:c}}async function _h(e,t,r,a,o){return kx(r,a,o,await bf(e,t,a))}async function zx(e,t,r,a){return IE(r,await wt(e,t,a.valueOf()))}async function Px(e,t,r,a){return HE(r,a,await wt(e,t,a.buffer))}async function Bx(e,t,r,a){return qE(r,a,await wt(e,t,a.buffer))}async function Ix(e,t,r,a){return $E(r,a,await wt(e,t,a.buffer))}async function Zy(e,t,r,a){let o=Zb(a,e.base.features);return FE(r,a,o?await bf(e,t,o):R)}async function Hx(e,t,r,a){let o=Zb(a,e.base.features);return VE(r,a,o?await bf(e,t,o):R)}async function qx(e,t,r,a){let o=[],c=[];for(let[u,h]of a.entries())o.push(await wt(e,t,u)),c.push(await wt(e,t,h));return jx(e.base,r,o,c)}async function $x(e,t,r,a){let o=[];for(let c of a.keys())o.push(await wt(e,t,c));return GE(r,o)}async function i0(e,t,r,a){let o=e.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){let h=o[c];if(h.parse.async&&h.test(a))return PE(r,h.tag,await h.parse.async(a,new Dx(e,t),{id:r}))}return R}async function Fx(e,t,r,a){let[o,c]=await Tx(a);return ze(12,r,o,R,R,R,R,R,await wt(e,t,c),R,R,R)}function Vx(e,t,r,a,o){let c=[],u=r.on({next:h=>{vc(this.base,t),wt(this,e,h).then(p=>{c.push(JE(t,p))},p=>{o(p),u()})},throw:h=>{vc(this.base,t),wt(this,e,h).then(p=>{c.push(XE(t,p)),a(c),u()},p=>{o(p),u()})},return:h=>{vc(this.base,t),wt(this,e,h).then(p=>{c.push(WE(t,p)),a(c),u()},p=>{o(p),u()})}})}async function Gx(e,t,r,a){return QE(r,Vc(e.base,4),await new Promise(Vx.bind(e,t,r,a)))}async function Kx(e,t,r,a){let o=[];for(let c=0,u=a.v.length;c<u;c++)o[c]=await wt(e,t,a.v[c]);return ZE(r,o,a.t,a.d)}async function Yx(e,t,r,a){if(Array.isArray(a))return Ux(e,t,r,a);if($c(a))return Gx(e,t,r,a);if(mx(a))return Kx(e,t,r,a);let o=a.constructor;if(o===cx)return wt(e,t,a.replacement);let c=await i0(e,t,r,a);if(c)return c;switch(o){case Object:return _h(e,t,r,a,!1);case R:return _h(e,t,r,a,!0);case Date:return DE(r,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Zy(e,t,r,a);case Number:case Boolean:case String:case BigInt:return zx(e,t,r,a);case ArrayBuffer:return Nx(e.base,r,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Px(e,t,r,a);case DataView:return Ix(e,t,r,a);case Map:return qx(e,t,r,a);case Set:return $x(e,t,r,a)}if(o===Promise||a instanceof Promise)return Fx(e,t,r,a);let u=e.base.features;if(u&32&&o===RegExp)return LE(r,a);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return Bx(e,t,r,a)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return Hx(e,t,r,a);if(a instanceof Error)return Zy(e,t,r,a);if(Nr in a||jr in a)return _h(e,t,r,a,!!o);throw new Hc(a)}async function Qx(e,t,r){let a=vf(e.base,r);if(a.type!==0)return a.value;let o=await i0(e,t,a.value,r);if(o)return o;throw new Hc(r)}
12async function wt(e,t,r){switch(typeof r){case"boolean":return r?Qb:Jb;case"undefined":return bE;case"string":return t0(r);case"number":return jE(r);case"bigint":return NE(r);case"object":{if(r){let a=vf(e.base,r);return a.type===0?await Yx(e,t+1,a.value,r):a.value}return wE}case"symbol":return Xs(e.base,r);case"function":return Qx(e,t,r);default:throw new Hc(r)}}async function Jx(e,t){try{return await wt(e,0,t)}catch(r){throw r instanceof Wy?r:new Wy(r)}}var Xx=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(Xx||{});function o0(e,t){for(let r=0,a=t.length;r<a;r++){let o=t[r];e.has(o)||(e.add(o),o.extends&&o0(e,o.extends))}}function l0(e){if(e){let t=new Set;return o0(t,e),[...t]}}function Wx(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new ox(e)}}var Zx=1e6,eT=1e4,tT=2e4;function c0(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var nT=1e3;function rT(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||nT}}function sT(e){return{mode:2,base:rT(2,e),child:R}}var aT=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ke(this._p,this.depth,e)}};function u0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Ss({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function iT(e,t,r){return u0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function oT(e,t,r){return u0(e.base,t),e.base.refs.set(t,r),r}function _t(e,t,r){return e.mode===1?iT(e,t,r):oT(e,t,r)}function Hh(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new Ss(e)}function lT(e,t){return _t(e,t.i,OE(_s(t.s)))}function cT(e,t,r){let a=r.a,o=a.length,c=_t(e,r.i,new Array(o));for(let u=0,h;u<o;u++)h=a[u],h&&(c[u]=Ke(e,t,h));return c0(c,r.o),c}function uT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function dT(e){switch(e){case jr:case ii:case oi:case Nr:return!0;default:return!1}}function ev(e,t,r){uT(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function hT(e,t,r,a,o){if(typeof a=="string")ev(r,_s(a),Ke(e,t,o));else{let c=Ke(e,t,a);switch(typeof c){case"string":ev(r,c,Ke(e,t,o));break;case"symbol":dT(c)&&(r[c]=Ke(e,t,o));break;default:throw new Ss(a)}}}function d0(e,t,r,a){let o=r.k;if(o.length>0)for(let c=0,u=r.v,h=o.length;c<h;c++)hT(e,t,a,o[c],u[c]);return a}function fT(e,t,r){let a=_t(e,r.i,r.t===10?{}:Object.create(null));return d0(e,t,r.p,a),c0(a,r.o),a}function pT(e,t){return _t(e,t.i,new Date(t.s))}function mT(e,t){if(e.base.features&32){let r=_s(t.c);if(r.length>tT)throw new Ss(t);return _t(e,t.i,new RegExp(r,t.m))}throw new r0(t)}function gT(e,t,r){let a=_t(e,r.i,new Set);for(let o=0,c=r.a,u=c.length;o<u;o++)a.add(Ke(e,t,c[o]));return a}function yT(e,t,r){let a=_t(e,r.i,new Map);for(let o=0,c=r.e.k,u=r.e.v,h=c.length;o<h;o++)a.set(Ke(e,t,c[o]),Ke(e,t,u[o]));return a}function vT(e,t){if(t.s.length>Zx)throw new Ss(t);return _t(e,t.i,s0(_s(t.s)))}function bT(e,t,r){var a;let o=Wx(r.c),c=Ke(e,t,r.f),u=(a=r.b)!=null?a:0;if(u<0||u>c.byteLength)throw new Ss(r);return _t(e,r.i,new o(c,u,r.l))}function wT(e,t,r){var a;let o=Ke(e,t,r.f),c=(a=r.b)!=null?a:0;if(c<0||c>o.byteLength)throw new Ss(r);return _t(e,r.i,new DataView(o,c,r.l))}function h0(e,t,r,a){if(r.p){let o=d0(e,t,r.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function _T(e,t,r){let a=_t(e,r.i,new AggregateError([],_s(r.m)));return h0(e,t,r,a)}function ST(e,t,r){let a=Hh(r,vE,r.s),o=_t(e,r.i,new a(_s(r.m)));return h0(e,t,r,o)}function ET(e,t,r){let a=qc(),o=_t(e,r.i,a.p),c=Ke(e,t,r.f);return r.s?a.s(c):a.f(c),o}function xT(e,t,r){return _t(e,r.i,Object(Ke(e,t,r.f)))}function TT(e,t,r){let a=e.base.plugins;if(a){let o=_s(r.c);for(let c=0,u=a.length;c<u;c++){let h=a[c];if(h.tag===o)return _t(e,r.i,h.deserialize(r.s,new aT(e,t),{id:r.i}))}}throw new sx(r.c)}function AT(e,t){return _t(e,t.i,_t(e,t.s,qc()).p)}function RT(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.s(Ke(e,t,r.a[1])),R;throw new zo("Promise")}function CT(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.f(Ke(e,t,r.a[1])),R;throw new zo("Promise")}function OT(e,t,r){Ke(e,t,r.a[0]);let a=Ke(e,t,r.a[1]);return vx(a)}function kT(e,t,r){Ke(e,t,r.a[0]);let a=Ke(e,t,r.a[1]);return xx(a)}function jT(e,t,r){let a=_t(e,r.i,ra()),o=r.a,c=o.length;if(c)for(let u=0;u<c;u++)Ke(e,t,o[u]);return a}function NT(e,t,r){let a=e.base.refs.get(r.i);if(a&&$c(a))return a.next(Ke(e,t,r.f)),R;throw new zo("Stream")}function MT(e,t,r){let a=e.base.refs.get(r.i);if(a&&$c(a))return a.throw(Ke(e,t,r.f)),R;throw new zo("Stream")}function DT(e,t,r){let a=e.base.refs.get(r.i);if(a&&$c(a))return a.return(Ke(e,t,r.f)),R;throw new zo("Stream")}function LT(e,t,r){return Ke(e,t,r.f),R}function UT(e,t,r){return Ke(e,t,r.a[1]),R}function zT(e,t,r){let a=_t(e,r.i,a0([],r.s,r.l));for(let o=0,c=r.a.length;o<c;o++)a.v[o]=Ke(e,t,r.a[o]);return a}function Ke(e,t,r){if(t>e.base.depthLimit)throw new lx(e.base.depthLimit);switch(t+=1,r.t){case 2:return Hh(r,gE,r.s);case 0:return Number(r.s);case 1:return _s(String(r.s));case 3:if(String(r.s).length>eT)throw new Ss(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return lT(e,r);case 9:return cT(e,t,r);case 10:case 11:return fT(e,t,r);case 5:return pT(e,r);case 6:return mT(e,r);case 7:return gT(e,t,r);case 8:return yT(e,t,r);case 19:return vT(e,r);case 16:case 15:return bT(e,t,r);case 20:return wT(e,t,r);case 14:return _T(e,t,r);case 13:return ST(e,t,r);case 12:return ET(e,t,r);case 17:return Hh(r,mE,r.s);case 21:return xT(e,t,r);case 25:return TT(e,t,r);case 22:return AT(e,r);case 23:return RT(e,t,r);case 24:return CT(e,t,r);
12case 28:return OT(e,t,r);case 30:return kT(e,t,r);case 31:return jT(e,t,r);case 32:return NT(e,t,r);case 33:return MT(e,t,r);case 34:return DT(e,t,r);case 27:return LT(e,t,r);case 29:return UT(e,t,r);case 35:return zT(e,t,r);default:throw new r0(r)}}function PT(e,t){try{return Ke(e,0,t)}catch(r){throw new rx(r)}}var BT=()=>T;BT.toString();function tv(e,t){let r=l0(t.plugins),a=sT({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return PT(a,e)}async function IT(e,t={}){let r=l0(t.plugins),a=Mx(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await Jx(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function HT(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,a){return{v:r.parse(e.toSerializable(t))}},async async(t,r,a){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,a){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,a){return e.fromSerializable(r.deserialize(t.v))}}}var qT=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Tc=globalThis.Buffer,f0=!!Tc&&typeof Tc.from=="function";function p0(e){if(e.length===0)return"";if(f0)return Tc.from(e).toString("base64");const t=32768,r=[];for(let a=0;a<e.length;a+=t){const o=e.subarray(a,a+t);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function m0(e){if(e.length===0)return new Uint8Array(0);if(f0){const a=Tc.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return r}var oo=Object.create(null),lo=Object.create(null),$T=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(m0(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),FT=new TextEncoder,VT=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(FT.encode(r)):t.enqueue(m0(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),GT="(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(_){}}})}}))",KT="(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 nv(e){const t=ra(),r=e.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await r.read();if(a){t.return(void 0);break}t.next(p0(o))}}catch(a){t.throw(a)}finally{r.releaseLock()}})(),t}function rv(e){const t=ra(),r=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:c}=await r.read();if(o){try{const u=a.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=a.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:p0(c)})}}}catch(o){t.throw(o)}finally{r.releaseLock()}})(),t}var YT={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===oo},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return GT},deserialize(e,t,r){return oo}},{tag:"tss/RawStreamFactoryText",test(e){return e===lo},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return KT},deserialize(e,t,r){return lo}}],test(e){return e instanceof qT},parse:{sync(e,t,r){const a=e.hint==="text"?lo:oo;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(ra())}},async async(e,t,r){const a=e.hint==="text"?lo:oo,o=e.hint==="text"?rv(e.stream):nv(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(o)}},stream(e,t,r){const a=e.hint==="text"?lo:oo,o=e.hint==="text"?rv(e.stream):nv(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(o)}}},serialize(e,t,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?VT(a):$T(a)}};function QT(e){return{tag:"tss/RawStream",test:()=>!1,parse:{}
12,serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,a){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}var JT={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},us={},g0=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),XT={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===us},parse:{sync(){return us},async async(){return await Promise.resolve(us)},stream(){return us}},serialize(){return g0.toString()},deserialize(){return us}};function sv(e){let t=ra(),r=e.getReader();async function a(){try{let o=await r.read();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var WT={tag:"seroval/plugins/web/ReadableStream",extends:[XT],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(us),stream:t.parse(ra())}},async async(e,t){return{factory:await t.parse(us),stream:await t.parse(sv(e))}},stream(e,t){return{factory:t.parse(us),stream:t.parse(sv(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return g0(r)}},ZT=WT,eA=[JT,YT,ZT];function tA(){return[...hf()?.serializationAdapters?.map(HT)??[],...eA]}var av=new TextDecoder,nA=new Uint8Array(0),iv=16*1024*1024,ov=32*1024*1024,lv=1024,cv=1e5;function rA(e){const t=new Map,r=new Map,a=new Set;let o=!1,c=null,u=0,h;const p=new ReadableStream({start(g){h=g},cancel(){o=!0;try{c?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),a.clear()}});function m(g){const b=r.get(g);if(b)return b;if(a.has(g))return new ReadableStream({start(_){_.close()}});if(r.size>=lv)throw new Error(`Too many raw streams in framed response (max ${lv})`);const w=new ReadableStream({start(_){t.set(g,_)},cancel(){a.add(g),t.delete(g),r.delete(g)}});return r.set(g,w),w}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();c=g;const b=[];let w=0;function _(){if(w<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const x=new Uint8Array(9);let M=0,j=9;for(let U=0;U<b.length&&j>0;U++){const X=b[U],V=Math.min(X.length,j);x.set(X.subarray(0,V),M),M+=V,j-=V}return{type:x[0],streamId:(x[1]<<24|x[2]<<16|x[3]<<8|x[4])>>>0,length:(x[5]<<24|x[6]<<16|x[7]<<8|x[8])>>>0}}function A(E){if(E===0)return nA;const x=new Uint8Array(E);let M=0,j=E;for(;j>0&&b.length>0;){const U=b[0];if(!U)break;const X=Math.min(U.length,j);x.set(U.subarray(0,X),M),M+=X,j-=X,X===U.length?b.shift():b[0]=U.subarray(X)}return w-=E,x}try{for(;;){const{done:E,value:x}=await g.read();if(o||E)break;if(x){if(w+x.length>ov)throw new Error(`Framed response buffer exceeded ${ov} bytes`);for(b.push(x),w+=x.length;;){const M=_();if(!M)break;const{type:j,streamId:U,length:X}=M;if(j!==Tr.JSON&&j!==Tr.CHUNK&&j!==Tr.END&&j!==Tr.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===Tr.JSON){if(U!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(U===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(X>iv)throw new Error(`Frame payload too large: ${X} bytes (max ${iv})`);const V=9+X;if(w<V)break;if(++u>cv)throw new Error(`Too many frames in framed response (max ${cv})`);A(9);const q=A(X);switch(j){case Tr.JSON:try{h.enqueue(av.decode(q))}catch{}break;case Tr.CHUNK:{const z=y(U);z&&z.enqueue(q);break}case Tr.END:{const z=y(U);if(a.add(U),z){try{z.close()}catch{}t.delete(U)}break}case Tr.ERROR:{const z=y(U);if(a.add(U),z){const J=av.decode(q);z.error(new Error(J)),t.delete(U)}break}}}}}if(w!==0)throw new Error("Incomplete frame at end of framed response");try{h.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{h.error(E)}catch{}t.forEach(x=>{try{x.error(E)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:m,jsonChunks:p}}var To=null;async function qh(e){e.length>0&&await Promise.allSettled(e)}var sA=Object.prototype.hasOwnProperty;function y0(e){for(const t in e)if(sA.call(e,t))return!0;return!1}async function aA(e,t,r){To||(To=tA());const a=t[0],o=a.fetch??r,c=a.data instanceof FormData?"formData":"payload",u=a.headers?new Headers(a.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${t1}, application/x-ndjson, application/json`),a.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const p=await v0(a);if(p!==void 0){const m=kb({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let h;
12if(a.method==="POST"){const p=await iA(a);p?.contentType&&u.set("content-type",p.contentType),h=p?.body}return await oA(async()=>o(e,{method:a.method,headers:u,signal:a.signal,body:h}))}async function v0(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&y0(e.context)&&(t=!0,r.context=e.context),t)return b0(r)}async function b0(e){return JSON.stringify(await Promise.resolve(IT(e,{plugins:To})))}async function iA(e){if(e.data instanceof FormData){let r;return e.context&&y0(e.context)&&(r=await b0(e.context)),r!==void 0&&e.data.set(e1,r),{body:e.data}}const t=await v0(e);if(t)return{body:t,contentType:"application/json"}}async function oA(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const r=t.headers.get("content-type");if(r||on(),t.headers.get("x-tss-serialized")){let a;if(r.includes("application/x-tss-framed")){if(s1(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:c}=rA(t.body),u=[QT(o),...To||[]],h=new Map;a=await lA({jsonStream:c,onMessage:p=>tv(p,{refs:h,plugins:u}),onError(p,m){console.error(p,m)}})}else if(r.includes("application/json")){const o=await t.json(),c=[];a=tv(o,{plugins:To}),await qh(c)}if(a||on(),a instanceof Error)throw a;return a}if(r.includes("application/json")){const a=await t.json(),o=Nb(a);if(o)throw o;if(Ct(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function lA({jsonStream:e,onMessage:t,onError:r}){const a=e.getReader(),{value:o,done:c}=await a.read();if(c||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let h=!1;const p=(async()=>{try{for(;;){const{value:g,done:b}=await a.read();if(b)break;
12if(g)try{const w=[];try{t(JSON.parse(g))}finally{}await qh(w)}catch(w){r?.(`Invalid JSON: ${g}`,w)}}}catch(g){h||r?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw h=!0,a.cancel().catch(()=>{}),g}return await qh(y),Promise.resolve(m).catch(()=>{h=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),m}function wf(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const c=hf()?.serverFns?.fetch;return aA(t,o,c??fetch)},{url:t,serverFnMeta:{id:e},[Ph]:!0})}var cA={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Ph in e)?!1:!!e[Ph],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>wf(e)};function w0(e){if(Array.isArray(e))return e.flatMap(y=>w0(y));if(typeof e!="string")return[];const t=[];let r=0,a,o,c,u,h;const p=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},m=()=>(o=e.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<e.length;){for(a=r,h=!1;p();)if(o=e.charAt(r),o===","){for(c=r,r+=1,p(),u=r;r<e.length&&m();)r+=1;r<e.length&&e.charAt(r)==="="?(h=!0,r=u,t.push(e.slice(a,c)),a=r):r=c+1}else r+=1;(!h||r>=e.length)&&t.push(e.slice(a))}return t}function uA(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function dA(...e){return e.reduce((t,r)=>{const a=uA(r);if(!a)return t;for(const[o,c]of a.entries())o==="set-cookie"?w0(c).forEach(u=>t.append("set-cookie",u)):t.set(o,c);return t},new Headers)}function uv(e){return e.replaceAll("\0","/").replaceAll("�","/")}function hA(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function fA(e){window.$_TSR||on();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(x=>{E.set(x.key,x.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(x=>x())}window.$_TSR.initialized=!0,window.$_TSR.router||on();const r=window.$_TSR.router;r.matches.forEach(E=>{E.i=uv(E.i)}),r.lastMatchId&&(r.lastMatchId=uv(r.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:c}=r;e.ssr={manifest:a};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const h=e.matchRoutes(e.stores.location.get()),p=Promise.all(h.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function m(E){const x=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(x){const M=na();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),e.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},x)}}function y(E){const x=e.looseRoutesById[E.routeId];x&&(x.options.ssr=E.ssr)}let g;h.forEach(E=>{const x=r.matches.find(M=>M.i===E.id);if(!x){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}hA(E,x),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&g===void 0&&(g=E.index,m(E))}),e.stores.setMatches(h),await e.options.hydrate?.(o);const b=e.stores.matches.get(),w=e.stores.location.get();await Promise.all(b.map(async E=>{try{const x=e.looseRoutesById[E.routeId],M=b[E.index-1]?.context??e.options.context;if(x.options.context){const V={deps:E.loaderDeps,params:E.params,context:M??{},location:w,navigate:q=>e.navigate({...q,_fromLocation:w}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:h,routeId:x.id};E.__routeContext=x.options.context(V)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},U=await x.options.head?.(j),X=await x.options.scripts?.(j);E.meta=U?.meta,E.links=U?.links,E.headScripts=U?.scripts,E.styles=U?.styles,E.scripts=X}catch(x){if(Ct(x))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,x);else throw E.error=x,console.error(`Error during hydration for route ${E.routeId}:`,x),x}}));const _=h[h.length-1].id!==c;if(!h.some(E=>E.ssr===!1)&&!_)return h.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const A=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(_){const E=h[1];E||on(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=A,A.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,x=>({...x,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Ac=re.use,fo=typeof window<"u"?re.useLayoutEffect:re.useEffect;function Sh(e){const t=re.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function pA(e,t,r={},a={}){re.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([c])=>{t(c)},r);return o.observe(e.current),()=>{o.disconnect()}},[t,r,a.disabled,e])}function mA(e){const t=re.useRef(null);return re.useImperativeHandle(e,()=>t.current,[]),t}function gA({promise:e}){if(Ac)return Ac(e);const t=oE(e);if(t[tr].status==="pending")throw t;if(t[tr].status==="error")throw t[tr].error;return t[tr].data}function yA(e){const t=N.jsx(vA,{...e});
12return e.fallback?N.jsx(re.Suspense,{fallback:e.fallback,children:t}):t}function vA(e){const t=gA(e);return e.children(t)}function _f(e){const t=e.errorComponent??Sf;return N.jsx(bA,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:a})=>r?re.createElement(t,{error:r,reset:a}):e.children})}var bA=class extends re.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const r=e.getResetKey();return t.error&&t.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Sf({error:e}){const[t,r]=re.useState(!1);return N.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[N.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),N.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:t?"Hide Error":"Show Error"})]}),N.jsx("div",{style:{height:".25rem"}}),t?N.jsx("div",{children:N.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?N.jsx("code",{children:e.message}):null})}):null]})}function wA({children:e,fallback:t=null}){return Ef()?N.jsx(te.Fragment,{children:e}):N.jsx(te.Fragment,{children:t})}function Ef(){return te.useSyncExternalStore(_A,()=>!0,()=>!1)}function _A(){return()=>{}}var _0=re.createContext(null);function kt(e){return re.useContext(_0)}var Gc=re.createContext(void 0),SA=re.createContext(void 0),Ze=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ze||{});function EA({update:e,notify:t,unwatched:r}){return{link:a,unlink:o,propagate:c,checkDirty:u,shallowPropagate:h};function a(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const w=b!==void 0?b.nextDep:y.deps;if(w!==void 0&&w.dep===m){w.version=g,y.depsTail=w;return}const _=m.subsTail;if(_!==void 0&&_.version===g&&_.sub===y)return;const A=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:w,prevSub:_,nextSub:void 0};w!==void 0&&(w.prevDep=A),b!==void 0?b.nextDep=A:y.deps=A,_!==void 0?_.nextSub=A:m.subs=A}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,w=m.nextDep,_=m.nextSub,A=m.prevSub;return w!==void 0?w.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=w:y.deps=w,_!==void 0?_.prevSub=A:g.subsTail=A,A!==void 0?A.nextSub=_:(g.subs=_)===void 0&&r(g),w}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let w=b.flags;if(w&60?w&12?w&4?!(w&48)&&p(m,b)?(b.flags=w|40,w&=1):w=0:b.flags=w&-9|32:w=0:b.flags=w|32,w&2&&t(b),w&1){const _=b.subs;if(_!==void 0){const A=(m=_).nextSub;A!==void 0&&(g={value:y,prev:g},y=A);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,b=0,w=!1;e:do{const _=m.dep,A=_.flags;if(y.flags&16)w=!0;else if((A&17)===17){if(e(_)){const E=_.subs;E.nextSub!==void 0&&h(E),w=!0}}else if((A&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=_.deps,y=_,++b;continue}if(!w){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;b--;){const E=y.subs,x=E.nextSub!==void 0;if(x?(m=g.value,g=g.prev):m=E,w){if(e(y)){x&&h(E),y=m.sub;continue}w=!1}else y.flags&=-33;y=m.sub;const M=m.nextDep;if(M!==void 0){m=M;continue e}}return w}while(!0)}function h(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&t(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function xA(e,t,r){const a=typeof e=="object",o=a?e:void 0;return{next:(a?e.next:e)?.bind(o),error:(a?e.error:t)?.bind(o),c
12omplete:(a?e.complete:r)?.bind(o)}}const $h=[];let bc=0;const{link:dv,unlink:TA,propagate:AA,checkDirty:S0,shallowPropagate:hv}=EA({update(e){return e._update()},notify(e){$h[Fh++]=e,e.flags&=~Ze.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ze.Mutable|Ze.Dirty,Rc(e))}});let nc=0,Fh=0,Zn,Vh=0;function E0(e){try{++Vh,e()}finally{--Vh||x0()}}function Rc(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=TA(r,e)}function x0(){if(!(Vh>0)){for(;nc<Fh;){const e=$h[nc];$h[nc++]=void 0,e.notify()}nc=0,Fh=0}}function fv(e,t){const r=typeof e=="function",a=e,o={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Ze.None:Ze.Mutable,get(){return Zn!==void 0&&dv(o,Zn,bc),o._snapshot},subscribe(c){const u=xA(c),h={current:!1},p=RA(()=>{o.get(),h.current?u.next?.(o._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=Zn,h=t?.compare??Object.is;if(r)Zn=o,++bc,o.depsTail=void 0;else if(c===void 0)return!1;r&&(o.flags=Ze.Mutable|Ze.RecursedCheck);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&r?a(p):c;return p===void 0||!h(p,m)?(o._snapshot=m,!0):!1}finally{Zn=u,r&&(o.flags&=~Ze.RecursedCheck),Rc(o)}}};return r?(o.flags=Ze.Mutable|Ze.Dirty,o.get=function(){const c=o.flags;if(c&Ze.Dirty||c&Ze.Pending&&S0(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&hv(u)}}else c&Ze.Pending&&(o.flags=c&~Ze.Pending);return Zn!==void 0&&dv(o,Zn,bc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(AA(u),hv(u),x0())}},o}function RA(e){const t=()=>{const a=Zn;Zn=r,++bc,r.depsTail=void 0,r.flags=Ze.Watching|Ze.RecursedCheck;try{return e()}finally{Zn=a,r.flags&=~Ze.RecursedCheck,Rc(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ze.Watching|Ze.RecursedCheck,notify(){const a=this.flags;a&Ze.Dirty||a&Ze.Pending&&S0(this.deps,this)?t():this.flags=Ze.Watching},stop(){this.flags=Ze.None,this.depsTail=void 0,Rc(this)}};return t(),r}var Eh={exports:{}},xh={},Th={exports:{}},Ah={};var pv;function CA(){if(pv)return Ah;pv=1;var e=Uo();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function h(g,b){var w=b(),_=a({inst:{value:w,getSnapshot:b}}),A=_[0].inst,E=_[1];return c(function(){A.value=w,A.getSnapshot=b,p(A)&&E({inst:A})},[g,w,b]),o(function(){return p(A)&&E({inst:A}),g(function(){p(A)&&E({inst:A})})},[g]),u(w),w}function p(g){var b=g.getSnapshot;g=g.value;try{var w=b();return!r(g,w)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Ah.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Ah}var mv;function OA(){return mv||(mv=1,Th.exports=CA()),Th.exports}var gv;function kA(){if(gv)return xh;gv=1;var e=Uo(),t=OA();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var a=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,h=e.useMemo,p=e.useDebugValue;return xh.useSyncExternalStoreWithSelector=function(m,y,g,b,w){var _=c(null);if(_.current===null){var A={hasValue:!1,value:null};_.current=A}else A=_.current;_=h(function(){function x(V){if(!M){if(M=!0,j=V,V=b(V),w!==void 0&&A.hasValue){var q=A.value;if(w(q,V))return U=q}return U=V}if(q=U,a(j,V))return q;var z=b(V);return w!==void 0&&w(q,z)?(j=V,q):(j=V,U=z)}var M=!1,j,U,X=g===void 0?null:g;return[function(){return x(y())},X===null?void 0:function(){return x(X())}]},[y,g,b,w]);var E=o(m,_[0],_[1]);return u(function(){A.hasValue=!0,A.value=E},[E]),p(E),E},xh}var yv;function jA(){return yv||(yv=1,Eh.exports=kA()),Eh.exports}var NA=jA();function MA(e,t){return e===t}function ot(e,t,r=MA){const a=re.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:h}=e.subscribe(u);return h},[e]),o=re.useCallback(()=>e?.get(),[e]);return NA.useSyncExternalStoreWithSelector(a,o,o,t,r)}var DA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function sa(e){const t=kt(),r=re.useContext(e.from?SA:Gc),a=e.from??r,o=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,c=re.useRef(void 0);return ot(o??DA,u=>{if((e.shouldThrow??!0)&&!u&&on(),u===void 0)return;const h=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=ps(c.current,h);return c.current=p,p}return h})}function T0(e){return sa({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function A0(e){const{select:t,...r}=e;return sa({...r,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function R0(e){return sa({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function C0(e){return sa({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function O0(e){const t=kt();return re.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function k0(e){return sa({...e,select:t=>e.select?e.select(t.context):t.context})}var j0=Eb();const LA=Sb(j0);function UA(e,t){const r=kt(),a=mA(t),{activeProps:o,inactiveProps:c,activeOptions:u,to:h,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:w,resetScroll:_,viewTransition:A,children:E,target:x,disabled:M,style:j,className:U,onClick:X,onBlur:V,onFocus:q,onMouseEnter:z,onMouseLeave:J,onTouchStart:he,ignoreBlocker:ie,params:we,search:xe,hash:Be,state:Oe,mask:L,reloadDocument:Q,unsafeRelative:ae,from:Te,_fromLocation:ee,...O}=e,F=Ef(),K=re.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Z=ot(r.stores.location,qe=>qe,(qe,tt)=>qe.href===tt.href),W=re.useMemo(()=>{const qe={_fromLocation:Z,...K};return r.buildLocation(qe)},[r,Z,K]),se=W.maskedLocation?W.maskedLocation.publicHref:W.publicHref,Se=W.maskedLocation?W.maskedLocation.external:W.external,be=re.useMemo(()=>qA(se,Se,r.history,M),[M,Se,se,r.history]),pe=re.useMemo(()=>
12{if(be?.external)return _c(be.href,r.protocolAllowlist)?void 0:be.href;if(!$A(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),_c(h,r.protocolAllowlist)?void 0:h}catch{}},[h,be,r.protocolAllowlist]),Nt=re.useMemo(()=>{if(pe)return!1;if(u?.exact){if(!R1(Z.pathname,W.pathname,r.basepath))return!1}else{const qe=Sc(Z.pathname,r.basepath),tt=Sc(W.pathname,r.basepath);if(!(qe.startsWith(tt)&&(qe.length===tt.length||qe[tt.length]==="/")))return!1}return(u?.includeSearch??!0)&&!an(Z.search,W.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?F&&Z.hash===W.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,Z,pe,F,W.hash,W.pathname,W.search,r.basepath]),mt=Nt?fs(o,{})??zA:Rh,lt=Nt?Rh:fs(c,{})??Rh,Dn=[U,mt.className,lt.className].filter(Boolean).join(" "),gt=(j||mt.style||lt.style)&&{...j,...mt.style,...lt.style},[xs,sr]=re.useState(!1),Fn=re.useRef(!1),bn=e.reloadDocument||pe?!1:p??r.options.defaultPreload,Mt=m??r.options.defaultPreloadDelay??0,ln=re.useCallback(()=>{r.preloadRoute({...K,_builtLocation:W}).catch(qe=>{console.warn(qe),console.warn(lE)})},[r,K,W]);pA(a,re.useCallback(qe=>{qe?.isIntersecting&&ln()},[ln]),HA,{disabled:!!M||bn!=="viewport"}),re.useEffect(()=>{Fn.current||!M&&bn==="render"&&(ln(),Fn.current=!0)},[M,ln,bn]);const Ts=qe=>{const tt=qe.currentTarget.getAttribute("target"),wn=x!==void 0?x:tt;if(!M&&!FA(qe)&&!qe.defaultPrevented&&(!wn||wn==="_self")&&qe.button===0){qe.preventDefault(),j0.flushSync(()=>{sr(!0)});const ar=r.subscribe("onResolved",()=>{ar(),sr(!1)});r.navigate({...K,replace:b,resetScroll:_,hashScrollIntoView:g,startTransition:w,viewTransition:A,ignoreBlocker:ie})}};if(pe)return{...O,ref:a,href:pe,...E&&{children:E},...x&&{target:x},...M&&{disabled:M},...j&&{style:j},...U&&{className:U},...X&&{onClick:X},...V&&{onBlur:V},...q&&{onFocus:q},...z&&{onMouseEnter:z},...J&&{onMouseLeave:J},...he&&{onTouchStart:he}};const St=qe=>{if(M||bn!=="intent")return;if(!Mt){ln();return}const tt=qe.currentTarget;if(co.has(tt))return;const wn=setTimeout(()=>{co.delete(tt),ln()},Mt);co.set(tt,wn)},Vn=qe=>{M||bn!=="intent"||ln()},Et=qe=>{if(M||!bn||!Mt)return;const tt=qe.currentTarget,wn=co.get(tt);wn&&(clearTimeout(wn),co.delete(tt))};return{...O,...mt,...lt,href:be?.href,ref:a,onClick:Ka([X,Ts]),onBlur:Ka([V,Et]),onFocus:Ka([q,St]),onMouseEnter:Ka([z,St]),onMouseLeave:Ka([J,Et]),onTouchStart:Ka([he,Vn]),disabled:!!M,target:x,...gt&&{style:gt},...Dn&&{className:Dn},...M&&PA,...Nt&&BA,...F&&xs&&IA}}var Rh={},zA={className:"active"},PA={role:"link","aria-disabled":!0},BA={"data-status":"active","aria-current":"page"},IA={"data-transitioning":"transitioning"},co=new WeakMap,HA={rootMargin:"100px"},Ka=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function qA(e,t,r,a){if(!a)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function $A(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Nn=re.forwardRef((e,t)=>{const{_asChild:r,...a}=e,{type:o,...c}=UA(a,t),u=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;if(!r){const{disabled:h,...p}=c;return re.createElement("a",p,u)}return re.createElement(r,c,u)});function FA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var VA=class extends Pb{constructor(t){super(t),this.useMatch=r=>sa({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>k0({...r,from:this.id}),this.useSearch=r=>C0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>R0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>A0({...r,from:this.id}),this.useLoaderData=r=>T0({...r,from:this.id}),this.useNavigate=()=>O0({from:this.fullPath}),this.Link=te.forwardRef((r,a)=>N.jsx(Nn,{ref:a,from:this.fullPath,...r}))}};function GA(e){return new VA(e)}function KA(){return e=>QA(e)}var YA=class extends hE{constructor(e){super(e),this.useMatch=t=>sa({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k0({...t,from:this.id}),this.useSearch=t=>C0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>R0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>A0({...t,from:this.id}),this.useLoaderData=t=>T0({...t,from:this.id}),this.useNavigate=()=>O0({from:this.fullPath}),this.Link=te.forwardRef((t,r)=>N.jsx(Nn,{ref:r,from:this.fullPath,...t}))}};function QA(e){return new YA(e)}function yn(e){return new JA(e,{silent:!0}).createRoute}var JA=class{constructor(e,t){this.path=e,this.createRoute=r=>{const a=GA(r);return a.isRoot=!1,a},this.silent=t?.silent}};function Ot(e,t){let r,a,o,c;const u=()=>(r||(r=e().then(p=>{r=void 0,a=p[t??"default"]}).catch(p=>{if(o=p,l1(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),c=!0)}})),r),h=function(m){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(Ac)Ac(u());else throw u();return re.createElement(a,m)};return h.preload=u,h}function XA(e){const t=kt(),r=`not-found-${ot(t.stores.location,a=>a.pathname)}-${ot(t.stores.status,a=>a)}`;return N.jsx(_f,{getResetKey:()=>r,onCatch:(a,o)=>
12{if(Ct(a))e.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(Ct(a))return e.fallback?.(a);throw a},children:e.children})}function WA(){return N.jsx("p",{children:"Not Found"})}function Za(e){return N.jsx(N.Fragment,{children:e.children})}function N0(e,t,r){return t.options.notFoundComponent?N.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?N.jsx(e.options.defaultNotFoundComponent,{...r}):N.jsx(WA,{})}function ZA(e){return null}function eR(){return ZA(kt()),null}var M0=re.memo(function({matchId:t}){const r=kt(),a=r.stores.matchStores.get(t);a||on();const o=ot(r.stores.loadedAt,u=>u),c=ot(a,u=>u);return N.jsx(tR,{router:r,matchId:t,resetKey:o,matchState:re.useMemo(()=>{const u=c.routeId,h=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:h}},[c._displayPending,c.routeId,c.ssr,r.routesById])})});function tR({router:e,matchId:t,resetKey:r,matchState:a}){const o=e.routesById[a.routeId],c=o.options.pendingComponent??e.options.defaultPendingComponent,u=c?N.jsx(c,{}):null,h=o.options.errorComponent??e.options.defaultErrorComponent,p=o.options.onCatch??e.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??c??(o.options.errorComponent?.preload||y))?re.Suspense:Za,b=h?_f:Za,w=m?XA:Za;return N.jsxs(o.isRoot?o.options.shellComponent??Za:Za,{children:[N.jsx(Gc.Provider,{value:t,children:N.jsx(g,{fallback:u,children:N.jsx(b,{getResetKey:()=>r,errorComponent:h||Sf,onCatch:(_,A)=>{if(Ct(_))throw _.routeId??=a.routeId,_;p?.(_,A)},children:N.jsx(w,{fallback:_=>{if(_.routeId??=a.routeId,!m||_.routeId&&_.routeId!==a.routeId||!_.routeId&&!o.isRoot)throw _;return re.createElement(m,_)},children:y||a._displayPending?N.jsx(wA,{fallback:u,children:N.jsx(vv,{matchId:t})}):N.jsx(vv,{matchId:t})})})})}),a.parentRouteId===ea?N.jsxs(N.Fragment,{children:[N.jsx(nR,{resetKey:r}),e.options.scrollRestoration&&xb?N.jsx(eR,{}):null]}):null]})}function nR({resetKey:e}){const t=kt(),r=re.useRef(void 0);return fo(()=>{const a=t.latestLocation.href;(r.current===void 0||r.current!==a)&&(t.emit({type:"onRendered",...ai(t.stores.location.get(),t.stores.resolvedLocation.get())}),r.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var vv=re.memo(function({matchId:t}){const r=kt(),a=(y,g)=>r.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],o=r.stores.matchStores.get(t);o||on();const c=ot(o,y=>y),u=c.routeId,h=r.routesById[u],p=re.useMemo(()=>{const y=(r.routesById[u].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});return y?JSON.stringify(y):void 0},[u,c.loaderDeps,c._strictParams,c._strictSearch,r.options.defaultRemountDeps,r.routesById]),m=re.useMemo(()=>{const y=h.options.component??r.options.defaultComponent;return y?N.jsx(y,{},p):N.jsx(D0,{})},[p,h.options.component,r.options.defaultComponent]);if(c._displayPending)throw a(c,"displayPendingPromise");if(c._forcePending)throw a(c,"minPendingPromise");if(c.status==="pending"){const y=h.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const g=r.getMatch(c.id);if(g&&!g._nonReactive.minPendingPromise){const b=na();g._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw a(c,"loadPromise")}if(c.status==="notFound")return Ct(c.error)||on(),N0(r,h,c.error);if(c.status==="redirected")throw Gt(c.error)||on(),a(c,"loadPromise");if(c.status==="error")throw c.error;return m}),D0=re.memo(function(){const t=kt(),r=re.useContext(Gc);let a,o=!1,c;{const m=r?t.stores.matchStores.get(r):void 0;[a,o]=ot(m,y=>[y?.routeId,y?.globalNotFound??!1]),c=ot(t.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const u=a?t.routesById[a]:void 0,h=t.options.defaultPendingComponent?N.jsx(t.options.defaultPendingComponent,{}):null;if(o)return u||on(),N0(t,u,void 0);if(!c)return null;const p=N.jsx(M0,{matchId:c});return a===ea?N.jsx(re.Suspense,{fallback:h,children:p}):p});function rR(){const e=kt(),t=re.useRef({router:e,mounted:!1}),[r,a]=re.useState(!1),o=ot(e.stores.isLoading,g=>g),c=ot(e.stores.hasPending,g=>g),u=Sh(o),h=o||r||c,p=Sh(h),m=o||c,y=Sh(m);return e.startTransition=g=>{a(!0),re.startTransition(()=>{g(),a(!1)})},re.useEffect(()=>{const g=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ys(e.latestLocation.publicHref)!==ys(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),fo(()=>
12{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),fo(()=>{u&&!o&&e.emit({type:"onLoad",...ai(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,o]),fo(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...ai(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),fo(()=>{if(p&&!h){const g=ai(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...g}),E0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),g.hrefChanged&&fE(e)}},[h,p,e]),null}function sR(){const e=kt(),t=e.routesById[ea].options.pendingComponent??e.options.defaultPendingComponent,r=t?N.jsx(t,{}):null,a=N.jsxs(typeof document<"u"&&e.ssr?Za:re.Suspense,{fallback:r,children:[N.jsx(rR,{}),N.jsx(aR,{})]});return e.options.InnerWrap?N.jsx(e.options.InnerWrap,{children:a}):a}function aR(){const e=kt(),t=ot(e.stores.firstId,o=>o),r=ot(e.stores.loadedAt,o=>o),a=t?N.jsx(M0,{matchId:t}):null;return N.jsx(Gc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:N.jsx(_f,{getResetKey:()=>r,errorComponent:Sf,onCatch:void 0,children:a})})}var iR=e=>({createMutableStore:fv,createReadonlyStore:fv,batch:E0}),oR=e=>new lR(e),lR=class extends eE{constructor(e){super(e,iR)}};function cR({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const a=N.jsx(_0.Provider,{value:e,children:t});return e.options.Wrap?N.jsx(e.options.Wrap,{children:a}):a}function uR({router:e,...t}){return N.jsx(cR,{router:e,...t,children:N.jsx(sR,{})})}function dR(e){const t=kt({warn:e?.router===void 0}),r=e?.router||t,a=re.useRef(void 0);return ot(r.stores.__store,o=>{if(e?.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const c=ps(a.current,e.
12select(o));return a.current=c,c}return e.select(o)}return o})}function L0(e){const{attrs:t,children:r,nonce:a}=e;switch(e.tag){case"title":return N.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return N.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return N.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,N.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:a});case"script":return N.jsx(hR,{attrs:t,children:r});default:return null}}function hR({attrs:e,children:t}){kt();const r=Ef(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(re.useEffect(()=>{if(!a){if(e?.src){const o=(()=>{try{const u=document.baseURI||window.location.href;return new URL(e.src,u).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===o))return;const c=document.createElement("script");for(const[u,h]of Object.entries(e))u!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&c.setAttribute(u,typeof h=="boolean"?"":String(h));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}if(typeof t=="string"){const o=typeof e?.type=="string"?e.type:"text/javascript",c=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(h=>{if(!(h instanceof HTMLScriptElement))return!1;const p=h.getAttribute("type")??"text/javascript",m=h.getAttribute("nonce")??void 0;return h.textContent===t&&p===o&&m===c}))return;const u=document.createElement("script");if(u.textContent=t,e)for(const[h,p]of Object.entries(e))h!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&u.setAttribute(h,typeof p=="boolean"?"":String(p));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[e,t,a]),a&&typeof t=="string")return N.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return N.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return N.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var fR=e=>{const t=kt(),r=t.options.ssr?.nonce,a=ot(t.stores.matches,m=>m.map(y=>y.meta).filter(Boolean),an),o=re.useMemo(()=>{const m=[],y={};let g;for(let b=a.length-1;b>=0;b--){const w=a[b];for(let _=w.length-1;_>=0;_--){const A=w[_];if(A)if(A.title)g||(g={tag:"title",children:A.title});else if("script:ld+json"in A)try{const E=JSON.stringify(A["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:f1(E)})}catch{}else{const E=A.name??A.property;if(E){if(y[E])continue;y[E]=!0}m.push({tag:"meta",attrs:{...A,nonce:r}})}}}return g&&m.push(g),r&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),m.reverse(),m},[a,r]),c=ot(t.stores.matches,m=>{const y=m.map(w=>w.links).filter(Boolean).flat(1).map(w=>({tag:"link",attrs:{...w,nonce:r}})),g=t.ssr?.manifest,b=m.map(w=>g?.routes[w.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(w=>w.tag==="link"?dE(g,w)?[]:[{tag:"link",attrs:{...w.attrs,crossOrigin:Xy(e,"stylesheet")??w.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:w.tag==="style"?[{tag:"style",attrs:{...w.attrs,nonce:r},children:w.children,...w.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},an),u=ot(t.stores.matches,m=>{const y=[];return m.map(g=>t.looseRoutesById[g.routeId]).forEach(g=>t.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(b=>{const w=cE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:w.href,crossOrigin:Xy(e,"modulepreload")??w.crossOrigin,nonce:r}})})),y},an),h=ot(t.stores.matches,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:r},children:y})),an),p=ot(t.stores.matches,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:r},children:y})),an);return pR([...o,...u,...c,...h,...p],m=>JSON.stringify(m))};function pR(e,t){const r=new Set;return e.filter(a=>{const o=t(a);return r.has(o)?!1:(r.add(o),!0)})}function mR(e){const t=fR(e.assetCrossOrigin),r=kt().options.ssr?.nonce;return N.jsx(N.Fragment,{children:t.map(a=>re.createElement(L0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:r}))})}var gR=()=>{const e=kt(),t=e.options.ssr?.nonce,r=c=>{const u=[],h=e.ssr?.manifest;return h?(c.map(p=>
12e.looseRoutesById[p.routeId]).forEach(p=>h.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{u.push({tag:"script",attrs:{...m.attrs,nonce:t},children:m.children})})),u):[]},a=c=>c.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:t},children:u})),o=ot(e.stores.matches,r,an);return yR(e,ot(e.stores.matches,a,an),o)};function yR(e,t,r){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const o=[...t,...r];return a&&o.unshift(a),N.jsx(N.Fragment,{children:o.map((c,u)=>re.createElement(L0,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}function bv(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Gh(e,t){const r=Object.create(null);if(e)for(const a of Object.keys(e))bv(a)&&(r[a]=e[a]);if(t&&typeof t=="object")for(const a of Object.keys(t))bv(a)&&(r[a]=t[a]);return r}function U0(e){return Object.create(null)}var z0=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},yo=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(c=>yo(void 0,{...r,...c}),{options:r,middleware:c=>{const u=[...r.middleware||[]];c.map(p=>{jy in p?p.options.middleware&&u.push(...p.options.middleware):u.push(p)});const h=yo(void 0,{...r,middleware:u});return h[jy]=!0,h},inputValidator:c=>yo(void 0,{...r,inputValidator:c}),handler:(...c)=>{const[u,h]=c,p={...r,extractedFn:u,serverFn:h},m=[...p.middleware||[],wR(p)];return u.method=r.method,Object.assign(async y=>{const g=await wv(m,"client",{...u,...p,data:y?.data,headers:y?.headers,signal:y?.signal,fetch:y?.fetch,context:U0()}),b=Nb(g.error);if(b)throw b;if(g.error)throw g.error;return g.result},{...u,method:r.method,__executeServer:async y=>{const g=z0(),b=g.contextAfterGlobalMiddlewares;return await wv(m,"server",{...u,...y,serverFnMeta:u.serverFnMeta,context:Gh(y.context,b),request:g.request}).then(w=>({result:w.result,error:w.error,context:w.sendContext}))}})}})};async function wv(e,t,r){let a=vR([...hf()?.functionMiddleware||[],...e]);if(t==="server"){const c=z0();c?.executedRequestMiddlewares&&(a=a.filter(u=>!c.executedRequestMiddlewares.has(u)))}const o=async c=>{const u=a.shift();if(!u)return c;try{"inputValidator"in u.options&&u.options.inputValidator&&t==="server"&&(c.data=await bR(u.options.inputValidator,c.data));let h;if(t==="client"?"client"in u.options&&(h=u.options.client):"server"in u.options&&(h=u.options.server),h){const m=await h({...c,next:async(y={})=>{const g=await o({...c,...y,context:Gh(c.context,y.context),sendContext:Gh(c.sendContext,y.sendContext),headers:dA(c.headers,y.headers),_callSiteFetch:c._callSiteFetch,fetch:c._callSiteFetch??y.fetch??c.fetch,result:y.result!==void 0?y.result:y instanceof Response?y:c.result,error:y.error??c.error});if(g.error)throw g.error;return g}});if(Gt(m))return{...c,error:m};if(m instanceof Response)return{...c,result:m};if(!m)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return m}return o(c)}catch(h){return{...c,error:h}}};return o({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||U0(),_callSiteFetch:r.fetch})}function vR(e,t=100){const r=new Set,a=[],o=(c,u)=>{if(u>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);
12c.forEach(h=>{h.options.middleware&&o(h.options.middleware,u+1),r.has(h)||(r.add(h),a.push(h))})};return o(e,0),a}async function bR(e,t){if(e==null)return{};if("~standard"in e){const r=await e["~standard"].validate(t);if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function wR(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:r,fetch:a,...o})=>{const c={...o,context:r,fetch:a};return t(await e.extractedFn?.(c))},server:async({next:t,...r})=>{const a=await e.serverFn?.(r);return t({...r,result:a})}}}}var Ws=(e,t)=>{const r={type:"request",...t||e};return{options:r,middleware:a=>Ws({},Object.assign(r,{middleware:a})),inputValidator:a=>Ws({},Object.assign(r,{inputValidator:a})),client:a=>Ws({},Object.assign(r,{client:a})),server:a=>Ws({},Object.assign(r,{server:a}))}};function P0(e,t){for(let r=0,a=t.length;r<a;r++){const o=t[r];e.has(o)||(e.add(o),o.extends&&P0(e,o.extends))}}var _R=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const r=new Set;P0(r,t.serializationAdapters),t.serializationAdapters=Array.from(r)}return t},createMiddleware:Ws});function Kc(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r}function SR(e,t,r,a){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function h(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(h,p)}m((a=a.apply(e,t||[])).next())})}const ER=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class xf extends Error{constructor(t,r="FunctionsError",a){super(t),this.name=r,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class xR extends xf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class _v extends xf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Sv extends xf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Kh;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Kh||(Kh={}));class TR{constructor(t,{headers:r={},customFetch:a,region:o=Kh.Any}={}){this.url=t,this.headers=r,this.region=o,this.fetch=ER(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return SR(this,arguments,void 0,function*(r,a={}){var o;let c,u;try{const{headers:h,method:p,body:m,signal:y,timeout:g}=a;let b={},{region:w}=a;w||(w=this.region);const _=new URL(`${this.url}/${r}`);w&&w!=="any"&&(b["x-region"]=w,_.searchParams.set("forceFunctionRegion",w));let A;m&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",A=m):typeof m=="string"?(b["Content-Type"]="text/plain",A=m):typeof FormData<"u"&&m instanceof FormData?A=m:(b["Content-Type"]="application/json",A=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?A=JSON.stringify(m):A=m;let E=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(E=u.signal,y.addEventListener("abort",()=>u.abort())):E=u.signal);const x=yield this.fetch(_.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),h),body:A,signal:E}).catch(X=>{throw new xR(X)}),M=x.headers.get("x-relay-error");
12if(M&&M==="true")throw new _v(x);if(!x.ok)throw new Sv(x);let j=((o=x.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),U;return j==="application/json"?U=yield x.json():j==="application/octet-stream"||j==="application/pdf"?U=yield x.blob():j==="text/event-stream"?U=x:j==="multipart/form-data"?U=yield x.formData():U=yield x.text(),{data:U,error:null,response:x}}catch(h){return{data:null,error:h,response:h instanceof Sv||h instanceof _v?h.context:void 0}}finally{c&&clearTimeout(c)}})}}const B0=3,Ev=e=>Math.min(1e3*2**e,3e4),AR=[520,503],I0=["GET","HEAD","OPTIONS"];var xv=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Tv(e,t){return new Promise(r=>{if(t?.aborted){r();return}const a=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e);function o(){clearTimeout(a),r()}t?.addEventListener("abort",o)})}function RR(e,t,r,a){return!(!a||r>=B0||!I0.includes(e)||!AR.includes(t))}var CR=class{constructor(e){var t,r,a,o,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=e.retry)!==null&&c!==void 0?c:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let c=(async()=>{let u=0;for(;;){const m=new Headers(r.headers);u>0&&m.set("X-Retry-Count",String(u));let y;try{y=await a(r.url.toString(),{method:r.method,headers:m,body:JSON.stringify(r.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:r.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!I0.includes(r.method))throw g;if(r.retryEnabled&&u<B0){const b=Ev(u);u++,await Tv(b,r.signal);continue}throw g}if(RR(r.method,y.status,u,r.retryEnabled)){var h,p;const g=(h=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&h!==void 0?h:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:Ev(u);await y.text(),u++,await Tv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var h;let p="",m="",y="";const g=u?.cause;if(g){var b,w,_,A;const M=(b=g?.message)!==null&&b!==void 0?b:"",j=(w=g?.code)!==null&&w!==void 0?w:"";p=`${(_=u?.name)!==null&&_!==void 0?_:"FetchError"}: ${u?.message}`,p+=`
13
14Caused by: ${(A=g?.name)!==null&&A!==void 0?A:"Error"}: ${M}`,j&&(p+=` (${j})`),g?.stack&&(p+=`
15${g.stack}`)}else{var E;p=(E=u?.stack)!==null&&E!==void 0?E:""}const x=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${x} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(m+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(h=u?.name)!==null&&h!==void 0?h:"FetchError"}: ${u?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
15)),c.then(e,t)}async processResponse(e){var t=this;let r=null,a=null,o=null,c=e.status,u=e.statusText;if(e.ok){var h,p;if(t.method!=="HEAD"){var m;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")a=b;else if(t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(r={message:b},a=null,t.shouldThrowOnError)throw new xv({message:b,details:"",hint:"",code:""})}}const y=(h=t.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),g=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>1&&(o=parseInt(g[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(r={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await e.text();try{r=JSON.parse(y),Array.isArray(r)&&e.status===404&&(a=[],r=null,c=200,u="OK")}catch{e.status===404&&y===""?(c=204,u="No Content"):r={message:y}}if(r&&t.shouldThrowOnError)throw new xv(r)}return{success:r===null,error:r,data:a,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},OR=class extends CR{select(e){let t=!1;const r=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:a,referencedTable:o=a}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:a=r}={}){const o=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(c,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:a=!1,wal:o=!1,format:c="text"}={}){var u;const h=[e?"analyze":null,t?"verbose":null,r?"settings":null,a?"buffers":null,o?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${h};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Av=new RegExp("[,()]");var ei=class extends OR{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(a=>
15typeof a=="string"&&Av.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(a=>typeof a=="string"&&Av.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const c=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${o}fts${c}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const a=r?`${r}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},kR=class{constructor(e,{headers:t={},schema:r,fetch:a,urlLengthLimit:o=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=a,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:a}=t??{},o=r?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:h,headers:p}=this.cloneRequestState();return h.searchParams.set("select",u),a&&p.append("Prefer",`count=${a}`),new ei({method:o,url:h,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var a;const o="POST",{url:c,headers:u}=this.cloneRequestState();
15if(t&&u.append("Prefer",`count=${t}`),r||u.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(h.length>0){const p=[...new Set(h)].map(m=>`"${m}"`);c.searchParams.set("columns",p.join(","))}}return new ei({method:o,url:c,headers:u,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:a,defaultToNull:o=!0}={}){var c;const u="POST",{url:h,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&h.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),o||p.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);h.searchParams.set("columns",y.join(","))}}return new ei({method:u,url:h,headers:p,schema:this.schema,body:e,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const a="PATCH",{url:o,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new ei({method:a,url:o,headers:c,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:a,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new ei({method:r,url:a,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ao(e){"@babel/helpers - typeof";return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ao(e)}function jR(e,t){if(Ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Ao(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NR(e){var t=jR(e,"string");return Ao(t)=="symbol"?t:t+""}function MR(e,t,r){return(t=NR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function rc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rv(Object(r),!0).forEach(function(a){MR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var DR=class H0{constructor(t,{headers:r={},schema:a,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:h}={}){this.url=t,this.headers=new Headers(r),this.schemaName=a,this.urlLengthLimit=u;const p=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),c),w=y?.signal;if(w){if(w.aborted)return clearTimeout(b),p(m,y);const _=()=>{clearTimeout(b),g.abort()};return w.addEventListener("abort",_,{once:!0}),p(m,rc(rc({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",_)})}return p(m,rc(rc({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=h}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new kR(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new H0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:a=!1,get:o=!1,count:c}={}){var u;let h;const p=new URL(`${this.url}/rpc/${t}`);let m;const y=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(y)),g=a&&Object.values(r).some(y);g?(h="POST",m=r):a||o?(h=a?"HEAD":"GET",Object.entries(r).filter(([w,_])=>_!==void 0).map(([w,_])=>[w,Array.isArray(_)?`{${_.join(",")}}`:`${_}
15`]).forEach(([w,_])=>{p.searchParams.append(w,_)})):(h="POST",m=r);const b=new Headers(this.headers);return g?b.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&b.set("Prefer",`count=${c}`),new ei({method:h,url:p,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class LR{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const o=globalThis.process;if(o){const c=o.versions;if(c&&c.node){const u=c.node,h=parseInt(u.replace(/^v/,"").split(".")[0]);return h>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${h} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${h} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
16import ws from "ws"
17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
18
19Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const UR="2.107.0",zR=`realtime-js/${UR}`,PR="1.0.0",q0="2.0.0",BR=q0,IR=1e4,HR=100,ds={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},$0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Yh={connecting:"connecting",closing:"closing",closed:"closed"};class qR{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,a;const o=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var r,a;const o=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,r,a){var o,c;const u=t.topic,h=(o=t.ref)!==null&&o!==void 0?o:"",p=(c=t.join_ref)!==null&&c!==void 0?c:"",m=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+h.length+u.length+m.length+g.length,w=new ArrayBuffer(this.HEADER_LENGTH+b);let _=new DataView(w),A=0;_.setUint8(A++,this.KINDS.userBroadcastPush),_.setUint8(A++,p.length),_.setUint8(A++,h.length),_.setUint8(A++,u.length),_.setUint8(A++,m.length),_.setUint8(A++,g.length),_.setUint8(A++,r),Array.from(p,x=>_.setUint8(A++,x.charCodeAt(0))),Array.from(h,x=>_.setUint8(A++,x.charCodeAt(0))),Array.from(u,x=>_.setUint8(A++,x.charCodeAt(0))),Array.from(m,x=>_.setUint8(A++,x.charCodeAt(0))),Array.from(g,x=>_.setUint8(A++,x.charCodeAt(0)));var E=new Uint8Array(w.byteLength+a.byteLength);return E.set(new Uint8Array(w),0),E.set(new Uint8Array(a),w.byteLength),E.buffer}decode(t,r){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return r(a)}if(typeof t=="string"){const a=JSON.parse(t),[o,c,u,h,p]=a;return r({join_ref:o,ref:c,topic:u,event:h,payload:p})}return r({})}_binaryDecode(t){const r=new DataView(t),a=r.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,r,o)}_decodeUserBroadcast(t,r,a){const o=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),h=r.getUint8(4);let p=this.HEADER_LENGTH+4;const m=a.decode(t.slice(p,p+o));p=p+o;const y=a.decode(t.slice(p,p+c));p=p+c;const g=a.decode(t.slice(p,p+u));p=p+u;const b=t.slice(p,t.byteLength),w=h===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,_={type:this.BROADCAST_EVENT,event:y,payload:w};return u>0&&(_.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>r.includes(a)))}}var Ye;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ye||(Ye={}));const Cv=(e,t,r={})=>{var a;const o=(a=r.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=$R(u,e,t,o),c),{}):{}},$R=(e,t,r,a)=>{const o=t.find(h=>h.name===e),c=o?.type,u=r[e];return c&&!a.includes(c)?F0(c,u):Qh(u)},F0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return KR(t,r)}switch(e){case Ye.bool:return FR(t);case Ye.float4:case Ye.float8:case Ye.int2:case Ye.int4:case Ye.int8:case Ye.numeric:case Ye.oid:return VR(t);case Ye.json:case Ye.jsonb:return GR(t);case Ye.timestamp:return YR(t);case Ye.abstime:case Ye.date:case Ye.daterange:case Ye.int4range:case Ye.int8range:case Ye.money:case Ye.reltime:case Ye.text:case Ye.time:case Ye.timestamptz:case Ye.timetz:case Ye.tsrange:case Ye.tstzrange:return Qh(t);default:return Qh(t)}},Qh=e=>e,FR=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},VR=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 4,773 bytes, line 19
19if(!Number.isNaN(t))return t}return e},GR=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},KR=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,a=e[r];if(e[0]==="{"&&a==="}"){let c;const u=e.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(h=>F0(t,h))}return e},YR=e=>typeof e=="string"?e.replace(" ","T"):e,V0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var vo=e=>typeof e=="function"?e:function(){return e},QR=typeof self<"u"?self:null,ti=typeof window<"u"?window:null,er=QR||ti||globalThis,JR="2.0.0",XR=1e4,WR=1e3,nr={connecting:0,open:1,closing:2,closed:3},rn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Or={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Jh={longpoll:"longpoll",websocket:"websocket"},ZR={complete:4},Xh="base64url.bearer.phx.",sc=class{constructor(e,t,r,a){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},G0=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},eC=class{constructor(e,t,r){this.state=rn.closed,this.topic=e,this.params=vo(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new sc(this,Or.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new G0(()=>{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=rn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=rn.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=rn.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=rn.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 sc(this,Or.leave,vo({}),this.timeout).send(),this.state=rn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Or.reply,(a,o)=>{this.trigger(this.replyEventName(o),a)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 19
19teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=rn.closed,this.bindings=[]}onClose(e){this.on(Or.close,e)}onError(e){return this.on(Or.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new sc(this,e,function(){return t},r);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=rn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Or.close,"leave")},r=new sc(this,Or.leave,vo({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=rn.joining,this.joinPush.resend(e))}trigger(e,t,r,a){let o=this.onMessage(e,t,r,a);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===e&&this.filterBindings(u,t,r));for(let u=0;u<c.length;u++)c[u].callback(o,r,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===rn.closed}isErrored(){return this.state===rn.errored}isJoined(){return this.state===rn.joined}isJoining(){return this.state===rn.joining}isLeaving(){return this.state===rn.leaving}},Cc=class{static request(e,t,r,a,o,c,u){if(er.XDomainRequest){let h=new er.XDomainRequest;return this.xdomainRequest(h,e,t,a,o,c,u)}else if(er.XMLHttpRequest){let h=new er.XMLHttpRequest;return this.xhrRequest(h,e,t,r,a,o,c,u)}else{if(er.fetch&&er.AbortController)return this.fetchRequest(e,t,r,a,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,a,o,c,u){let h={method:e,headers:r,body:a},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),h.signal=p.signal),er.fetch(t,h).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),p}static xdomainRequest(e,t,r,a,o,c,u){return e.timeout=o,e.open(t,r),e.onload=()=>{let h=this.parseJSON(e.responseText);u&&u(h)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,r,a,o,c,u,h){e.open(t,r,!0),e.timeout=c;for(let[p,m]of Object.entries(a))e.setRequestHeader(p,m);return e.onerror=()=>h&&h(null),e.onreadystatechange=()=>{if(e.readyState===ZR.complete&&h){let p=this.parseJSON(e.responseText);h(p)}},u&&(e.ontimeout=u),e.send(o),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let o=t?`${t}[${a}]`:a,c=e[a];typeof c=="object"?r.push(this.serialize(c,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},tC=e=>{let t="",r=new Uint8Array(e),a=r.byteLength;for(let o=0;o<a;o++)t+=String.fromCharCode(r[o]);return btoa(t)},Ya=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Xh)&&(this.authToken=atob(t[1].slice(Xh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=nr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Jh.websocket),"$1/"+Jh.longpoll)}endpointURL(){return Cc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=nr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===nr.open||this.readyState===nr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:a,messages:o}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else r=0;switch(r){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=nr.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=tC(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let o of this.reqs)o.abort();this.readyState=nr.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,r,a,o){let c,u=()=>{this.reqs.delete(c),a()};c=Cc.request(e,this.endpointURL(),t,r,this.timeout,u,h=>{this.reqs.delete(c),this.isActive()&&o(h)}),this.reqs.add(c)}},nC=class po{constructor(t,r={}){let a=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,o=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=po.syncState(this.state,o,c,u),this.pendingDiffs.forEach(p=>{this.state=po.syncDiff(this.state,p,c,u)}),this.pendingDiffs=[],h()}),this.channel.on(a.diff,o=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=po.syncDiff(this.state,o,c,u),h())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return po.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,a,o){let c=this.clone(t),u={},h={};return this.map(c,(p,m)=>{r[p]||(h[p]=m)}),this.map(r,(p,m)=>{let y=c[p];if(y){let g=m.metas.map(A=>A.phx_ref),b=y.metas.map(A=>A.phx_ref),w=m.metas.filter(A=>b.indexOf(A.phx_ref)<0),_=y.metas.filter(A=>g.indexOf(A.phx_ref)<0);w.length>0&&(u[p]=m,u[p].metas=w),_.length>0&&(h[p]=this.clone(y),h[p].metas=_)}else u[p]=m}),this.syncDiff(c,{joins:u,leaves:h},a,o)}static syncDiff(t,r,a,o){let{joins:c,leaves:u}=this.clone(r);return a||(a=function(){}),o||(o=function(){}),this.map(c,(h,p)=>{let m=t[h];if(t[h]=this.clone(p),m){let y=t[h].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[h].metas.unshift(...g)}a(h,m,p)}),this.map(u,(h,p)=>{let m=t[h];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(h,m,p),m.metas.length===0&&delete t[h]}),t}static list(t,r){return r||(r=function(a,o){return o}),this.map(t,(a,o)=>r(a,o))}static map(t,r){return Object.getOwnPropertyNames(t).map(a=>r(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},ac={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,a,o,c,u]=JSON.parse(e);return t({join_ref:r,ref:a,topic:o,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:r,event:a,topic:o,payload:c}=e,u=this.META_LENGTH+t.length+r.length+o.length+a.length,h=new ArrayBuffer(this.HEADER_LENGTH+u),p=new DataView(h),m=0;p.setUint8(m++,this.KINDS.push),p.setUint8(m++,t.length),p.setUint8(m++,r.length),p.setUint8(m++,o.length),p.setUint8(m++,a.length),Array.from(t,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(r,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>p.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(h.byteLength+c.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(c),h.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),a=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,h=r.decode(e.slice(u,u+a));u=u+a;let p=r.decode(e.slice(u,u+o));u=u+o;let m=r.decode(e.slice(u,u+c));u=u+c;let y=e.slice(u,e.byteLength);return{join_ref:h,ref:null,topic:p,event:m,payload:y}},decodeReply(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(e.slice(h,h+a));h=h+a;let m=r.decode(e.slice(h,h+o));h=h+o;let y=r.decode(e.slice(h,h+c));h=h+c;let g=r.decode(e.slice(h,h+u));h=h+u;let b=e.slice(h,e.byteLength),w={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:Or.reply,payload:w}},decodeBroadcast(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(e.slice(c,c+a));c=c+a;
20let h=r.decode(e.slice(c,c+o));c=c+o;let p=e.slice(c,e.byteLength);return{join_ref:null,ref:null,topic:u,event:h,payload:p}}},rC=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||XR,this.transport=t.transport||er.WebSocket||Ya,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=er&&er.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=ac.encode.bind(ac),this.defaultDecoder=ac.decode.bind(ac),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ya?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;ti&&ti.addEventListener&&(ti.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),ti.addEventListener("pageshow",o=>{a===this.connectClock&&(a=null,this.connect())}),ti.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>t.rejoinAfterMs?t.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>t.reconnectAfterMs?t.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=vo(t.params||{}),this.endPoint=`${e}/${Jh.websocket}`,this.vsn=t.vsn||JR,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new G0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ya}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Cc.appendParams(Cc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=vo(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ya?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(Ya,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(o=>{o.ref===t&&(this.off([a]),e(Date.now()-r))});return!0}transportName(e){return e===Ya?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Xh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,a=!0,o,c,u=this.transportName(e),h=p=>{this.log("transport",`falling back to ${u}...`,p),this.off([o,c]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return h("memorized");this.fallbackTimer=setTimeout(h,t),c=this.onError(p=>{this.log("transport","error",p),a&&!r&&(clearTimeout(this.fallbackTimer),h(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!a){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,t),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),WR,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,r||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===nr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Or.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case nr.connecting:return"connecting";case nr.open:return"open";case nr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new eC(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:a,ref:o,join_ref:c}=e;this.log("push",`${t} ${r} (${c}, ${o})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:a,payload:o,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",h)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${a} ${c&&"("+c+")"||""}`.trim(),o);for(let h=0;h<this.channels.length;h++){const p=this.channels[h];p.isMember(r,a,o,u)&&p.trigger(a,o,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,a])=>{try{a(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class bo{constructor(t,r){const a=aC(r);this.presence=new nC(t.getChannel(),a),this.presence.onJoin((o,c,u)=>{const h=bo.onJoinPayload(o,c,u);t.getChannel().trigger("presence",h)}),this.presence.onLeave((o,c,u)=>{const h=bo.onLeavePayload(o,c,u);t.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return bo.transformState(this.presence.state)}static transformState(t){return t=sC(t),Object.getOwnPropertyNames(t).reduce((r,a)=>{const o=t[a];return r[a]=wc(o),r},{})}static onJoinPayload(t,r,a){const o=Ov(r),c=wc(a);return{event:"join",key:t,currentPresences:o,newPresences:c}}static onLeavePayload(t,r,a){const o=Ov(r),c=wc(a);return{event:"leave",key:t,currentPresences:o,leftPresences:c}}}function wc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function sC(e){return JSON.parse(JSON.stringify(e))}function aC(e){return e?.events&&{events:e.events}}function Ov(e){return e?.metas?wc(e):[]}var kv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(kv||(kv={}));class iC{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new bo(this.channel.channelAdapter,r)}}function oC(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class lC{constructor(t,r,a){const o=cC(a);this.channel=t.getSocket().channel(r,o),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,a){let o;try{o=this.channel.push(t,r,a)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>HR){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===ds.joined}isJoined(){return this.state===ds.joined}isJoining(){return this.state===ds.joining}isClosed(){return this.state===ds.closed}isLeaving(){return this.state===ds.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function cC(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var jv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(jv||(jv={}));var si;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(si||(si={}));var kr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(kr||(kr={}));class wo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},a){var o,c;if(this.topic=t,this.params=r,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new lC(this.socket.socketAdapter,t,this.params),this.presence=new iC(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=V0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var a,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:h,private:p}}=this.params,m=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(w=>w.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[si.PRESENCE]&&this.bindings[si.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},b={broadcast:u,presence:Object.assign(Object.assign({},h),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(w=>{t?.(kr.CHANNEL_ERROR,oC(w))}),this._onClose(()=>t?.(kr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t?.(kr.SUBSCRIBED);return}this._updatePostgresBindings(w,t)}).receive("error",w=>{this.state=ds.errored;const _=Object.values(w).join(", ")||"error";t?.(kr.CHANNEL_ERROR,new Error(_,{cause:w}))}).receive("timeout",()=>{t?.(kr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var a;const o=this.bindings.postgres_changes,c=(a=o?.length)!==null&&a!==void 0?a:0,u=[];for(let h=0;h<c;h++){const p=o[h],{filter:{event:m,schema:y,table:g,filter:b}}=p,w=t&&t[h];if(w&&w.event===m&&wo.isFilterValueEqual(w.schema,y)&&wo.isFilterValueEqual(w.table,g)&&wo.isFilterValueEqual(w.filter,b))u.push(Object.assign(Object.assign({},p),{id:w.id}));else{this.unsubscribe(),this.state=ds.errored,r?.(kr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=ds.errored&&r&&r(kr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===si.PRESENCE||t===si.POSTGRES_CHANGES;if(o&&c)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,a)}async httpSend(t,r,a={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c=r instanceof ArrayBuffer||ArrayBuffer.isView(r),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":c?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h=new URL(this.broadcastEndpointURL);h.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&h.searchParams.set("private","true");const p={method:"POST",headers:u,body:c?r:JSON.stringify(r)},m=await this._fetchWithTimeout(h.toString(),p,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};let y=m.statusText;
20try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(t,r={}){var a,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=r.timeout)!==null&&a!==void 0?a:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,h,p;const m=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(h=(u=this.params)===null||u===void 0?void 0:u.config)===null||h===void 0?void 0:h.broadcast)===null||p===void 0)&&p.ack)&&c("ok"),m.receive("ok",()=>c("ok")),m.receive("error",()=>c("error")),m.receive("timeout",()=>c("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,a){const o=new AbortController,c=setTimeout(()=>o.abort(),a),u=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(c),u}_on(t,r,a){const o=t.toLocaleLowerCase(),c=this.channelAdapter.on(t,a),u={type:o,filter:r,callback:a,ref:c};return this.bindings[o]?this.bindings[o].push(u):this.bindings[o]=[u],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,a)=>{var o,c,u,h,p,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,a))return!1;const b=(o=this.bindings[g])===null||o===void 0?void 0:o.find(w=>w.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const w=b.id,_=(c=b.filter)===null||c===void 0?void 0:c.event;return w&&((u=r.ids)===null||u===void 0?void 0:u.includes(w))&&(_==="*"||_?.toLocaleLowerCase()===((h=r.data)===null||h===void 0?void 0:h.type.toLocaleLowerCase()))}else{const w=(m=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,r){const{close:a,error:o,leave:c,join:u}=$0;return r&&[a,o,c,u].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,a)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:c,table:u,commit_timestamp:h,type:p,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:h,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const a of t.bindings[r])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Cv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Cv(t.columns,t.old_record)),r}}class uC{constructor(t,r){this.socket=new rC(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,a,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{t(),c("ok")},r,a)})}push(t){this.socket.push(t)}log(t,r,a){this.socket.log(t,r,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Yh.connecting}isDisconnecting(){return this.socket.connectionState()==Yh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Nv={HEARTBEAT_INTERVAL:25e3},dC=[1e3,2e3,5e3,1e4],hC=1e4;function fC(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function pC(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return fC()}const mC=`
21  addEventListener("message", (e) => {
22    if (e.data.event === "start") {
23      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
24    }
25  });`;class gC{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new qR,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((a=r?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const o=this._initializeOptions(r);this.socketAdapter=new uC(t,o),this.httpEndpoint=V0(t),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
26
27To use Realtime in Node.js, you need to provide a WebSocket implementation:
28
29Option 1: Use Node.js 22+ which has native WebSocket support
30Option 2: Install and provide the "ws" package:
31
32  npm install ws
33
34  import ws from "ws"
35  const client = new RealtimeClient(url, {
36    ...options,
37    transport: ws
38  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,a){this.socketAdapter.log(t,r,a)}connectionState(){return this.socketAdapter.connectionState()||Yh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const a=`realtime:${t}`,o=this.getChannels().find(c=>c.topic===a);if(o)return o;{const c=new wo(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let r,a=!1;if(t)r=t,a=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const c={access_token:r,version:zR};r&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push($0.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,a)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const a=new Blob([mC],{type:"application/javascript"});r=URL.createObjectURL(a)}return r}_initializeOptions(t){var r,a,o,c,u,h,p,m,y,g,b,w;this.worker=(r=t?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const _={};_.timeout=(o=t?.timeout)!==null&&o!==void 0?o:IR,_.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:Nv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((h=t?.heartbeatIntervalMs)!==null&&h!==void 0?h:Nv.HEARTBEAT_INTERVAL),_.transport=(p=t?.transport)!==null&&p!==void 0?p:LR.getWebSocketConstructor(),_.params=t?.params,_.logger=t?.logger,_.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),_.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:pC(),_.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(M=>dC[M-1]||hC);let A,E;const x=(g=t?.vsn)!==null&&g!==void 0?g:BR;switch(x){case PR:A=(M,j)=>j(JSON.stringify(M)),E=(M,j)=>j(JSON.parse(M));break;case q0:A=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${_.vsn}`)}if(_.vsn=x,_.encode=(b=t?.encode)!==null&&b!==void 0?b:A,_.decode=(w=t?.decode)!==null&&w!==void 0?w:E,_.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,_.params=Object.assign(Object.assign({},_.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,_.autoSendHeartbeat=!this.worker}return _}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var Ro=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function yC(e,t,r){const a=new URL(t,e);if(r)for(const[o,c]of Object.entries(r))c!==void 0&&a.searchParams.set(o,c);return a.toString()}async function vC(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function bC(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:a,query:o,body:c,headers:u}){const h=yC(e.baseUrl,a,o),p=await vC(e.auth),m=await t(h,{method:r,headers:{...c?{"Content-Type":"application/json"}:{},...p,...u},body:c?JSON.stringify(c):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),b=g&&y?JSON.parse(y):y;if(!m.ok){const w=g?b:void 0,_=w?.error;throw new Ro(_?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:_?.type,icebergCode:_?.code,details:w})}return{status:m.status,headers:m.headers,data:b}}}}function ic(e){return e.join("�")}var wC=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:ic(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ic(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ic(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ic(e.namespace)}`}),!0}catch(t){if(t instanceof Ro&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Ro&&r.status===409)return;throw r}}};function Qa(e){return e.join("�")}var _C=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qa(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qa(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qa(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qa(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qa(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qa(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Ro&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Ro&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},SC=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=bC({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new wC(this.client,t),this.tableOps=new _C(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Co(e){"@babel/helpers - typeof";return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(e)}function EC(e,t){if(Co(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Co(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xC(e){var t=EC(e,"string");return Co(t)=="symbol"?t:t+""}function TC(e,t,r){return(t=xC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mv(Object(r),!0).forEach(function(a){TC(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var Yc=class extends Error{constructor(e,t="storage",r,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Qc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Wh=class extends Yc{constructor(e,t,r,a="storage"){super(e,a,t,r),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return ye({},super.toJSON())}},K0=class extends Yc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Oc(e,t,r){const a=ye({},e),o=t.toLowerCase();for(const c of Object.keys(a))c.toLowerCase()===o&&delete a[c];return a[o]=r,a}function AC(e){const t={};for(const[r,a]of Object.entries(e))t[r.toLowerCase()]=a;return t}const RC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),CC=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Zh=e=>{if(Array.isArray(e))return e.map(r=>Zh(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,a])=>{const o=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[o]=Zh(a)}),t},OC=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Dv=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},kC=async(e,t,r,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const h=u?.statusCode||u?.code||c+"";t(new Wh(Dv(u),c,h,a))}).catch(()=>{const u=c+"";t(new Wh(o.statusText||`HTTP ${c} error`,c,u,a))})}else t(new K0(Dv(e),e,a))},jC=(e,t,r,a)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return ye(ye({},o),r);if(CC(a)){var c;const u=t?.headers||{};let h;for(const[p,m]of Object.entries(u))p.toLowerCase()==="content-type"&&(h=m);o.headers=Oc(u,"Content-Type",(c=h)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return t?.duplex&&(o.duplex=t.duplex),ye(ye({},o),r)};async function uo(e,t,r,a,o,c,u){return new Promise((h,p)=>{e(r,jC(t,a,o,c)).then(m=>{if(!m.ok)throw m;if(a?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>h(m)).catch(m=>kC(m,p,a,u))})}function Y0(e="storage"){return{get:async(t,r,a,o)=>uo(t,"GET",r,a,o,void 0,e),post:async(t,r,a,o,c)=>uo(t,"POST",r,o,c,a,e),put:async(t,r,a,o,c)=>uo(t,"PUT",r,o,c,a,e),head:async(t,r,a,o)=>uo(t,"HEAD",r,ye(ye({},a),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,r,a,o,c)=>uo(t,"DELETE",r,o,c,a,e)}}const NC=Y0("storage"),{get:Oo,post:Hn,put:ef,head:MC,remove:Tf}=NC,gn=Y0("vectors");var ui=class{constructor(e,t={},r,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=AC(t),this.fetch=RC(r),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Oc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Qc(r))return{data:null,error:r};throw r}}};let Q0;Q0=Symbol.toStringTag;var DC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Q0]="StreamDownloadBuilder",this.promise=null}
38then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Qc(t))return{data:null,error:t};throw t}}};let J0;J0=Symbol.toStringTag;var LC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[J0]="BlobDownloadBuilder",this.promise=null}asStream(){return new DC(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Qc(t))return{data:null,error:t};throw t}}};const UC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Lv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var zC=class extends ui{constructor(e,t={},r,a){super(e,t,a,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,a){var o=this;return o.handleOperation(async()=>{let c;const u=ye(ye({},Lv),a);let h=ye(ye({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const p=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),p&&c.append("metadata",o.encodeMetadata(p)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),p&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(p))):(c=r,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType,p&&(h["x-metadata"]=o.toBase64(o.encodeMetadata(p))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))h=Oc(h,b,w);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?ef:Hn)(o.fetch,`${o.url}/object/${y}`,c,ye({headers:h},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,a){var o=this;const c=o._removeEmptyFolders(e),u=o._getFinalPath(c),h=new URL(o.url+`/object/upload/sign/${u}`);return h.searchParams.set("token",t),o.handleOperation(async()=>{let p;const m=ye(ye({},Lv),a);let y=ye(ye({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",o.encodeMetadata(g)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(g))):(p=r,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))y=Oc(y,b,w);return{path:c,fullPath:(await ef(o.fetch,h.toString(),p,ye({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let a=r._getFinalPath(e);const o=ye({},r.headers);t?.upsert&&(o["x-upsert"]="true");const c=await Hn(r.fetch,`${r.url}/object/upload/sign/${a}`,{},{headers:o}),u=new URL(r.url+c.url),h=u.searchParams.get("token");if(!h)throw new Yc("No token returned by API");return{signedUrl:u.toString(),path:e,token:h}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var a=this;return a.handleOperation(async()=>await Hn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:r?.destinationBucket},{headers:a.headers}))}async copy(e,t,r){var a=this;return a.handleOperation(async()=>({path:(await Hn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,r){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(e);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await Hn(a.fetch,`${a.url}/object/sign/${o}`,ye({expiresIn:t},c?{transform:r.transform}:{}),{headers:a.headers});const h=new URLSearchParams;r?.download&&h.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&h.set("cacheNonce",String(r.cacheNonce));const p=h.toString();return{signedUrl:encodeURI(`${a.url}${u.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,r){var a=this;return a.handleOperation(async()=>{const o=await Hn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),c=new URLSearchParams;r?.download&&c.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&c.set("cacheNonce",String(r.cacheNonce));const u=c.toString();return o.map(h=>ye(ye({},h),{},{signedUrl:h.signedURL?encodeURI(`${a.url}${h.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,r){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(o,t.transform),t?.cacheNonce!=null&&o.set("cacheNonce",String(t.cacheNonce));const c=o.toString(),u=this._getFinalPath(e),h=()=>Oo(this.fetch,`${this.url}/${a}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new LC(h,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Zh(await Oo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await MC(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(Qc(o)){var a;const c=o instanceof Wh?o.status:o instanceof K0?(a=o.originalError)===null||a===void 0?void 0:a.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const r=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const o=a.toString(),c=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${r}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Tf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var a=this;return a.handleOperation(async()=>{const o=ye(ye(ye({},UC),t),{},{prefix:e||""});return await Hn(a.fetch,`${a.url}/object/list/${a.bucketId}`,o,{headers:a.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const a=ye({},e);return await Hn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,a,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const PC="2.107.0",Po={"X-Client-Info":`storage-js/${PC}`};var BC=class extends ui{constructor(e,t={},r,a){const o=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=ye(ye({},Po),t);super(c,u,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Oo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Oo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Hn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await ef(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Hn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Tf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},IC=class extends ui{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ye(ye({},Po),t);super(a,o,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Hn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
38{const r=new URLSearchParams;e?.limit!==void 0&&r.set("limit",e.limit.toString()),e?.offset!==void 0&&r.set("offset",e.offset.toString()),e?.sortColumn&&r.set("sortColumn",e.sortColumn),e?.sortOrder&&r.set("sortOrder",e.sortOrder),e?.search&&r.set("search",e.search);const a=r.toString(),o=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await Oo(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Tf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!OC(e))throw new Yc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new SC({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(r,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...h)=>{try{return{data:await u.apply(o,h),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},HC=class extends ui{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ye(ye({},Po),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await gn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await gn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},qC=class extends ui{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ye(ye({},Po),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},$C=class extends ui{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ye(ye({},Po),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await gn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},FC=class extends $C{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new VC(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},VC=class extends HC{constructor(e,t,r,a){super(e,t,a),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName}))}
38async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new GC(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},GC=class extends qC{constructor(e,t,r,a,o){super(e,t,o),this.vectorBucketName=r,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,ye(ye({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},KC=class extends BC{constructor(e,t={},r,a){super(e,t,r,a)}from(e){return new zC(this.url,this.headers,e,this.fetch)}get vectors(){return new FC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new IC(this.url+"/iceberg",this.headers,this.fetch)}};const X0="2.107.0",ls=30*1e3,mo=3,Ch=mo*ls,YC="http://localhost:9999",QC="supabase.auth.token",JC={"X-Client-Info":`gotrue-js/${X0}`},tf="X-Supabase-Api-Version",W0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},XC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,WC=600*1e3;class ko extends Error{constructor(t,r,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ne(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class ZC extends ko{constructor(t,r,a){super(t,r,a),this.name="AuthApiError",this.status=r,this.code=a}}function eO(e){return ne(e)&&e.name==="AuthApiError"}class $n extends ko{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class rr extends ko{constructor(t,r,a,o){super(t,a,o),this.name=r,this.status=a}}class Rt extends rr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function oc(e){return ne(e)&&e.name==="AuthSessionMissingError"}class Ja extends rr{constructor(){super("Auth session or user missing","AuthInvalidToken
38ResponseError",500,void 0)}}class lc extends rr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class cc extends rr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function tO(e){return ne(e)&&e.name==="AuthImplicitGrantRedirectError"}class Uv extends rr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class nO extends rr{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 rr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Oh(e){return ne(e)&&e.name==="AuthRetryableFetchError"}class zv extends rr{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function rO(e){return ne(e)&&e.name==="AuthRefreshDiscardedError"}class Pv extends rr{constructor(t,r,a){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class kc extends rr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const jc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Bv=` 	
39\r=`.split(""),sO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Bv.length;t+=1)e[Bv[t].charCodeAt(0)]=-2;for(let t=0;t<jc.length;t+=1)e[jc[t].charCodeAt(0)]=t;return e})();function Iv(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(jc[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(jc[a]),t.queuedBits-=6}}function Z0(e,t,r){const a=sO[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Hv(e){const t=[],r=u=>{t.push(String.fromCodePoint(u))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{oO(u,a,r)};for(let u=0;u<e.length;u+=1)Z0(e.charCodeAt(u),o,c);return t.join("")}function aO(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function iO(e,t){for(let r=0;r<e.length;r+=1){let a=e.charCodeAt(r);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(e.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}aO(a,t)}}function oO(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function li(e){const t=[],r={queue:0,queuedBits:0},a=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)Z0(e.charCodeAt(o),r,a);return new Uint8Array(t)}function lO(e){const t=[];return iO(e,r=>t.push(r)),new Uint8Array(t)}function Zs(e){const t=[],r={queue:0,queuedBits:0},a=o=>{t.push(o)};return e.forEach(o=>Iv(o,r,a)),Iv(null,r,a),t.join("")}function cO(e){return Math.round(Date.now()/1e3)+e}function uO(){return Symbol("auth-callback")}const qt=()=>typeof window<"u"&&typeof document<"u",Ks={tested:!1,writable:!1},ew=()=>
39{if(!qt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ks.tested)return Ks.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ks.tested=!0,Ks.writable=!0}catch{Ks.tested=!0,Ks.writable=!1}return Ks.writable};function dO(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((o,c)=>{t[c]=o})}catch{}return r.searchParams.forEach((a,o)=>{t[o]=a}),t}const tw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ni=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Ar=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},vt=async(e,t)=>{await e.removeItem(t)};class Jc{constructor(){this.promise=new Jc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Jc.promiseConstructor=Promise;function uc(e){const t=e.split(".");if(t.length!==3)throw new kc("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!XC.test(t[a]))throw new kc("JWT not in base64url format");return{header:JSON.parse(Hv(t[0])),payload:JSON.parse(Hv(t[1])),signature:li(t[2]),raw:{header:t[0],payload:t[1]}}}async function fO(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function pO(e,t){return new Promise((a,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await e(c);if(!t(c,null,u)){a(u);return}}catch(u){if(!t(c,u)){o(u);return}}})()})}function mO(e){return("0"+e.toString(16)).substr(-2)}function gO(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=r.length;let o="";for(let c=0;c<56;c++)o+=r.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(t),Array.from(t,mO).join("")}async function yO(e){const r=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(a);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function vO(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await yO(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Xa(e,t,r=!1){const a=gO();let o=a;r&&(o+="/recovery"),await ni(e,`${t}-code-verifier`,o);const c=await vO(a);return[c,a===c?"plain":"s256"]}const bO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function wO(e){const t=e.headers.get(tf);if(!t||!t.match(bO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function _O(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function SO(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const EO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Rr(e){if(!EO.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function In(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function kh(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const a=r.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function xO(e,t){return new Proxy(e,{get:(r,a,o)=>
39{if(a==="__isInsecureUserWarningProxy")return!0;if(typeof a=="symbol"){const c=a.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,a,o)}return!t.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,a,o)}})}function qv(e){return JSON.parse(JSON.stringify(e))}const Qs=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},TO=[502,503,504,520,521,522,523,524,530];async function $v(e){var t;if(!hO(e))throw new nf(Qs(e),0);if(TO.includes(e.status))throw new nf(Qs(e),e.status);let r;try{r=await e.json()}
39catch(c){throw new $n(Qs(c),c)}let a;const o=wO(e);if(o&&o.getTime()>=W0["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?a=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(a=r.error_code),a){if(a==="weak_password")throw new Pv(Qs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new Rt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new Pv(Qs(r),e.status,r.weak_password.reasons);throw new ZC(Qs(r),e.status||500,a)}const AO=(e,t,r,a)=>{const o={method:e,headers:t?.headers||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),o.body=JSON.stringify(a),Object.assign(Object.assign({},o),r))};async function ce(e,t,r,a){var o;const c=Object.assign({},a?.headers);c[tf]||(c[tf]=W0["2024-01-01"].name),a?.jwt&&(c.Authorization=`Bearer ${a.jwt}`);const u=(o=a?.query)!==null&&o!==void 0?o:{};a?.redirectTo&&(u.redirect_to=a.redirectTo);const h=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",p=await RO(e,t,r+h,{headers:c,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function RO(e,t,r,a,o,c){const u=AO(t,a,o,c);let h;try{h=await e(r,Object.assign({},u))}catch(p){throw console.error(p),new nf(Qs(p),0)}if(h.ok||await $v(h),a?.noResolveJson)return h;try{return await h.json()}catch(p){await $v(p)}}function jn(e){var t;let r=null;kO(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=cO(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:r,user:a},error:null}}function Fv(e){const t=jn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,a)=>r&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function hs(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function CO(e){return{data:e,error:null}}function OO(e){const{action_link:t,email_otp:r,hashed_token:a,redirect_to:o,verification_type:c}=e,u=Kc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:t,email_otp:r,hashed_token:a,redirect_to:o,verification_type:c},p=Object.assign({},u);return{data:{properties:h,user:p},error:null}}function Vv(e){return e}function kO(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const jh=["global","local","others"];class jO{constructor({url:t="",headers:r={},fetch:a,experimental:o}){this.url=t,this.headers=r,this.fetch=tw(a),this.experimental=o??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=jh[0]){if(jh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${jh.join(", ")}`);try{return await ce(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(ne(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,r={}){try{return await ce(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:hs})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:r}=t,a=Kc(t,["options"]),o=Object.assign(Object.assign({},a),r);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await ce(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:OO,redirectTo:r?.redirectTo})}catch(r){if(ne(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:hs})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,a,o,c,u,h,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ce(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:Vv});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const A=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);m[`${E}Page`]=A}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ne(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){Rr(t);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:hs})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Rr(t);try{return await ce(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:hs})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,r=!1){Rr(t);
39try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:hs})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){Rr(t.userId);try{const{data:r,error:a}=await ce(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:a}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Rr(t.userId),Rr(t.id);try{return{data:await ce(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,a,o,c,u,h,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:Vv});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const A=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);m[`${E}Page`]=A}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ne(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ce(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(ne(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t?.type&&(r.type=t.type),await ce(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(r){if(ne(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await ce(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await ce(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(ne(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){In(this.experimental),Rr(t.userId);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){In(this.experimental),Rr(t.userId),Rr(t.passkeyId);
39try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}}function Gv(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&ew()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class NO extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function MO(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function nw(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function DO(e){return parseInt(e,16)}function LO(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function UO(e){var t;const{chainId:r,domain:a,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:h,requestId:p,resources:m,scheme:y,uri:g,version:b}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=nw(e.address),_=y?`${y}://${a}`:a,A=e.statement?`${e.statement}
41`:"",E=`${_} wants you to sign in with your Ethereum account:
42${w}
43
44${A}`;let x=`URI: ${g}
45Version: ${b}
46Chain ID: ${r}${u?`
47Nonce: ${u}`:""}
48Issued At: ${c.toISOString()}`;if(o&&(x+=`
49Expiration Time: ${o.toISOString()}`),h&&(x+=`
50Not Before: ${h.toISOString()}`),p&&(x+=`
51Request ID: ${p}`),m){let M=`
52Resources:`;for(const j of m){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}`}x+=M}return`${E}
54${x}`}class ft extends Error{constructor({message:t,code:r,cause:a,name:o}){var c;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(c=o??(a instanceof Error?a.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Nc extends ft{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function zO({error:e,options:t}){var r,a,o;const{publicKey:c}=t;if(!c)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ft({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=c.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new ft({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=c.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new ft({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new ft({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new ft({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ft({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new ft({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ft({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const u=window.location.hostname;if(rw(u)){if(c.rp.id!==u)return new ft({message:`The RP ID "${c.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ft({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new ft({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new ft({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ft({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function PO({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ft({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ft({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(rw(a)){if(r.rpId!==a)return new ft({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ft({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ft({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ft({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class BO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const rf=new BO;function Kv(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:a}=e,o=Kc(e,["challenge","user","excludeCredentials"]),c=li(t).buffer,u=Object.assign(Object.assign({},r),{id:li(r.id).buffer}),h=Object.assign(Object.assign({},o),{challenge:c,user:u});if(a&&a.length>0){h.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const m=a[p];h.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:li(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return h}function Yv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,a=Kc(e,["challenge","allowCredentials"]),o=li(t).buffer,c=Object.assign(Object.assign({},a),{challenge:o});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const h=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},h),{id:li(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return c}function Qv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Zs(new Uint8Array(e.response.attestationObject)),clientDataJSON:Zs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Jv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,a=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Zs(new Uint8Array(o.authenticatorData)),clientDataJSON:Zs(new Uint8Array(o.clientDataJSON)),signature:Zs(new Uint8Array(o.signature)),userHandle:o.userHandle?Zs(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function rw(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Mc(){var e,t;return!!(qt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function sw(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Nc("Browser returned unexpected credential type",t)}:{data:null,error:new Nc("Empty credential response",t)}}
54catch(t){return{data:null,error:zO({error:t,options:e})}}}async function aw(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Nc("Browser returned unexpected credential type",t)}:{data:null,error:new Nc("Empty credential response",t)}}catch(t){return{data:null,error:PO({error:t,options:e})}}}const IO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},HO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Dc(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),a={};for(const o of e)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))a[c]=u;else if(r(u))a[c]=u;else if(t(u)){const h=a[c];t(h)?a[c]=Dc(h,u):a[c]=Dc(u)}else a[c]=u}return a}function qO(e,t){return Dc(IO,e,t||{})}function $O(e,t){return Dc(HO,e,t||{})}class FO{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:a,signal:o},c){var u;try{const{data:h,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!h)return{data:null,error:p};const m=o??rf.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:y}=h.webauthn.credential_options.publicKey;if(!y.name){const g=a;if(g)y.name=`${y.id}:${g}`;else{const w=(await this.client.getUser()).data.user,_=((u=w?.user_metadata)===null||u===void 0?void 0:u.name)||w?.email||w?.id||"User";y.name=`${y.id}:${_}`}}y.displayName||(y.displayName=y.name)}switch(h.webauthn.type){case"create":{const y=qO(h.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await sw({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=$O(h.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await aw(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(h){return ne(h)?{data:null,error:h}:{data:null,error:new $n("Unexpected error in challenge",h)}}}async _verify({challengeId:t,factorId:r,webauthn:a}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new ko("rpId is required for WebAuthn authentication")};try{if(!Mc())return{data:null,error:new $n("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:a},signal:o},{request:c});if(!u)return{data:null,error:h};const{webauthn:p}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:a,credential_response:p.credential_response}})}catch(u){return ne(u)?{data:null,error:u}:{data:null,error:new $n("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new ko("rpId is required for WebAuthn registration")};try{if(!Mc())return{data:null,error:new $n("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:h};const{data:p,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:a},signal:o},{create:c});return p?this._verify({factorId:u.id,challengeId:p.challengeId,webauthn:{rpId:r,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(u){return ne(u)?{data:null,error:u}:{data:null,error:new $n("Unexpected error in register",u)}}}}MO();const VO={url:YC,storageKey:QC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:JC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Wa={};class jo{get jwks(){var t,r;return(r=(t=Wa[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Wa[this.storageKey]=Object.assign(Object.assign({},Wa[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Wa[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Wa[this.storageKey]=Object.assign(Object.assign({},Wa[this.storageKey]),{cachedAt:t})}constructor(t){var r,a,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},VO),t);if(this.storageKey=c.storageKey,this.instanceID=(r=jo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,jo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&qt()){const u=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(a=c.experimental)!==null&&a!==void 0?a:{},this.admin=new jO({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=tw(c.fetch),this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock!=null&&(this.lock=c.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new FO(this)}
54,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:ew()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Gv(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=Gv(this.memoryStorage)),qt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(h){this._debug("#broadcastChannel","error",h)}})}c.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${X0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let r={},a="none";if(qt()&&(r=dO(window.location.href),this._isImplicitGrantCallback(r)?a="implicit":await this._isPKCECallback(r)&&(a="pkce")),qt()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:c}=await this._getSessionFromURL(r,a);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),tO(c)){const p=(t=c.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:h}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",h),await this._saveSession(u),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ne(r)?this._returnResult({error:r}):this._returnResult({error:new $n("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,a,o;try{const c=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(r=t?.options)===null||r===void 0?void 0:r.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:jn}),{data:u,error:h}=c;if(h||!u)return this._returnResult({data:{user:null,session:null},error:h});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(ne(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var r,a,o;try{let c;if("email"in t){const{email:y,password:g,options:b}=t;let w=null,_=null;this.flowType==="pkce"&&([w,_]=await Xa(this.storage,this.storageKey)),c=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:w,code_challenge_method:_},xform:jn})}else if("phone"in t){const{phone:y,password:g,options:b}=t;c=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:jn})}else throw new lc("You must provide either an email or phone number and a password");const{data:u,error:h}=c;if(h||!u)return await vt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(t){try{let r;if("email"in t){const{email:c,password:u,options:h}=t;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Fv})}else if("phone"in t){const{phone:c,password:u,options:h}=t;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Fv})}else throw new lc("You must provide either an email or phone number and a password");const{data:a,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const c=new Ja;return this._returnResult({data:{user:null,session:null},error:c})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:o})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,a,o,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=t.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,a,o,c,u,h,p,m,y,g,b;let w,_;if("message"in t)w=t.message,_=t.signature;else{const{chain:A,wallet:E,statement:x,options:M}=t;let j;if(qt())if(typeof E=="object")j=E;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")j=J.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const U=new URL((r=M?.url)!==null&&r!==void 0?r:window.location.href),X=await j.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!X||X.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=nw(X[0]);let q=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!q){const J=await j.request({method:"eth_chainId"});q=DO(J)}const z={domain:U.host,address:V,statement:x,uri:U.href,version:"1",chainId:q,nonce:(o=M?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=M?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(h=M?.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=M?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};w=UO(z),_=await j.request({method:"personal_sign",params:[LO(w),V]})}try{const{data:A,error:E}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:_},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:jn});if(E)throw E;if(!A||!A.session||!A.user){const x=new Ja;return this._returnResult({data:{user:null,session:null},error:x})}
54return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:E})}catch(A){if(ne(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(t){var r,a,o,c,u,h,p,m,y,g,b,w;let _,A;if("message"in t)_=t.message,A=t.signature;else{const{chain:E,wallet:x,statement:M,options:j}=t;let U;if(qt())if(typeof x=="object")U=x;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))U=V.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");U=x}const X=new URL((r=j?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in U&&U.signIn){const V=await U.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 q;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")q=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)q=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in q&&"signature"in q&&(typeof q.signedMessage=="string"||q.signedMessage instanceof Uint8Array)&&q.signature instanceof Uint8Array)_=typeof q.signedMessage=="string"?q.signedMessage:new TextDecoder().decode(q.signedMessage),A=q.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in U)||typeof U.signMessage!="function"||!("publicKey"in U)||typeof U!="object"||!U.publicKey||!("toBase58"in U.publicKey)||typeof U.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");_=[`${X.host} wants you to sign in with your Solana account:`,U.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${X.href}`,`Issued At: ${(o=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=j?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((u=j?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((h=j?.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((m=j?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((g=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...j.signInWithSolana.resources.map(q=>`- ${q}`)]:[]].join(`
55`);const V=await U.signMessage(new TextEncoder().encode(_),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=V}}try{const{data:E,error:x}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:Zs(A)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:jn});if(x)throw x;if(!E||!E.session||!E.user){const M=new Ja;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:x})}
55catch(E){if(ne(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const r=await Ar(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(r??"").split("/");try{if(!a&&this.flowType==="pkce")throw new nO;const{data:c,error:u}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:jn});if(await vt(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const h=new Ja;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:o??null}),error:u})}catch(c){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(t){try{const{options:r,provider:a,token:o,access_token:c,nonce:u}=t,h=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:jn}),{data:p,error:m}=h;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new Ja;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:m})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,a,o,c,u;try{if("email"in t){const{email:h,options:p}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Xa(this.storage,this.storageKey));const{error:g}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(r=p?.data)!==null&&r!==void 0?r:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in t){const{phone:h,options:p}=t,{data:m,error:y}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(o=p?.data)!==null&&o!==void 0?o:{},create_user:(c=p?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(u=p?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new lc("You must provide either an email or phone number.")}catch(h){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(t){var r,a;try{let o,c;"options"in t&&(o=(r=t.options)===null||r===void 0?void 0:r.redirectTo,c=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:u,error:h}=await ce(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:jn});if(h)throw h;if(!u)throw new Error("An error occurred on token verification.");const p=u.session,m=u.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(o){if(ne(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var r,a,o,c,u;try{let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Xa(this.storage,this.storageKey));const m=await ce(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&a!==void 0?a:void 0}
55),!((o=t?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:p}),headers:this.headers,xform:CO});return!((c=m.data)===null||c===void 0)&&c.url&&qt()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(h){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)throw a;if(!r)throw new Rt;const{error:o}=await ce(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(ne(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:a,type:o,options:c}=t,{error:u}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}},redirectTo:c?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:a,type:o,options:c}=t,{data:u,error:h}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{phone:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:h})}throw new lc("You must provide either an email or phone number and a type")}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await a,await r()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=r();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Ar(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Ch:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const u=await Ar(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=kh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=xO(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{session:null},error:c}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:hs}):await this._useSession(async r=>{var a,o,c;const{data:u,error:h}=r;if(h)throw h;return!(!((a=u.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Rt}:await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:hs})})}catch(r){if(ne(r))return oc(r)&&(await this._removeSession(),await vt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async a=>{const{data:o,error:c}=a;if(c)throw c;if(!o.session)throw new Rt;const u=o.session;let h=null,p=null;this.flowType==="pkce"&&t.email!=null&&([h,p]=await Xa(this.storage,this.storageKey));const{data:m,error:y}=await ce(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:h,code_challenge_method:p}),jwt:u.access_token,xform:hs});if(y)throw y;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(a){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Rt;const r=Date.now()/1e3;let a=r,o=!0,c=null;const{payload:u}=uc(t.access_token);if(u.exp&&(a=u.exp,o=a<=r),o){const{data:h,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!h)return{data:{user:null,session:null},error:null};c=h}else{const{data:h,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});c={access_token:t.access_token,refresh_token:t.refresh_token,user:h.user,token_type:"bearer",expires_in:a-r,expires_at:a},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(r){if(ne(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var a;if(!t){const{data:u,error:h}=r;if(h)throw h;t=(a=u.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new Rt;const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var a;try{if(!qt())throw new cc("No browser detected.");
55if(t.error||t.error_description||t.error_code)throw new cc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Uv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new cc("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Uv("No code detected.");const{data:j,error:U}=await this._exchangeCodeForSession(t.code);if(U)throw U;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:o,provider_refresh_token:c,access_token:u,refresh_token:h,expires_in:p,expires_at:m,token_type:y}=t;if(!u||!p||!h||!y)throw new cc("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let w=g+b;m&&(w=parseInt(m));const _=w-g;_*1e3<=ls&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${_}s, should have been closer to ${b}s`);const A=w-b;g-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,w,g):g-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,w,g);const{data:E,error:x}=await this._getUser(u);if(x)throw x;const M={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:w,refresh_token:h,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:t.type},error:null})}catch(o){if(ne(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await Ar(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var a;const{data:o,error:c}=r;if(c&&!oc(c))return this._returnResult({error:c});const u=(a=o.session)===null||a===void 0?void 0:a.access_token;if(u){const{error:h}=await this.admin.signOut(u,t);if(h&&!(eO(h)&&(h.status===404||h.status===401||h.status===403)||oc(h)))return this._returnResult({error:h})}return t!=="others"&&(await this._removeSession(),await vt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=uO(),a={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async r=>{var a,o;try{const{data:{session:c},error:u}=r;if(u)throw u;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",t,"session",c)}catch(c){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",c),oc(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,r={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await Xa(this.storage,this.storageKey,!0));try{return await ce(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(c){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var t;try{const{data:r,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:a,error:o}=await this._useSession(async c=>{var u,h,p,m,y;const{data:g,error:b}=c;if(b)throw b;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(h=t.options)===null||h===void 0?void 0:h.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await ce(this.fetch,"GET",w,{headers:this.headers,jwt:(y=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return qt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(ne(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var a;try{const{error:o,data:{session:c}}=r;if(o)throw o;const{options:u,provider:h,token:p,access_token:m,nonce:y}=t,g=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=c?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:h,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:jn}),{data:b,error:w}=g;return w?this._returnResult({data:{user:null,session:null},error:w}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Ja}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(o){if(await vt(this.storage,`${this.storageKey}-code-verifier`),ne(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var a,o;const{data:c,error:u}=r;if(u)throw u;return await ce(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(a=c.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const a=Date.now();return await pO(async o=>(o>0&&await fO(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await ce(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:jn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&Oh(c)&&Date.now()+u-a<ls})}catch(a){if(this._debug(r,"error",a),ne(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",a),qt()&&!r.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,r;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await Ar(this.storage,this.storageKey);if(o&&this.userStorage){let u=await Ar(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await ni(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:kh()}else if(o&&!o.user&&!o.user){const u=await Ar(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await vt(this.storage,this.storageKey+"-user"),await ni(this.storage,this.storageKey,o)):o.user=kh()}if(this._debug(a,"session from storage",o),!this._isValidSession(o)){this._debug(a,"session is not valid"),o!==null&&await this._removeSession();return}const c=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Ch;if(this._debug(a,`session has${c?"":" not"} expired with margin of ${Ch}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(rO(u)?this._debug(a,"refresh discarded by commit guard",u):(console.error(u),Oh(u)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession())))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:h}=await this._getUser(o.access_token);!h&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(a,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(a,"error",o),console.error(o);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var r,a;if(!t)throw new Rt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Jc;const c=await Ar(this.storage,this.storageKey),{data:u,error:h}=await this._refreshAccessToken(t);if(h)throw h;if(!u.session)throw new Rt;const p=await Ar(this.storage,this.storageKey);if(c!==null&&(p===null||p.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new zv};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await vt(this.storage,this.storageKey),this.userStorage&&await vt(this.userStorage,this.storageKey+"-user");const b={data:null,error:new zv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),ne(c)){const u={data:null,error:c};return Oh(c)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(u),u}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,r,a=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",r,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(t,r)}catch(p){c.push(p)}});if(await Promise.all(u),c.length>0){for(let h=0;h<c.length;h+=1)console.error(c[h]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await vt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),a=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&r.user&&await ni(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const c=qv(o);await ni(this.storage,this.storageKey,c)}else{const o=qv(r);await ni(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await vt(this.storage,this.storageKey),await vt(this.storage,this.storageKey+"-code-verifier"),await vt(this.storage,this.storageKey+"-user"),this.userStorage&&await vt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&qt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ls);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/ls);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${ls}ms, refresh threshold is ${mo} ticks`),o<=mo&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof NO)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/ls);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${ls}ms, refresh threshold is ${mo} ticks`),o<=mo&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!qt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
55{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,a){const o=[`provider=${encodeURIComponent(r)}`];if(a?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&o.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[c,u]=await Xa(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(h.toString())}if(a?.queryParams){const c=new URLSearchParams(a.queryParams);o.push(c.toString())}return a?.skipBrowserRedirect&&o.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var a;const{data:o,error:c}=r;return c?this._returnResult({data:null,error:c}):await ce(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var a,o;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});const h=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:m}=await ce(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(a=c?.session)===null||a===void 0?void 0:a.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&p.type==="totp"&&(!((o=p?.totp)===null||o===void 0)&&o.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const h=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Qv(t.webauthn.credential_response):Jv(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:m}=await ce(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:h,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:m}))})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const h=await ce(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});if(h.error)return h;const{data:p}=h;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:Kv(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:Yv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(t=r?.factors)!==null&&t!==void 0?t:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,a,o,c;if(t)try{const{payload:w}=uc(t);let _=null;w.aal&&(_=w.aal);let A=_;const{data:{user:E},error:x}=await this.getUser(t);if(x)return this._returnResult({data:null,error:x});((a=(r=E?.factors)===null||r===void 0?void 0:r.filter(U=>U.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(A="aal2");const j=w.amr||[];return{data:{currentLevel:_,nextLevel:A,currentAuthenticationMethods:j},error:null}}catch(w){if(ne(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:u},error:h}
55=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=uc(u.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(w=>w.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?await ce(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new Rt})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async a=>{const{data:{session:o},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new Rt});const u=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&qt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,r){try{return await this._useSession(async a=>{const{data:{session:o},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new Rt});const u=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&qt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;return a?this._returnResult({data:null,error:a}):r?await ce(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Rt})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?(await ce(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Rt})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let a=r.keys.find(h=>h.kid===t);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(h=>h.kid===t),a&&this.jwks_cached_at+WC>o)return a;const{data:c,error:u}=await ce(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,a=c.keys.find(h=>h.kid===t),!a)?null:a}async getClaims(t,r={}){try{let a=t;if(!a){const{data:w,error:_}
55=await this.getSession();if(_||!w.session)return this._returnResult({data:null,error:_});a=w.session.access_token}const{header:o,payload:c,signature:u,raw:{header:h,payload:p}}=uc(a);if(!r?.allowExpired)try{_O(c.exp)}catch(w){throw new kc(w instanceof Error?w.message:"JWT validation failed")}const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!m){const{error:w}=await this.getUser(a);if(w)throw w;return{data:{claims:c,header:o,signature:u},error:null}}const y=SO(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,lO(`${h}.${p}`)))throw new kc("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var r,a,o;In(this.experimental);try{if(!Mc())return this._returnResult({data:null,error:new $n("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const h=Yv(c.options),p=(o=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:rf.createNewAbortSignal(),{data:m,error:y}=await aw({publicKey:h,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new $n("WebAuthn ceremony failed",null)});const g=Jv(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(ne(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var r,a;In(this.experimental);try{if(!Mc())return this._returnResult({data:null,error:new $n("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=Kv(o.options),h=(a=(r=t?.options)===null||r===void 0?void 0:r.signal)!==null&&a!==void 0?a:rf.createNewAbortSignal(),{data:p,error:m}=await sw({publicKey:u,signal:h});if(m||!p)return this._returnResult({data:null,error:m??new $n("WebAuthn ceremony failed",null)});const y=Qv(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(ne(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){In(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new Rt});const{data:o,error:c}=await ce(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){In(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Rt});const{data:c,error:u}=await ce(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;In(this.experimental);try{const{data:a,error:o}=await ce(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){In(this.experimental);try{const{data:r,error:a}=await ce(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:jn});return a?this._returnResult({data:null,error:a}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){In(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new Rt});const{data:o,error:c}=await ce(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){In(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Rt});const{data:c,error:u}=await ce(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){In(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Rt});const{error:c}
55=await ce(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}}jo.nextInstanceID={};const GO=jo,KO="2.107.0";let go="",Lc;if(typeof Deno<"u"){var Nh;go="deno",Lc=(Nh=Deno.version)===null||Nh===void 0?void 0:Nh.deno}else if(typeof document<"u")go="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")go="react-native";else{var Mh;go="node",Lc=typeof process<"u"?(Mh=process.version)===null||Mh===void 0?void 0:Mh.replace(/^v/,""):void 0}const iw=[`runtime=${go}`];Lc&&iw.push(`runtime-version=${Lc}`);const YO={"X-Client-Info":`supabase-js/${KO}; ${iw.join("; ")}`},QO={headers:YO},JO={schema:"public"},XO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},WO={},ZO={enabled:!1,respectSamplingDecision:!0};function ek(e,t,r,a){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function h(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(h,p)}m((a=a.apply(e,[])).next())})}let Dh=null;const tk="@opentelemetry/api";function nk(){return Dh===null&&(Dh=import(tk).catch(()=>null)),Dh}function rk(){return ek(this,void 0,void 0,function*(){try{const e=yield nk();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function sk(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,a,o,c]=t;if(r.length!==2||a.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(a)||!u.test(o)||!u.test(c)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:a,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function ak(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(ik(r.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(r.hostname))return!0}else if(typeof a=="function"&&a(r))return!0}catch{continue}return!1}function ik(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function ok(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function No(e){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(e)}function lk(e,t){if(No(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(No(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ck(e){var t=lk(e,"string");return No(t)=="symbol"?t:t+""}function uk(e,t,r){return(t=ck(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(r),!0).forEach(function(a){uk(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}const dk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hk=()=>Headers,fk=(e,t,r,a,o)=>{const c=dk(a),u=hk(),h=o?.enabled===!0,p=o?.respectSamplingDecision!==!1,m=h?ok(t):null;return async(y,g)=>{var b;const w=(b=await r())!==null&&b!==void 0?b:e;let _=new u(g?.headers);if(_.has("apikey")||_.set("apikey",e),_.has("Authorization")||_.set("Authorization",`Bearer ${w}`),m){const A=await pk(y,m,p);A&&(A.traceparent&&!_.has("traceparent")&&_.set("traceparent",A.traceparent),A.tracestate&&!_.has("tracestate")&&_.set("tracestate",A.tracestate),A.baggage&&!_.has("baggage")&&_.set("baggage",A.baggage))}return c(y,st(st({},g),{},{headers:_}))}};async function pk(e,t,r){if(!ak(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await rk();if(!a||!a.traceparent)return null;if(r){const o=sk(a.traceparent);if(o&&!o.isSampled)return null}return a}function Wv(e){return typeof e=="boolean"?{enabled:e}:e}function mk(e){return e.endsWith("/")?e:e+"/"}function gk(e,t){var r,a,o,c,u,h;const{db:p,auth:m,realtime:y,global:g}=e,{db:b,auth:w,realtime:_,global:A}=t,E=Wv(e.tracePropagation),x=Wv(t.tracePropagation),M={db:st(st({},b),p),auth:st(st({},w),m),realtime:st(st({},_),y),storage:{},global:st(st(st({},A),g),{},{headers:st(st({},(r=A?.headers)!==null&&r!==void 0?r:{}),(a=g?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(c=E?.enabled)!==null&&c!==void 0?c:x?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(h=E?.respectSamplingDecision)!==null&&h!==void 0?h:x?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?M.accessToken=e.accessToken:delete M.accessToken,M}function yk(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
55if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(mk(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var vk=class extends GO{constructor(e){super(e)}},bk=class{constructor(e,t,r){var a,o;this.supabaseUrl=e,this.supabaseKey=t;const c=yk(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,h={db:JO,realtime:WO,auth:st(st({},XO),{},{storageKey:u}),global:QO,tracePropagation:ZO},p=gk(r??{},h);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(o=p.global.headers)!==null&&o!==void 0?o:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=fk(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(st({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 DR(new URL("rest/v1",c).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new KC(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new TR(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:o,storageKey:c,flowType:u,lock:h,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},w,_){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new vk({url:this.authUrl.href,headers:st(st({},A),w),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:o,flowType:u,lock:h,debug:p,throwOnError:m,experimental:y,fetch:_,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new gC(this.realtimeUrl.href,st(st({},e),{},{params:st(st({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const wk=(e,t,r)=>new bk(e,t,r);function _k(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}_k()&&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 Sk(){return wk("https://cbsopnqllezzhcgggjyc.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNic29wbnFsbGV6emhjZ2dnanljIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODA1MDUzNDQsImV4cCI6MjA5NjA4MTM0NH0.WDUi1szqlzOStPSYhdYJ1aZl25c6MzCjuobpVCnDVH0",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let Lh;const Ek=new Proxy({},{get(e,t,r){return Lh||(Lh=Sk()),Reflect.get(Lh,t,r)}}),xk=Ws({type:"function"}).client(async({next:e})=>{const{data:t}=await Ek.auth.getSession(),r=t.session?.access_token;return e({headers:r?{Authorization:`Bearer ${r}`}:{}})}),Tk=Ws(),Zv=_R(()=>({functionMiddleware:[xk],requestMiddleware:[Tk]}));var Xc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ak=class extends Xc{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ow=new Ak,Rk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ck=class{#e=Rk;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},sf=new Ck;function Ok(e){setTimeout(e,0)}var kk=typeof window>"u"||"Deno"in globalThis;function qn(){}function jk(e,t){return typeof e=="function"?e(t):e}function Nk(e){return typeof e=="number"&&e>=0&&e!==1/0}function Mk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function af(e,t){return typeof e=="function"?e(t):e}function Dk(e,t){return typeof e=="function"?e(t):e}function eb(e,t){const{type:r="all",exact:a,fetchStatus:o,predicate:c,queryKey:u,stale:h}=e;if(u){if(a){if(t.queryHash!==Af(u,t.options))return!1}else if(!Do(t.queryKey,u))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||o&&o!==t.state.fetchStatus||c&&!c(t))}function tb(e,t){const{exact:r,status:a,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(Mo(t.options.mutationKey)!==Mo(c))return!1}else if(!Do(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function Af(e,t){return(t?.queryKeyHashFn||Mo)(e)}function Mo(e){return JSON.stringify(e,(t,r)=>of(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function Do(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Do(e[r],t[r])):!1}var Lk=Object.prototype.hasOwnProperty;function lw(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=nb(e)&&nb(t);if(!a&&!(of(e)&&of(t)))return t;const c=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),h=u.length,p=a?new Array(h):{};let m=0;for(let y=0;y<h;y++){const g=a?y:u[y],b=e[g],w=t[g];if(b===w){p[g]=b,(a?y<c:Lk.call(e,g))&&m++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[g]=w;continue}const _=lw(b,w,r+1);p[g]=_,_===b&&m++}return c===h&&m===c?e:p}function NM(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function nb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function of(e){if(!rb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!rb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rb(e){return Object.prototype.toString.call(e)==="[object Object]"}function Uk(e){return new Promise(t=>{sf.setTimeout(t,e)})}function zk(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?lw(e,t):t}function Pk(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function Bk(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var Rf=Symbol();function cw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Rf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function MM(e,t){return typeof e=="function"?e(...t):!!e}function Ik(e,t,r){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var uw=(()=>{let e=()=>kk;return{isServer(){return e()},setIsServer(t){e=t}}})();function Hk(){let e,t;const r=new Promise((o,c)=>{e=o,t=c});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},r.reject=o=>{a({status:"rejected",reason:o}),t(o)},r}var qk=Ok;function $k(){let e=[],t=0,r=h=>{h()},a=h=>{h()},o=qk;const c=h=>{t?e.push(h):o(()=>{r(h)})},u=()=>{const h=e;e=[],h.length&&o(()=>{a(()=>{h.forEach(p=>{r(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||u()}return p},batchCalls:h=>(...p)=>{c(()=>{h(...p)})},schedule:c,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{o=h}}}var Vt=$k(),Fk=class extends Xc{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}
vendor: 20,440 bytes, line 55
55setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Uc=new Fk;function Vk(e){return Math.min(1e3*2**e,3e4)}function dw(e){return(e??"online")==="online"?Uc.isOnline():!0}var lf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function hw(e){let t=!1,r=0,a;const o=Hk(),c=()=>o.status!=="pending",u=A=>{if(!c()){const E=new lf(A);b(E),e.onCancel?.(E)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>ow.isFocused()&&(e.networkMode==="always"||Uc.isOnline())&&e.canRun(),y=()=>dw(e.networkMode)&&e.canRun(),g=A=>{c()||(a?.(),o.resolve(A))},b=A=>{c()||(a?.(),o.reject(A))},w=()=>new Promise(A=>{a=E=>{(c()||m())&&A(E)},e.onPause?.()}).then(()=>{a=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let A;const E=r===0?e.initialPromise:void 0;try{A=E??e.fn()}catch(x){A=Promise.reject(x)}Promise.resolve(A).then(g).catch(x=>{if(c())return;const M=e.retry??(uw.isServer()?0:3),j=e.retryDelay??Vk,U=typeof j=="function"?j(r,x):j,X=M===!0||typeof M=="number"&&r<M||typeof M=="function"&&M(r,x);if(t||!X){b(x);return}r++,e.onFail?.(r,x),Uk(U).then(()=>m()?void 0:w()).then(()=>{t?b(x):_()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?_():w().then(_),o)}}var fw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nk(this.gcTime)&&(this.#e=sf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uw.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(sf.clearTimeout(this.#e),this.#e=void 0)}},Gk=class extends fw{#e;#n;#t;#s;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ab(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ab(this.options);t.data!==void 0&&(this.setState(sb(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const r=zk(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(qn).catch(qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Dk(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>af(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Mk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},o=()=>{const h=cw(this.options,t),m=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#i=!1,this.options.persister?this.options.persister(h,m,this):h(m)},u=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return a(h),h})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=hw({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:h=>{h instanceof lf&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(h,p)=>{this.#o({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#t.config.onSuccess?.(h,this),this.#t.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof lf){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#o({type:"error",error:h}),this.#t.config.onError?.(h,this),this.#t.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#o(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Kk(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...sb(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Vt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Kk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ab(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function ib(e){return{onFetch:(t,r)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=_=>{Ik(_,()=>t.signal,()=>y=!0)},b=cw(t.options,t.fetchOptions),w=async(_,A,E)=>{if(y)return Promise.reject();if(A==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:A,direction:E?"backward":"forward",meta:t.options.meta};return g(V),V})(),j=await b(M),{maxPages:U}=t.options,X=E?Bk:Pk;return{pages:X(_.pages,j,U),pageParams:X(_.pageParams,A,U)}};if(o&&c.length){const _=o==="backward",A=_?Yk:ob,E={pages:c,pageParams:u},x=A(a,E);h=await w(E,x,_)}else{const _=e??c.length;do{const A=p===0?u[0]??a.initialPageParam:ob(a,h);if(p>0&&A==null)break;h=await w(h,A),p++}while(p<_)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function ob(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function Yk(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var Qk=class extends fw{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||Jk(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=hw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#r({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const c=await this.#s.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,r),await this.options.onSuccess?.(c,e,this.state.context,r),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,e,this.state.context,r),this.#r({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Vt.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Jk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xk=class extends Xc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,r){const a=new Qk({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=dc(e);if(typeof t=="string"){const r=this.#n.get(t);r?r.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=dc(e);if(typeof t=="string"){const r=this.#n.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=dc(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=dc(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Vt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>tb(t,r))}findAll(e={}){return this.getAll().filter(t=>tb(e,t))}notify(e){Vt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Vt.batch(()=>Promise.all(e.map(t=>t.continue().catch(qn))))}};function dc(e){return e.options.scope?.id}var Wk=class extends Xc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,o=t.queryHash??Af(a,t);let c=this.get(o);return c||(c=new Gk({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Vt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>eb(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>eb(e,r)):t}notify(e){Vt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Vt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Vt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Zk=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new Wk,this.#n=e.mutationCache||new Xk,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=ow.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Uc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(af(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(a.queryHash)?.state.data,u=jk(t,c);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Vt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Vt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Vt.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Vt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(a).then(qn).catch(qn)}invalidateQueries(e,t={}){return Vt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Vt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,r);return r.throwOnError||(c=c.catch(qn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(af(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qn).catch(qn)}fetchInfiniteQuery(e){return e.behavior=ib(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qn).catch(qn)}ensureInfiniteQueryData(e){return e.behavior=ib(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Uc.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(Mo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],r={};return t.forEach(a=>{Do(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Mo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{Do(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Af(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Rf&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},pw=re.createContext(void 0),DM=e=>{const t=re.useContext(pw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},e2=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),N.jsx(pw.Provider,{value:e,children:t}));const t2="/assets/styles-DX0L8IX5.css";function n2(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}const mw=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();const r2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const s2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());const lb=e=>{const t=s2(e);return t.charAt(0).toUpperCase()+t.slice(1)};var a2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const i2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const o2=re.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:o="",children:c,iconNode:u,...h},p)=>re.createElement("svg",{ref:p,...a2,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:mw("lucide",o),...!c&&!i2(h)&&{"aria-hidden":"true"},...h},[...u.map(([m,y])=>
vendor: 4,106 bytes, line 55
55re.createElement(m,y)),...Array.isArray(c)?c:[c]]));const pt=(e,t)=>{const r=re.forwardRef(({className:a,...o},c)=>re.createElement(o2,{ref:c,iconNode:t,className:mw(`lucide-${r2(lb(e))}`,`lucide-${e}`,a),...o}));return r.displayName=lb(e),r};const l2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],c2=pt("arrow-right",l2);const u2=[["path",{d:"m11 7-3 5h4l-3 5",key:"b4a64w"}],["path",{d:"M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935",key:"lre1cr"}],["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936",key:"13q5k0"}]],d2=pt("battery-charging",u2);const h2=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],f2=pt("building-2",h2);const p2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],m2=pt("clock",p2);const g2=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],y2=pt("facebook",g2);const v2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],b2=pt("house",v2);const w2=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],_2=pt("instagram",w2);const S2=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],E2=pt("lightbulb",S2);const x2=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],T2=pt("mail",x2);const A2=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],R2=pt("map-pin",A2);const C2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O2=pt("menu",C2);const k2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],j2=pt("message-square",k2);const N2=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Lo=pt("phone",N2);const M2=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],D2=pt("plug",M2);const L2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],U2=pt("power",L2);const z2=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],P2=pt("printer",z2);const B2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],I2=pt("shield-alert",B2);const H2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],q2=pt("wrench",H2);const $2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 10,415 bytes, line 55
55],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],F2=pt("x",$2);const V2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],G2=pt("zap",V2),K2="/__l5e/assets-v1/48c54105-2c12-4993-b63b-51513d5db961/action-electric-logo.png",Y2={url:K2},cf="https://newactionelectric.lovable.app",ve=e=>e.startsWith("http")?e:`${cf}${e.startsWith("/")?e:`/${e}`}`,ge={name:"Action Electric Company",shortName:"Action Electric",tagline:"Dependable. Affordable. Professional.",phone:"605.334.8141",phoneHref:"tel:+16053348141",fax:"605.336.2644",faxHref:"tel:+16053362644",email:"[email protected]",emailHref:"mailto:[email protected]",address:"5200 West 9th Street",city:"Sioux Falls",region:"SD",postalCode:"57107",fullAddress:"5200 West 9th Street, Sioux Falls, SD 57107",mapHref:"https://www.google.com/maps/search/?api=1&query=5200+West+9th+Street+Sioux+Falls+SD+57107",googleReviewHref:"https://search.google.com/local/writereview?placeid=REPLACE_WITH_PLACE_ID",serviceArea:"Sioux Falls & the surrounding Sioux Empire",hours:"Mon–Fri 7:30am – 5pm · 24/7 Emergency",established:1947,logo:Y2.url,social:{facebook:"https://www.facebook.com/actionelectricco",instagram:"https://www.instagram.com/actionelectricsf",x:"https://www.x.com/ActionElecSF"}},cb=[{to:"/services",label:"Services"},{to:"/residential",label:"Residential"},{to:"/commercial",label:"Commercial"},{to:"/projects",label:"Projects"},{to:"/about",label:"About"},{to:"/faq",label:"FAQ"},{to:"/blog",label:"Resources"},{to:"/employment",label:"Careers"},{to:"/contact",label:"Contact"}];function gw(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=gw(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function Q2(){for(var e,t,r=0,a="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=gw(e))&&(a&&(a+=" "),a+=t);return a}const J2=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},X2=(e,t)=>({classGroupId:e,validator:t}),yw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),zc="-",ub=[],W2="arbitrary..",Z2=e=>{const t=tj(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return ej(u);const h=u.split(zc),p=h[0]===""&&h.length>1?1:0;return vw(h,p,t)},getConflictingClassGroupIds:(u,h)=>{if(h){const p=a[u],m=r[u];return p?m?J2(m,p):p:m||ub}return r[u]||ub}}},vw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],c=r.nextPart.get(o);if(c){const m=vw(e,t+1,c);if(m)return m}const u=r.validators;if(u===null)return;const h=t===0?e.join(zc):e.slice(t).join(zc),p=u.length;for(let m=0;m<p;m++){const y=u[m];if(y.validator(h))return y.classGroupId}},ej=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?W2+a:void 0})(),tj=e=>{const{theme:t,classGroups:r}=e;return nj(r,t)},nj=(e,t)=>{const r=yw();for(const a in e){const o=e[a];Cf(o,r,a,t)}return r},Cf=(e,t,r,a)=>{const o=e.length;for(let c=0;c<o;c++){const u=e[c];rj(u,t,r,a)}},rj=(e,t,r,a)=>{if(typeof e=="string"){sj(e,t,r);return}if(typeof e=="function"){aj(e,t,r,a);return}ij(e,t,r,a)},sj=(e,t,r)=>{const a=e===""?t:bw(t,e);a.classGroupId=r},aj=(e,t,r,a)=>{if(oj(e)){Cf(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(X2(r,e))},ij=(e,t,r,a)=>{const o=Object.entries(e),c=o.length;for(let u=0;u<c;u++){const[h,p]=o[u];Cf(p,bw(t,h),r,a)}},bw=(e,t)=>{let r=e;const a=t.split(zc),o=a.length;for(let c=0;c<o;c++){const u=a[c];let h=r.nextPart.get(u);h||(h=yw(),r.nextPart.set(u,h)),r=h}return r},oj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,lj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const o=(c,u)=>{r[c]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=a[c])!==void 0)return o(c,u),u},set(c,u){c in r?r[c]=u:o(c,u)}}},uf="!",db=":",cj=[],hb=(e,t,r,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:o}),uj=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=o=>{const c=[];let u=0,h=0,p=0,m;const y=o.length;for(let A=0;A<y;A++){const E=o[A];if(u===0&&h===0){if(E===db){c.push(o.slice(p,A)),p=A+1;continue}if(E==="/"){m=A;continue}}E==="["?u++:E==="]"?u--:E==="("?h++:E===")"&&h--}const g=c.length===0?o:o.slice(p);let b=g,w=!1;g.endsWith(uf)?(b=g.slice(0,-1),w=!0):g.startsWith(uf)&&(b=g.slice(1),w=!0);const _=m&&m>p?m-p:void 0;return hb(c,w,b,_)};if(t){const o=t+db,c=a;a=u=>u.startsWith(o)?c(u.slice(o.length)):hb(cj,!1,u,void 0,!0)}if(r){const o=a;a=c=>r({className:c,parseClassName:o})}return a},dj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let o=[];for(let c=0;c<r.length;c++){const u=r[c],h=u[0]==="[",p=t.has(u);h||p?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},hj=e=>({cache:lj(e.cacheSize),parseClassName:uj(e),sortModifiers:dj(e),...Z2(e)}),fj=/\s+/,pj=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:c}=t,u=[],h=e.trim().split(fj);let p="";for(let m=h.length-1;m>=0;m-=1){const y=h[m],{isExternal:g,modifiers:b,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:A}=r(y);if(g){p=y+(p.length>0?" "+p:p);continue}let E=!!A,x=a(E?_.substring(0,A):_);if(!x){if(!E){p=y+(p.length>0?" "+p:p);continue}if(x=a(_),!x){p=y+(p.length>0?" "+p:p);continue}E=!1}const M=b.length===0?"":b.length===1?b[0]:c(b).join(":"),j=w?M+uf:M,U=j+x;if(u.indexOf(U)>-1)continue;u.push(U);const X=o(x,E);for(let V=0;V<X.length;++V){const q=X[V];u.push(j+q)}p=y+(p.length>0?" "+p:p)}return p},mj=(...e)=>{let t=0,r,a,o="";for(;t<e.length;)(r=e[t++])&&(a=ww(r))&&(o&&(o+=" "),o+=a);return o},ww=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=ww(e[a]))&&(r&&(r+=" "),r+=t);return r},gj=(e,...t)=>{let r,a,o,c;const u=p=>{const m=t.reduce((y,g)=>g(y),e());return r=hj(m),a=r.cache.get,o=r.cache.set,c=h,h(p)},h=p=>{const m=a(p);if(m)return m;const y=pj(p,r);return o(p,y),y};return c=u,(...p)=>c(mj(...p))},yj=[],bt=e=>{const t=r=>r[e]||yj;return t.isThemeGetter=!0,t},_w=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,bj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_j=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ej=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,is=e=>vj.test(e),Ce=e=>!!e&&!Number.isNaN(Number(e)),os=e=>!!e&&Number.isInteger(Number(e)),Uh=e=>e.endsWith("%")&&Ce(e.slice(0,-1)),Cr=e=>bj.test(e),Ew=()=>!0,xj=e=>wj.test(e)&&!_j.test(e),Of=()=>!1,Tj=e=>Sj.test(e),Aj=e=>Ej.test(e),Rj=e=>!le(e)&&!ue(e),Cj=e=>Es(e,Aw,Of),le=e=>_w.test(e),Ys=e=>Es(e,Rw,xj),fb=e=>Es(e,Uj,Ce),Oj=e=>Es(e,Ow,Ew),kj=e=>Es(e,Cw,Of),pb=e=>Es(e,xw,Of),jj=e=>Es(e,Tw,Aj),hc=e=>Es(e,kw,Tj),ue=e=>Sw.test(e),ho=e=>aa(e,Rw),Nj=e=>aa(e,Cw),mb=e=>aa(e,xw),Mj=e=>aa(e,Aw),Dj=e=>aa(e,Tw),fc=e=>aa(e,kw,!0),Lj=e=>aa(e,Ow,!0),Es=(e,t,r)=>{const a=_w.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},aa=(e,t,r=!1)=>{const a=Sw.exec(e);return a?a[1]?t(a[1]):r:!1},xw=e=>e==="position"||e==="percentage",Tw=e=>e==="image"||e==="url",Aw=e=>e==="length"||e==="size"||e==="bg-size",Rw=e=>e==="length",Uj=e=>e==="number",Cw=e=>e==="family-name",Ow=e=>e==="number"||e==="weight",kw=e=>e==="shadow",zj=()=>{const e=bt("color"),t=bt("font"),r=bt("text"),a=bt("font-weight"),o=bt("tracking"),c=bt("leading"),u=bt("breakpoint"),h=bt("container"),p=bt("spacing"),m=bt("radius"),y=bt("shadow"),g=bt("inset-shadow"),b=bt("text-shadow"),w=bt("drop-shadow"),_=bt("blur"),A=bt("perspective"),E=bt("aspect"),x=bt("ease"),M=bt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...U(),ue,le],V=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],z=()=>[ue,le,p],J=()=>[is,"full","auto",...z()],he=()=>[os,"none","subgrid",ue,le],ie=()=>["auto",{span:["full",os,ue,le]},os,ue,le],we=()=>[os,"auto",ue,le],xe=()=>["auto","min","max","fr",ue,le],Be=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Oe=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...z()],Q=()=>[is,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],ae=()=>[is,"screen","full","dvw","lvw","svw","min","max","fit",...z()],Te=()=>[is,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],ee=()=>[e,ue,le],O=()=>[...U(),mb,pb,{position:[ue,le]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",Mj,Cj,{size:[ue,le]}],Z=()=>[Uh,ho,Ys],W=()=>["","none","full",m,ue,le],se=()=>["",Ce,ho,Ys],Se=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Ce,Uh,mb,pb],Nt=()=>["","none",_,ue,le],mt=()=>["none",Ce,ue,le],lt=()=>["none",Ce,ue,le],Dn=()=>[Ce,ue,le],gt=()=>[is,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cr],breakpoint:[Cr],color:[Ew],container:[Cr],"drop-shadow":[Cr],ease:["in","out","in-out"],font:[Rj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cr],shadow:[Cr],spacing:["px",Ce],text:[Cr],"text-shadow":[Cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",is,le,ue,E]}
vendor: 6,120 bytes, line 55
55],container:["container"],columns:[{columns:[Ce,le,ue,h]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:X()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{"inset-s":J(),start:J()}],end:[{"inset-e":J(),end:J()}],"inset-bs":[{"inset-bs":J()}],"inset-be":[{"inset-be":J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[os,"auto",ue,le]}],basis:[{basis:[is,"full","auto",h,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,is,"auto","initial","none",le]}],grow:[{grow:["",Ce,ue,le]}],shrink:[{shrink:["",Ce,ue,le]}],order:[{order:[os,"first","last","none",ue,le]}],"grid-cols":[{"grid-cols":he()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":he()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...Be(),"normal"]}],"justify-items":[{"justify-items":[...Oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...Oe()]}],"align-content":[{content:["normal",...Be()]}],"align-items":[{items:[...Oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":Be()}],"place-items":[{"place-items":[...Oe(),"baseline"]}],"place-self":[{"place-self":["auto",...Oe()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...Te()]}],"min-block-size":[{"min-block":["auto",...Te()]}],"max-block-size":[{"max-block":["none",...Te()]}],w:[{w:[h,"screen",...Q()]}],"min-w":[{"min-w":[h,"screen","none",...Q()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[u]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,ho,Ys]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Lj,Oj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uh,le]}],"font-family":[{font:[Nj,kj,t]}],"font-features":[{"font-features":[le]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ue,le]}],"line-clamp":[{"line-clamp":[Ce,"none",ue,fb]}],leading:[{leading:[c,...z()]}],"list-image":[{"list-image":["none",ue,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",ue,Ys]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Ce,"auto",ue,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},os,ue,le],radial:["",ue,le],conic:[os,ue,le]},Dj,jj]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:Z()}
vendor: 7,428 bytes, line 55
55],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,ue,le]}],"outline-w":[{outline:["",Ce,ho,Ys]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",y,fc,hc]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",g,fc,hc]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Ce,Ys]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",b,fc,hc]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Ce,ue,le]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ue,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,le]}],filter:[{filter:["","none",ue,le]}],blur:[{blur:Nt()}],brightness:[{brightness:[Ce,ue,le]}],contrast:[{contrast:[Ce,ue,le]}],"drop-shadow":[{"drop-shadow":["","none",w,fc,hc]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Ce,ue,le]}],"hue-rotate":[{"hue-rotate":[Ce,ue,le]}],invert:[{invert:["",Ce,ue,le]}],saturate:[{saturate:[Ce,ue,le]}],sepia:[{sepia:["",Ce,ue,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,le]}],"backdrop-blur":[{"backdrop-blur":Nt()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,ue,le]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,ue,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,ue,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,ue,le]}],"backdrop-invert":[{"backdrop-invert":["",Ce,ue,le]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,ue,le]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,ue,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,ue,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",ue,le]}],ease:[{ease:["linear","initial",x,ue,le]}],delay:[{delay:[Ce,ue,le]}],animate:[{animate:["none",M,ue,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,ue,le]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:mt()}],"rotate-x":[{"rotate-x":mt()}],"rotate-y":[{"rotate-y":mt()}],"rotate-z":[{"rotate-z":mt()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"scale-3d":["scale-3d"],skew:[{skew:Dn()}],"skew-x":[{"skew-x":Dn()}],"skew-y":[{"skew-y":Dn()}],transform:[{transform:[ue,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:gt()}],"translate-x":[{"translate-x":gt()}],"translate-y":[{"translate-y":gt()}],"translate-z":[{"translate-z":gt()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}
55],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,le]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Ce,ho,Ys,fb]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pj=gj(zj);function Bj(...e){return Pj(Q2(e))}function Ij(){const[e,t]=re.useState(!1),[r,a]=re.useState(!1),o=dR({select:c=>c.location.pathname});return re.useEffect(()=>{const c=()=>a(window.scrollY>12);return c(),window.addEventListener("scroll",c,{passive:!0}),()=>window.removeEventListener("scroll",c)},[]),re.useEffect(()=>{t(!1)},[o]),N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"hidden md:block bg-ink text-white text-xs",children:N.jsxs("div",{className:"container-tight flex items-center justify-between py-2",children:[N.jsxs("span",{className:"opacity-80",children:["Licensed & Insured · Serving ",ge.serviceArea," since ",ge.established]}),N.jsxs("div",{className:"flex items-center gap-5 opacity-90",children:[N.jsx("span",{children:ge.hours}),N.jsx("a",{href:ge.phoneHref,className:"hover:text-primary transition-colors",children:ge.phone})]})]})}),N.jsxs("header",{className:Bj("sticky top-0 z-40 bg-background/85 backdrop-blur border-b border-transparent transition-all",r&&"border-border shadow-[0_1px_0_rgba(0,0,0,0.03)]"),children:[N.jsxs("div",{className:"container-tight flex items-center justify-between gap-4 py-3",children:[N.jsxs(Nn,{to:"/",className:"flex items-center gap-3 shrink-0",children:[N.jsx("img",{src:ge.logo,alt:"Action Electric Company — Sioux Falls electricians logo",width:56,height:56,className:"h-12 w-auto"}),N.jsx("span",{className:"sr-only",children:ge.name})]}),N.jsx("nav",{className:"hidden lg:flex items-center gap-1",children:cb.map(c=>N.jsxs(Nn,{to:c.to,className:"px-3 py-2 text-sm font-medium text-foreground
55/80 hover:text-primary transition-colors relative group",activeProps:{className:"text-primary"},children:[c.label,N.jsx("span",{className:"absolute inset-x-3 -bottom-0.5 h-px bg-primary scale-x-0 group-hover:scale-x-100 transition-transform origin-left"})]},c.to))}),N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsxs("a",{href:ge.phoneHref,className:"hidden md:inline-flex items-center gap-2 rounded-full bg-primary text-primary-foreground px-4 py-2 text-sm font-semibold shadow-sm hover:shadow-md hover:translate-y-[-1px] transition",children:[N.jsx(Lo,{className:"h-4 w-4"}),ge.phone]}),N.jsx(Nn,{to:"/contact",className:"hidden md:inline-flex items-center rounded-full border border-foreground/15 px-4 py-2 text-sm font-semibold hover:border-primary hover:text-primary transition-colors",children:"Get a quote"}),N.jsx("button",{type:"button",onClick:()=>t(c=>!c),"aria-label":"Toggle menu",className:"lg:hidden p-2 rounded-md hover:bg-muted",children:e?N.jsx(F2,{className:"h-6 w-6"}):N.jsx(O2,{className:"h-6 w-6"})})]})]}),e&&N.jsx("div",{className:"lg:hidden border-t border-border bg-background",children:N.jsxs("nav",{className:"container-tight py-4 flex flex-col",children:[cb.map(c=>N.jsx(Nn,{to:c.to,className:"py-3 text-base font-medium border-b border-border/60 last:border-0",activeProps:{className:"text-primary"},children:c.label},c.to)),N.jsxs("div",{className:"flex gap-2 mt-4",children:[N.jsxs("a",{href:ge.phoneHref,className:"flex-1 inline-flex items-center justify-center gap-2 rounded-full bg-primary text-primary-foreground px-4 py-3 text-sm font-semibold",children:[N.jsx(Lo,{className:"h-4 w-4"}),"Call"]}),N.jsx(Nn,{to:"/contact",className:"flex-1 inline-flex items-center justify-center rounded-full border border-foreground
55/20 px-4 py-3 text-sm font-semibold",children:"Get a quote"})]})]})})]})]})}function Hj(){return N.jsxs("footer",{className:"bg-ink text-white/85 mt-24",children:[N.jsxs("div",{className:"container-tight py-16 grid gap-12 md:grid-cols-4",children:[N.jsxs("div",{className:"md:col-span-2 max-w-md",children:[N.jsxs(Nn,{to:"/",className:"inline-flex items-center gap-3",children:[N.jsx("img",{src:ge.logo,alt:"Action Electric Company — Sioux Falls electricians logo",width:48,height:48,className:"h-12 w-auto"}),N.jsx("span",{className:"font-display text-lg font-semibold text-white",children:ge.name})]}),N.jsxs("p",{className:"mt-4 text-sm leading-relaxed text-white/70",children:["Sioux Falls electricians delivering dependable, affordable, professional residential and commercial service since ",ge.established,". 24/7 emergency response, licensed and insured, and proud of every job we sign off on."]})]}),N.jsxs("div",{children:[N.jsx("h4",{className:"text-sm font-semibold text-white mb-4",children:"Explore"}),N.jsx("ul",{className:"space-y-2 text-sm",children:[{to:"/services",label:"All services"},{to:"/residential",label:"Residential"},{to:"/commercial",label:"Commercial"},{to:"/projects",label:"Projects"},{to:"/about",label:"About"},{to:"/faq",label:"FAQ"},{to:"/blog",label:"Resource center"},{to:"/employment",label:"Careers"}].map(e=>N.jsx("li",{children:N.jsx(Nn,{to:e.to,className:"hover:text-primary transition-colors",children:e.label})},e.to))})]}),N.jsxs("div",{children:[N.jsx("h4",{className:"text-sm font-semibold text-white mb-4",children:"Get in touch"}),N.jsxs("ul",{className:"space-y-3 text-sm",children:[N.jsxs("li",{className:"flex gap-3",children:[N.jsx(Lo,{className:"h-4 w-4 mt-0.5 text-primary"}),N.jsx("a",{href:ge.phoneHref,className:"hover:text-primary",children:ge.phone})]}),N.jsxs("li",{className:"flex gap-3",children:[N.jsx(P2,{className:"h-4 w-4 mt-0.5 text-primary"}),N.jsxs("a",{href:ge.faxHref,className:"hover:text-primary",children:["Fax ",ge.fax]})]}),N.jsxs("li",{className:"flex gap-3",children:[N.jsx(T2,{className:"h-4 w-4 mt-0.5 text-primary"}),N.jsx("a",{href:ge.emailHref,className:"hover:text-primary break-all",children:ge.email})]}),N.jsxs("li",{className:"flex gap-3",children:[N.jsx(R2,{className:"h-4 w-4 mt-0.5 text-primary"}),N.jsxs("a",{href:ge.mapHref,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary",children:[ge.address,N.jsx("br",{}),ge.city,", ",ge.region," ",ge.postalCode]})]}),N.jsxs("li",{className:"flex gap-3",children:[N.jsx(m2,{className:"h-4 w-4 mt-0.5 text-primary"}),N.jsx("span",{children:ge.hours})]})]}),N.jsxs("div",{className:"mt-5 flex items-center gap-3",children:[N.jsx("a",{href:ge.social.facebook,target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"h-9 w-9 grid place-items-center rounded-full border border-white/15 hover:border-primary hover:text-primary transition",children:N.jsx(y2,{className:"h-4 w-4"})}),N.jsx("a",{href:ge.social.instagram,target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"h-9 w-9 grid place-items-center rounded-full border border-white/15 hover:border-primary hover:text-primary transition",children:N.jsx(_2,{className:"h-4 w-4"})}),N.jsx("a",{href:ge.social.x,target:"_blank",rel:"noopener noreferrer","aria-label":"X",className:"h-9 w-9 grid place-items-center rounded-full border border-white/15 hover:border-primary hover:text-primary transition text-xs font-bold",children:"X"})]})]})]}),N.jsx("div",{className:"border-t border-white/10",children:N.jsxs("div",{className:"container-tight py-6 flex flex-col sm:flex-row justify-between items-center gap-3 text-xs text-white/55",children:[N.jsxs("p",{children:["© ",new Date().getFullYear()," ",ge.name,". All rights reserved."]}),N.jsx("p",{children:"Licensed & insured electrical contractor."}),N.jsx("a",{href:"https://complete.media",target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:"Powered by Complete Media"})]})})]})}function qj(){return N.jsx("div",{className:"md:hidden fixed bottom-0 inset-x-0 z-40 border-t border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:N.jsxs("div",{className:"grid grid-cols-2 divide-x divide-border",children:[N.jsxs("a",{href:ge.phoneHref,className:"flex items-center justify-center gap-2 py-3 text-sm font-semibold text-primary",children:[N.jsx(Lo,{className:"h-4 w-4"})," Call now"]}),N.jsxs(Nn,{to:"/contact",className:"flex items-center justify-center gap-2 py-3 text-sm font-semibold",children:[N.jsx(j2,{className:"h-4 w-4"})," Get a quote"]})]})})}function $j(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const Fj=e=>{switch(e){case"success":return Kj;case"info":return Qj;case"warning":return Yj;case"error":return Jj;default:return null}},Vj=Array(12).fill(0),Gj=({visible:e,className:t})=>te.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 6,040 bytes, line 55
55Boolean).join(" "),"data-visible":e},te.createElement("div",{className:"sonner-spinner"},Vj.map((r,a)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),Kj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),Yj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.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"})),Qj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),Jj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),Xj=te.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"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Wj=()=>{const[e,t]=te.useState(document.hidden);return te.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let df=1;class Zj{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:a,...o}=t,c=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:df++,u=this.toasts.find(p=>p.id===c),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(p=>p.id===c?(this.publish({...p,...t,id:c,title:a}),{...p,...t,id:c,dismissible:h,title:a}):p):this.addToast({title:a,...o,dismissible:h,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let c=a!==void 0,u;const h=o.then(async m=>{if(u=["resolve",m],te.isValidElement(m))c=!1,this.create({id:a,type:"default",message:m});else if(tN(m)&&!m.ok){c=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,..._})}else if(m instanceof Error){c=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,..._})}else if(r.success!==void 0){c=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:b,..._})}}).catch(async m=>{if(u=["reject",m],r.error!==void 0){c=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,w=typeof y=="object"&&!te.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:g,...w})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>h.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(t,r)=>{const a=r?.id||df++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const sn=new Zj,eN=(e,t)=>{const r=t?.id||df++;return sn.addToast({title:e,...t,id:r}),r},tN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",nN=eN,rN=()=>sn.toasts,sN=()=>sn.getActiveToasts(),LM=Object.assign(nN,{success:sn.success,info:sn.info,warning:sn.warning,error:sn.error,custom:sn.custom,message:sn.message,promise:sn.promise,dismiss:sn.dismiss,loading:sn.loading},{getHistory:rN,getToasts:sN});$j
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: 2,458 bytes, line 55
55pc(e){return e.label!==void 0}const aN=3,iN="24px",oN="16px",gb=4e3,lN=356,cN=14,uN=45,dN=200;function Wn(...e){return e.filter(Boolean).join(" ")}function hN(e){const[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}const fN=e=>{var t,r,a,o,c,u,h,p,m;const{invert:y,toast:g,unstyled:b,interacting:w,setHeights:_,visibleToasts:A,heights:E,index:x,toasts:M,expanded:j,removeToast:U,defaultRichColors:X,closeButton:V,style:q,cancelButtonStyle:z,actionButtonStyle:J,className:he="",descriptionClassName:ie="",duration:we,position:xe,gap:Be,expandByDefault:Oe,classNames:L,icons:Q,closeButtonAriaLabel:ae="Close toast"}=e,[Te,ee]=te.useState(null),[O,F]=te.useState(null),[K,Z]=te.useState(!1),[W,se]=te.useState(!1),[Se,be]=te.useState(!1),[pe,Nt]=te.useState(!1),[mt,lt]=te.useState(!1),[Dn,gt]=te.useState(0),[xs,sr]=te.useState(0),Fn=te.useRef(g.duration||we||gb),bn=te.useRef(null),Mt=te.useRef(null),ln=x===0,Ts=x+1<=A,St=g.type,Vn=g.dismissible!==!1,Et=g.className||"",qe=g.descriptionClassName||"",tt=te.useMemo(()=>E.findIndex(_e=>_e.toastId===g.id)||0,[E,g.id]),wn=te.useMemo(()=>{var _e;return(_e=g.closeButton)!=null?_e:V},[g.closeButton,V]),ar=te.useMemo(()=>g.duration||we||gb,[g.duration,we]),di=te.useRef(0),ir=te.useRef(0),Bo=te.useRef(0),Dr=te.useRef(null),[As,$t]=xe.split("-"),Ln=te.useMemo(()=>E.reduce((_e,Xe,xt)=>xt>=tt?_e:_e+Xe.height,0),[E,tt]),Bt=Wj(),Wc=g.invert||y,hi=St==="loading";ir.current=te.useMemo(()=>tt*Be+Ln,[tt,Ln]),te.useEffect(()=>{Fn.current=ar},[ar]),te.useEffect(()=>{Z(!0)},[]),te.useEffect(()=>{const _e=Mt.current;if(_e){const Xe=_e.getBoundingClientRect().height;return sr(Xe),_(xt=>[{toastId:g.id,height:Xe,position:g.position},...xt]),()=>_(xt=>xt.filter(It=>It.toastId!==g.id))}},[_,g.id]),te.useLayoutEffect(()=>{if(!K)return;const _e=Mt.current,Xe=_e.style.height;_e.style.height="auto";const xt=_e.getBoundingClientRect().height;_e.style.height=Xe,sr(xt),_(It=>It.find(et=>et.toastId===g.id)?It.map(et=>et.toastId===g.id?{...et,height:xt}:et):[{toastId:g.id,height:xt,position:g.position},...It])},[K,g.title,g.description,_,g.id,g.jsx,g.action,g.cancel]);const Gn=te.useCallback(()=>{se(!0),gt(ir.current),_(_e=>_e.filter(Xe=>Xe.toastId!==g.id)),setTimeout(()=>{U(g)},dN)},[g,U,_,ir]);te.useEffect(()=>{if(g.promise&&St==="loading"||g.duration===1/0||g.type==="loading")return;let _e;return j||w||Bt?(()=>{if(Bo.current<di.current){const It=new Date().getTime()-di.current;Fn.current=Fn.current-It}
vendor: 5,603 bytes, line 55
55Bo.current=new Date().getTime()})():Fn.current!==1/0&&(di.current=new Date().getTime(),_e=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Gn()},Fn.current)),()=>clearTimeout(_e)},[j,w,g,St,Bt,Gn]),te.useEffect(()=>{g.delete&&(Gn(),g.onDismiss==null||g.onDismiss.call(g,g))},[Gn,g.delete]);function ia(){var _e;if(Q?.loading){var Xe;return te.createElement("div",{className:Wn(L?.loader,g==null||(Xe=g.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":St==="loading"},Q.loading)}return te.createElement(Gj,{className:Wn(L?.loader,g==null||(_e=g.classNames)==null?void 0:_e.loader),visible:St==="loading"})}const oa=g.icon||Q?.[St]||Fj(St);var Rs,Kn;return te.createElement("li",{tabIndex:0,ref:Mt,className:Wn(he,Et,L?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,L?.default,L?.[St],g==null||(r=g.classNames)==null?void 0:r[St]),"data-sonner-toast":"","data-rich-colors":(Rs=g.richColors)!=null?Rs:X,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":K,"data-promise":!!g.promise,"data-swiped":mt,"data-removed":W,"data-visible":Ts,"data-y-position":As,"data-x-position":$t,"data-index":x,"data-front":ln,"data-swiping":Se,"data-dismissible":Vn,"data-type":St,"data-invert":Wc,"data-swipe-out":pe,"data-swipe-direction":O,"data-expanded":!!(j||Oe&&K),"data-testid":g.testId,style:{"--index":x,"--toasts-before":x,"--z-index":M.length-x,"--offset":`${W?Dn:ir.current}px`,"--initial-height":Oe?"auto":`${xs}px`,...q,...g.style},onDragEnd:()=>{be(!1),ee(null),Dr.current=null},onPointerDown:_e=>{_e.button!==2&&(hi||!Vn||(bn.current=new Date,gt(ir.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(be(!0),Dr.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,Xe,xt;if(pe||!Vn)return;Dr.current=null;const It=Number(((_e=Mt.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Xe=Mt.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((xt=bn.current)==null?void 0:xt.getTime()),Kt=Te==="x"?It:Lr,Cs=Math.abs(Kt)/et;if(Math.abs(Kt)>=uN||Cs>.11){gt(ir.current),g.onDismiss==null||g.onDismiss.call(g,g),F(Te==="x"?It>0?"right":"left":Lr>0?"down":"up"),Gn(),Nt(!0);return}else{var Yt,Qt;(Yt=Mt.current)==null||Yt.style.setProperty("--swipe-amount-x","0px"),(Qt=Mt.current)==null||Qt.style.setProperty("--swipe-amount-y","0px")}lt(!1),be(!1),ee(null)},onPointerMove:_e=>{var Xe,xt,It;if(!Dr.current||!Vn||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;const et=_e.clientY-Dr.current.y,Kt=_e.clientX-Dr.current.x;var Cs;const Yt=(Cs=e.swipeDirections)!=null?Cs:hN(xe);!Te&&(Math.abs(Kt)>1||Math.abs(et)>1)&&ee(Math.abs(Kt)>Math.abs(et)?"x":"y");let Qt={x:0,y:0};const la=Un=>1/(1.5+Math.abs(Un)/20);if(Te==="y"){if(Yt.includes("top")||Yt.includes("bottom"))if(Yt.includes("top")&&et<0||Yt.includes("bottom")&&et>0)Qt.y=et;else{const Un=et*la(et);Qt.y=Math.abs(Un)<Math.abs(et)?Un:et}}else if(Te==="x"&&(Yt.includes("left")||Yt.includes("right")))if(Yt.includes("left")&&Kt<0||Yt.includes("right")&&Kt>0)Qt.x=Kt;else{const Un=Kt*la(Kt);Qt.x=Math.abs(Un)<Math.abs(Kt)?Un:Kt}(Math.abs(Qt.x)>0||Math.abs(Qt.y)>0)&&lt(!0),(xt=Mt.current)==null||xt.style.setProperty("--swipe-amount-x",`${Qt.x}px`),(It=Mt.current)==null||It.style.setProperty("--swipe-amount-y",`${Qt.y}px`)}},wn&&!g.jsx&&St!=="loading"?te.createElement("button",{"aria-label":ae,"data-disabled":hi,"data-close-button":!0,onClick:hi||!Vn?()=>{}:()=>{Gn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Wn(L?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Kn=Q?.close)!=null?Kn:Xj):null,(St||g.icon||g.promise)&&g.icon!==null&&(Q?.[St]!==null||g.icon)?te.createElement("div",{"data-icon":"",className:Wn(L?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||ia():null,g.type!=="loading"?oa:null):null,te.createElement("div",{"data-content":"",className:Wn(L?.content,g==null||(c=g.classNames)==null?void 0:c.content)},te.createElement("div",{"data-title":"",className:Wn(L?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?te.createElement("div",{"data-description":"",className:Wn(ie,qe,L?.description,g==null||(h=g.classNames)==null?void 0:h.description)},typeof g.description=="function"?g.description():g.description):null),te.isValidElement(g.cancel)?g.cancel:g.cancel&&pc(g.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||z,onClick:_e=>{pc(g.cancel)&&Vn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,_e),Gn())},className:Wn(L?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,te.isValidElement(g.action)?g.action:g.action&&pc(g.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||J,onClick:_e=>{pc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,_e),!_e.defaultPrevented&&Gn())},className:Wn(L?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function yb(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function pN(e,t){const r={};return[e,t].forEach((a,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",h=c?oN:iN;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}
vendor: 5,578 bytes, line 55
55typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(m=>{a[m]===void 0?r[`${u}-${m}`]=h:r[`${u}-${m}`]=typeof a[m]=="number"?`${a[m]}px`:a[m]}):p(h)}),r}const mN=te.forwardRef(function(t,r){const{id:a,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:h,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:w,duration:_,style:A,visibleToasts:E=aN,toastOptions:x,dir:M=yb(),gap:j=cN,icons:U,containerAriaLabel:X="Notifications"}=t,[V,q]=te.useState([]),z=te.useMemo(()=>a?V.filter(K=>K.toasterId===a):V.filter(K=>!K.toasterId),[V,a]),J=te.useMemo(()=>Array.from(new Set([c].concat(z.filter(K=>K.position).map(K=>K.position)))),[z,c]),[he,ie]=te.useState([]),[we,xe]=te.useState(!1),[Be,Oe]=te.useState(!1),[L,Q]=te.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=te.useRef(null),Te=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=te.useRef(null),O=te.useRef(!1),F=te.useCallback(K=>{q(Z=>{var W;return(W=Z.find(se=>se.id===K.id))!=null&&W.delete||sn.dismiss(K.id),Z.filter(({id:se})=>se!==K.id)})},[]);return te.useEffect(()=>sn.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{q(Z=>Z.map(W=>W.id===K.id?{...W,delete:!0}:W))});return}setTimeout(()=>{LA.flushSync(()=>{q(Z=>{const W=Z.findIndex(se=>se.id===K.id);return W!==-1?[...Z.slice(0,W),{...Z[W],...K},...Z.slice(W+1)]:[K,...Z]})})})}),[V]),te.useEffect(()=>{if(b!=="system"){Q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:Z})=>{Q(Z?"dark":"light")})}catch{K.addListener(({matches:W})=>{try{Q(W?"dark":"light")}catch(se){console.error(se)}})}},[b]),te.useEffect(()=>{V.length<=1&&xe(!1)},[V]),te.useEffect(()=>{const K=Z=>{var W;if(u.every(be=>Z[be]||Z.code===be)){var Se;xe(!0),(Se=ae.current)==null||Se.focus()}Z.code==="Escape"&&(document.activeElement===ae.current||(W=ae.current)!=null&&W.contains(document.activeElement))&&xe(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[u]),te.useEffect(()=>{if(ae.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,O.current=!1)}},[ae.current]),te.createElement("section",{ref:r,"aria-label":`${X} ${Te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},J.map((K,Z)=>{var W;const[se,Se]=K.split("-");return z.length?te.createElement("ol",{key:K,dir:M==="auto"?yb():M,tabIndex:-1,ref:ae,className:m,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":se,"data-x-position":Se,style:{"--front-toast-height":`${((W=he[0])==null?void 0:W.height)||0}px`,"--width":`${lN}px`,"--gap":`${j}px`,...A,...pN(y,g)},onBlur:be=>{O.current&&!be.currentTarget.contains(be.relatedTarget)&&(O.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||O.current||(O.current=!0,ee.current=be.relatedTarget)},onMouseEnter:()=>xe(!0),onMouseMove:()=>xe(!0),onMouseLeave:()=>{Be||xe(!1)},onDragEnd:()=>xe(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||Oe(!0)},onPointerUp:()=>Oe(!1)},z.filter(be=>!be.position&&Z===0||be.position===K).map((be,pe)=>{var Nt,mt;return te.createElement(fN,{key:be.id,icons:U,index:pe,toast:be,defaultRichColors:w,duration:(Nt=x?.duration)!=null?Nt:_,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(mt=x?.closeButton)!=null?mt:p,interacting:Be,position:K,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:F,toasts:z.filter(lt=>lt.position==be.position),heights:he.filter(lt=>lt.position==be.position),setHeights:ie,expandByDefault:h,gap:j,expanded:we,swipeDirections:t.swipeDirections})})):null}))}),gN=({...e})=>N.jsx(mN,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});function yN(){return N.jsx("div",{className:"flex min-h-[70vh] items-center justify-center bg-background px-4",children:N.jsxs("div",{className:"max-w-md text-center",children:[N.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-primary",children:"404"}),N.jsx("h1",{className:"mt-2 font-display text-4xl font-semibold",children:"Page not found"}),N.jsx("p",{className:"mt-3 text-muted-foreground",children:"We couldn't find what you were looking for. Try heading back home or giving us a call."}),N.jsxs("div",{className:"mt-6 flex justify-center gap-2",children:[N.jsx(Nn,{to:"/",className:"inline-flex items-center justify-center rounded-full bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:shadow-md transition",children:"Go home"}),N.jsxs("a",{href:ge.phoneHref,className:"inline-flex items-center justify-center rounded-full border border-foreground
55/15 px-5 py-2.5 text-sm font-semibold hover:border-primary hover:text-primary transition",children:["Call ",ge.phone]})]})]})})}function vN({error:e,reset:t}){console.error(e);const r=kt();return re.useEffect(()=>{n2(e,{boundary:"tanstack_root_error_component"})},[e]),N.jsx("div",{className:"flex min-h-[70vh] items-center justify-center bg-background px-4",children:N.jsxs("div",{className:"max-w-md text-center",children:[N.jsx("h1",{className:"font-display text-2xl font-semibold",children:"This page didn't load"}),N.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Something went wrong on our end. Try again or call us at ",ge.phone,"."]}),N.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[N.jsx("button",{onClick:()=>{r.invalidate(),t()},className:"inline-flex items-center justify-center rounded-full bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground",children:"Try again"}),N.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-full border border-foreground
55/15 px-5 py-2.5 text-sm font-semibold",children:"Go home"})]})]})})}const vn=KA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Action Electric Company — Sioux Falls Electricians"},{name:"description",content:"Dependable. Affordable. Professional. Sioux Falls electricians serving the Sioux Empire since 1947. Residential, commercial & 24/7 emergency service."},{name:"author",content:"Action Electric Company"},{property:"og:site_name",content:"Action Electric Company"},{property:"og:type",content:"website"},{property:"og:title",content:"Action Electric Company — Sioux Falls Electricians"},{property:"og:description",content:"Sioux Falls electricians since 1947. Residential, commercial & 24/7 emergency service."},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Action Electric Company — Sioux Falls Electricians"},{name:"twitter:description",content:"Sioux Falls electricians since 1947. Residential, commercial & 24/7 emergency service."},{name:"theme-color",content:"#E03127"},{name:"msapplication-TileColor",content:"#E03127"},{name:"apple-mobile-web-app-title",content:"Action Electric"},{name:"application-name",content:"Action Electric"},{name:"apple-mobile-web-app-capable",content:"yes"},{name:"apple-mobile-web-app-status-bar-style",content:"default"}],links:[{rel:"stylesheet",href:t2},{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=Space+Grotesk:wght@500;600;700&display=swap"},{rel:"icon",href:"/favicon.ico",sizes:"any"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"},{rel:"icon",type:"image/png",sizes:"48x48",href:"/favicon-48x48.png"},{rel:"icon",type:"image/png",sizes:"192x192",href:"/icon-192.png"},{rel:"icon",type:"image/png",sizes:"512x512",href:"/icon-512.png"},{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"},{rel:"manifest",href:"/manifest.webmanifest"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Electrician","@id":`${cf}/#business`,name:ge.name,alternateName:ge.shortName,description:"Family-owned Sioux Falls electrical contractor serving the Sioux Empire since 1947. Residential, commercial & 24/7 emergency electrical service.",url:cf,logo:ve(ge.logo),image:ve(ge.logo),telephone:"+1-605-334-8141",faxNumber:"+1-605-336-2644",email:ge.email,foundingDate:String(ge.established),priceRange:"$$",currenciesAccepted:"USD",paymentAccepted:"Cash, Check, Credit Card",slogan:ge.tagline,address:{"@type":"PostalAddress",streetAddress:ge.address,addressLocality:ge.city,addressRegion:ge.region,postalCode:ge.postalCode,addressCountry:"US"},geo:{"@type":"GeoCoordinates",latitude:43.5378,longitude:-96.7896},hasMap:ge.mapHref,areaServed:[{"@type":"City",name:"Sioux Falls","@id":"https://en.wikipedia.org/wiki/Sioux_Falls,_South_Dakota"},{"@type":"City",name:"Brandon"},{"@type":"City",name:"Harrisburg"},{"@type":"City",name:"Tea"},{"@type":"City",name:"Dell Rapids"},{"@type":"City",name:"Hartford"},{"@type":"City",name:"Crooks"},{"@type":"City",name:"Lennox"},{"@type":"City",name:"Canton"},{"@type":"GeoCircle",geoMidpoint:{"@type":"GeoCoordinates",latitude:43.5378,longitude:-96.7896},geoRadius:"50000"}],openingHoursSpecification:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday"],opens:"07:30",closes:"17:00"}],hoursAvailable:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],opens:"00:00",closes:"23:59",description:"24/7 emergency electrical service"},contactPoint:[{"@type":"ContactPoint",telephone:"+1-605-334-8141",contactType:"customer service",areaServed:"US",availableLanguage:"English",hoursAvailable:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Frid
55ay"],opens:"07:30",closes:"17:00"}},{"@type":"ContactPoint",telephone:"+1-605-334-8141",contactType:"emergency",areaServed:"US",availableLanguage:"English",hoursAvailable:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],opens:"00:00",closes:"23:59"}}],knowsAbout:["Residential electrical service","Commercial electrical service","Electrical panel upgrades","EV charger installation","Standby generator installation","LED lighting retrofits","Smart home wiring","Electrical troubleshooting","24/7 emergency electrical repair"],sameAs:[ge.social.facebook,ge.social.instagram,ge.social.x]})}]}),shellComponent:bN,component:wN,notFoundComponent:yN,errorComponent:vN});function bN({children:e}){return N.jsxs("html",{lang:"en",children:[N.jsx("head",{children:N.jsx(mR,{})}),N.jsxs("body",{children:[e,N.jsx(gR,{})]})]})}function wN(){const{queryClient:e}=vn.useRouteContext();return N.jsx(e2,{client:e,children:N.jsxs("div",{className:"min-h-screen flex flex-col",children:[N.jsx(Ij,{}),N.jsx("main",{className:"flex-1 pb-20 md:pb-0",children:N.jsx(D0,{})}),N.jsx(Hj,{}),N.jsx(qj,{}),N.jsx(gN,{richColors:!0,position:"top-center"})]})})}const _N="modulepreload",SN=function(e){return"/"+e},vb={},jt=function(t,r,a){let o=Promise.resolve();if(r&&r.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");o=p(r.map(m=>{if(m=SN(m),m in vb)return;vb[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":_N,y||(b.as="script"),b.crossOrigin="",b.href=m,h&&b.setAttribute("nonce",h),document.head.appendChild(b),y)return new Promise((w,_)=>{b.addEventListener("load",w),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return o.then(u=>{for(const h of u||[])h.status==="rejected"&&c(h.reason);return t().catch(c)})},Mn="/assets/hero-electrician-BVrc6T7a.jpg",EN=()=>jt(()=>import("./services-CCW86xvQ.js"),__vite__mapDeps([0,1,2])),xN=yn("/services")({head:()=>({meta:[{title:"Electrical Services in Sioux Falls | Action Electric Company"},{name:"description",content:"Sioux Falls electrical services: panel upgrades, EV charger installation, generators, LED lighting, troubleshooting, remodels & 24/7 emergency response. Free quotes."},{property:"og:title",content:"Electrical Services in Sioux Falls | Action Electric Company"},{property:"og:description",content:"Residential & commercial electrical services across the Sioux Empire."},{property:"og:url",content:ve("/services")},{property:"og:image",content:ve(Mn)},{property:"og:image:alt",content:"Action Electric services in Sioux Falls"},{name:"twitter:image",content:ve(Mn)},{name:"twitter:image:alt",content:"Action Electric services in Sioux Falls"},{name:"twitter:title",content:"Electrical Services in Sioux Falls | Action Electric Company"},{name:"twitter:description",content:"Panel upgrades, EV chargers, generators, LED lighting, remodels & 24/7 emergency service across the Sioux Empire."}],links:[{rel:"canonical",href:ve("/services")}]}),component:Ot(EN,"component")});function UM({eyebrow:e,title:t,copy:r}){return N.jsxs("section",{className:"relative bg-ink text-white overflow-hidden",children:[N.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_20%,rgba(224,49,39,0.25),transparent_55%)]"}),N.jsxs("div",{className:"container-tight relative py-20 md:py-28",children:[N.jsxs("div",{className:"inline-flex items-center gap-2 text-xs font-semibold uppercase tracking-[0.18em] text-primary",children:[N.jsx("span",{className:"h-px w-6 bg-primary"})," ",e]}),N.jsx("h1",{className:"mt-4 font-display text-4xl md:text-6xl font-semibold max-w-3xl leading-[1.05]",children:t}),N.jsx("p",{className:"mt-5 max-w-xl text-white/75 text-lg",children:r}),N.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[N.jsxs("a",{href:ge.phoneHref,className:"inline-flex items-center gap-2 rounded-full bg-primary px-5 py-3 font-semibold text-primary-foreground hover:shadow-lg hover:shadow-
55primary/30 transition",children:[N.jsx(Lo,{className:"h-4 w-4"})," ",ge.phone]}),N.jsxs(Nn,{to:"/contact",className:"inline-flex items-center gap-2 rounded-full border border-white/25 px-5 py-3 font-semibold hover:bg-white/10 transition",children:["Get a quote ",N.jsx(c2,{className:"h-4 w-4"})]})]})]})]})}const TN=()=>jt(()=>import("./review-noBgaSUZ.js"),__vite__mapDeps([3,4,5,6,7])),AN=yn("/review")({head:()=>({meta:[{title:"Share Your Experience — Action Electric Company"},{name:"description",content:"Tell us how we did."},{name:"robots",content:"noindex, nofollow"}]}),component:Ot(TN,"component")}),bb="/assets/residential-ehe-dAh5.jpg",RN=()=>jt(()=>import("./residential-LdT4dQ7y.js"),__vite__mapDeps([8,2,9,6])),CN=yn("/residential")({head:()=>({meta:[{title:"Residential Electrician Sioux Falls | Action Electric Company"},{name:"description",content:"Sioux Falls residential electrician for panel upgrades, EV chargers, whole-home rewires, lighting, smart home wiring, generators & 24/7 emergency repairs. Free estimates."},{property:"og:title",content:"Residential Electrician Sioux Falls | Action Electric Company"},{property:"og:description",content:"Trusted home electricians serving Sioux Falls and the Sioux Empire since 1947."},{property:"og:url",content:ve("/residential")},{property:"og:image",content:ve(bb)},{property:"og:image:alt",content:"Residential electrician work in Sioux Falls"},{name:"twitter:image",content:ve(bb)},{name:"twitter:image:alt",content:"Residential electrician work in Sioux Falls"},{name:"twitter:title",content:"Residential Electrician Sioux Falls | Action Electric Company"},{name:"twitter:description",content:"Trusted home electricians serving Sioux Falls and the Sioux Empire since 1947."}],links:[{rel:"canonical",href:ve("/residential")}]}),component:Ot(RN,"component")}),wb="/assets/canaries-stadium-2lhxxrIs.jpg",ON=()=>jt(()=>import("./projects-ByISCSgo.js"),__vite__mapDeps([10,2,6])),kN=yn("/projects")({head:()=>({meta:[{title:"Electrical Projects in Sioux Falls | Action Electric Company"},{name:"description",content:"Browse recent residential, commercial, and municipal electrical projects completed by Action Electric Company across Sioux Falls and the Sioux Empire."},{property:"og:title",content:"Electrical Projects in Sioux Falls | Action Electric Company"},{property:"og:description",content:"Recent work across the Sioux Empire."},{property:"og:url",content:ve("/projects")},{property:"og:image",content:ve(wb)},{property:"og:image:alt",content:"Canaries Stadium electrical project by Action Electric"},{name:"twitter:image",content:ve(wb)},{name:"twitter:image:alt",content:"Canaries Stadium electrical project by Action Electric"},{name:"twitter:title",content:"Electrical Projects in Sioux Falls | Action Electric Company"},{name:"twitter:description",content:"Recent residential, commercial, and municipal electrical projects across the Sioux Empire."}],links:[{rel:"canonical",href:ve("/projects")}]}),component:Ot(ON,"component")}),jN=[{cat:"Pricing",q:"How does your pricing work?",a:"We provide a written, up-front estimate before starting any work. Service calls have a flat diagnostic fee that's applied to the repair if you decide to move forward."},{cat:"Pricing",q:"Do you offer free estimates?",a:"For project work like panel upgrades, EV chargers, generators, lighting, and remodels — yes. For diagnostic service calls, we charge a small flat dispatch fee that we credit toward the repair."},{cat:"Safety",q:"Is my outlet/breaker dangerous?",a:"If you smell burning, see scorch marks, or feel heat at a switch or outlet, stop using it and call us immediately at 605.334.8141 — this is a 24/7 line. Don't reset a breaker repeatedly; it's tripping for a reason."},{cat:"Safety",q:"When should I upgrade my electrical panel?",a:"Common signs: fuse box rather than breakers, frequent tripping, a 60–100A service trying to power a modern home, no AFCI/GFCI protection in newer code-required areas, or visible rust/scorch marks. We can assess and quote in one visit."},{cat:"Residential",q:"Do you do small jobs like installing a ceiling fan or a single outlet?",a:"Absolutely. No job too small. We schedule small jobs alongside larger ones to keep service fees fair."},{cat:"Residential",q:"Can you work with my general contractor?",a:"Yes — we partner with most Sioux Falls–area GCs on remodels, additions, and new builds. We can join walk-throughs and rough-in planning."},{cat:"Commercial",q:"Do you do after-hours commercial work?",a:"Yes. For retail, restaurants, office
55s, and warehouses we routinely schedule installs nights and weekends to avoid disrupting your business."},{cat:"Commercial",q:"Are you licensed for commercial scope?",a:"We're fully licensed and insured for residential and commercial electrical work in South Dakota, and carry the bonding required for most commercial GCs."},{cat:"EV",q:"What EV chargers do you install?",a:"All major Level 2 brands — Tesla Wall Connector, ChargePoint, Wallbox, Grizzl-E, JuiceBox, and more. We'll size the circuit, pull permits, and leave a clean run."},{cat:"EV",q:"Do I need a panel upgrade for an EV charger?",a:"Not always. We perform a load calculation first. Sometimes a 200A panel handles a Level 2 charger fine; other times we recommend an upgrade or a load-management device."},{cat:"Generators",q:"What size generator do I need?",a:"Depends on what you want to power. Whole-home backup for a typical Sioux Falls home is usually 18–26 kW. We do a site visit and recommend based on your panel and lifestyle."},{cat:"Generators",q:"Do you service the generators you install?",a:"Yes. We offer annual service plans so your standby unit is actually ready when an outage hits."}],NN=()=>jt(()=>import("./faq-C8_iKL6v.js"),__vite__mapDeps([11,12])),MN=yn("/faq")({head:()=>({meta:[{title:"Electrical FAQ — Sioux Falls | Action Electric Company"},{name:"description",content:"Answers to common electrical questions from a licensed Sioux Falls electrician — pricing, safety, EV chargers, generators, and more."},{property:"og:title",content:"Electrical FAQ — Sioux Falls | Action Electric Company"},{property:"og:description",content:"Common electrical questions, answered."},{property:"og:url",content:ve("/faq")},{property:"og:image",content:ve(Mn)},{property:"og:image:alt",content:"Electrician FAQ from Action Electric"},{name:"twitter:image",content:ve(Mn)},{name:"twitter:image:alt",content:"Electrician FAQ from Action Electric"},{name:"twitter:title",content:"Electrical FAQ — Sioux Falls | Action Electric Company"},{name:"twitter:description",content:"Answers to common electrical questions from a licensed Sioux Falls electrician."}],links:[{rel:"canonical",href:ve("/faq")}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:jN.map(e=>({"@type":"Question",name:e.q,acceptedAnswer:{"@type":"Answer",text:e.a}}))})}]}),component:Ot(NN,"component")}),Pc="/assets/team-CKfByUTb.jpg",DN=()=>jt(()=>import("./employment-CdUBWOXi.js"),__vite__mapDeps([13,2,6])),LN=yn("/employment")({head:()=>({meta:[{title:"Electrician Jobs in Sioux Falls | Action Electric Company"},{name:"description",content:"Now hiring in Sioux Falls: certified journeyman electricians and an accounting clerk/receptionist. Competitive pay, benefits & a family-owned team since 1947. Apply today."},{property:"og:title",content:"Electrician Jobs in Sioux Falls | Action Electric Company"},{property:"og:description",content:"Now hiring journeyman electricians and an accounting clerk / re
55ceptionist in Sioux Falls, SD."},{property:"og:url",content:ve("/employment")},{property:"og:image",content:ve(Pc)},{property:"og:image:alt",content:"Join the Action Electric team in Sioux Falls"},{name:"twitter:image",content:ve(Pc)},{name:"twitter:image:alt",content:"Join the Action Electric team in Sioux Falls"},{name:"twitter:title",content:"Electrician Jobs in Sioux Falls | Action Electric Company"},{name:"twitter:description",content:"Now hiring journeyman electricians and an accounting clerk/receptionist in Sioux Falls."}],links:[{rel:"canonical",href:ve("/employment")}]}),component:Ot(DN,"component")}),UN=()=>jt(()=>import("./contact-Bvj4f5qG.js"),__vite__mapDeps([14,6,5])),zN=yn("/contact")({head:()=>({meta:[{title:"Contact Action Electric — Sioux Falls Electrician"},{name:"description",content:"Call Action Electric Company in Sioux Falls at 605.334.8141 or request a quote online — 24/7 emergency service available."},{property:"og:title",content:"Contact Action Electric — Sioux Falls Electrician"},{property:"og:description",content:"Sioux Falls electricians — call or request a quote."},{property:"og:url",content:ve("/contact")},{property:"og:image",content:ve(Mn)},{property:"og:image:alt",content:"Contact Action Electric in Sioux Falls"},{name:"twitter:image",content:ve(Mn)},{name:"twitter:image:alt",content:"Contact Action Electric in Sioux Falls"},{name:"twitter:title",content:"Contact Action Electric — Sioux Falls Electrician"},{name:"twitter:description",content:"Call 605.334.8141 or request a quote online — 24/7 emergency service available."}],links:[{rel:"canonical",href:ve("/contact")}]}),component:Ot(UN,"component")}),_b="/assets/commercial-BOYu_GZN.jpg",PN=()=>jt(()=>import("./commercial-HcqG5G61.js"),__vite__mapDeps([15,2,9,6])),BN=yn("/commercial")({head:()=>({meta:[{title:"Commercial Electrician Sioux Falls | Action Electric Company"},{name:"description",content:"Sioux Falls commercial electrician for tenant fit-outs, LED lighting retrofits, service upgrades, sign power, data cabling & after-hours installation. Licensed & insured."},{property:"og:title",content:"Commercial Electrician Sioux Falls | Action Electric Company"},{property:"og:description",content:"Commercial electrical contractor for offices, retail, restaurants, and warehouses."},{property:"og:url",content:ve("/commercial")},{property:"og:image",content:ve(_b)},{property:"og:image:alt",content:"Commercial electrical service in Sioux Falls"},{name:"twitter:image",content:ve(_b)},{name:"twitter:image:alt",content:"Commercial electrical service in Sioux Falls"},{name:"twitter:title",content:"Commercial Electrician Sioux Falls | Action Electric Company"},{name:"twitter:description",content:"Commercial electrical contractor for offices, retail, restaurants, and warehouses."}],links:[{rel:"canonical",href:ve("/commercial")}]}),component:Ot(PN,"component")}),IN=yo({method:"GET"}).handler(wf("f88be178434a72f14816c61968ccb1e8abb8e79c8cfd0860b64c23afa716d119")),HN=yo({method:"GET"}).handler(wf("9c8084edff95c284c741e3785ab938a71693bfe26e2c07e4c0272b47d311afc2")),qN={queryKey:["blog-posts"],queryFn:()=>IN()},$N=()=>jt(()=>import("./blog-BrujDg08.js"),__vite__mapDeps([16,17,2,9,18,7,12])),FN=()=>jt(()=>import("./blog-CZKpdyTS.js"),[]),VN=()=>jt(()=>import("./blog-DUb16exB.js"),[]),GN=yn("/blog")({loader:({context:e})=>e.queryClient.ensureQueryData(qN),head:()=>({meta:[{title:"Electrical Resources & Blog | Action Electric Company"},{name:"description",content:"Practical electrical guides from working Sioux Falls electricians — panel upgrades, EV chargers, generators, LED retrofits, smart home wiring, code updates & safety tips."},{property:"og:title",content:"Electrical Resources & Blog | Action Electric Company"},{property:"og:description",content:"Long-form electrical guides from licensed Sioux Falls electricians."},{property:"og:url",content:ve("/blog")},{property:"og:image",content:ve(Mn)},{property:"og:image:alt",content:"Action Electric resources and blog"},{name:"twitter:image",content:ve(Mn)},{name:"twitter:image:alt",content:"Action Electric resources and blog"},{name:"twitter:title",content:"Electrical Resources & Blog | Action Electric Company"},{name:"twitter:description",content:"Practical electrical guides from working Sioux Falls electricians — safety, upgrades, EV chargers, generators & more."}],links:[{rel:"canonical",href:ve("/blog")}]}),errorComponent:Ot(VN,"errorComponent"),notFoundComponent:Ot(FN,"notFoundComponent"),component:Ot($N,"component")}),KN=()=>jt(()=>
55import("./about-DnUZlTX5.js"),__vite__mapDeps([19,2,18,20])),YN=yn("/about")({head:()=>({meta:[{title:"About Action Electric — Licensed Electricians in Sioux Falls"},{name:"description",content:"Family-owned Sioux Falls electrical contractor serving the Sioux Empire since 1947. Meet the licensed electricians behind clean, reliable residential & commercial work."},{property:"og:title",content:"About Action Electric — Sioux Falls Electricians Since 1947"},{property:"og:description",content:"Family-owned, licensed Sioux Falls electrical contractor serving the Sioux Empire since 1947."},{property:"og:url",content:ve("/about")},{property:"og:image",content:ve(Pc)},{property:"og:image:alt",content:"The Action Electric Company team in Sioux Falls"},{name:"twitter:image",content:ve(Pc)},{name:"twitter:image:alt",content:"The Action Electric Company team in Sioux Falls"},{name:"twitter:title",content:"About Action Electric — Sioux Falls Electricians Since 1947"},{name:"twitter:description",content:"Family-owned, licensed Sioux Falls electrical contractor serving the Sioux Empire since 1947."}],links:[{rel:"canonical",href:ve("/about")}]}),component:Ot(KN,"component")}),QN=()=>jt(()=>import("./index-DiTcpHet.js"),__vite__mapDeps([21,2,1,20,4,6])),JN=yn("/")({head:()=>({meta:[{title:"Sioux Falls Electricians | 24/7 Service | Action Electric Company"},{name:"description",content:"Licensed Sioux Falls electricians since 1947. Panel upgrades, EV chargers, generators, lighting, remodels & 24/7 emergency service. Free quotes — call 605.334.8141."},{property:"og:title",content:"Sioux Falls Electricians | 24/7 Service | Action Electric Company"},{property:"og:description",content:"Dependable. Affordable. Professional. Residential & commercial electrical service across the Sioux Empire."},{property:"og:url",content:ve("/")},{property:"og:image",content:ve(Mn)},{property:"og:image:alt",content:"Sioux Falls electrician on the job"},{name:"twitter:image",content:ve(Mn)},{name:"twitter:image:alt",content:"Sioux Falls electrician on the job"},{name:"twitter:title",content:"Sioux Falls Electricians | 24/7 Service | Action Electric Company"},{name:"twitter:description",content:"Licensed Sioux Falls electricians since 1947 — panel upgrades, EV chargers, generators & 24/7 emergency service."}],links:[{rel:"canonical",href:ve("/")}]}),component:Ot(QN,"component")}),XN=[{slug:"panel-upgrades",title:"Panel Upgrades & Service",short:"200A upgrades, sub-panels, code corrections.",icon:U2,description:"Tripping breakers, flickering lights, a fuse box from another decade — we modernize your service so your home or business can actually power what you use today.",bullets:["100A → 200A service upgrades","Sub-panel installation","Fuse-to-breaker conversions","Permit & inspection handled"],category:"both"},{slug:"ev-charger-install",title:"EV Charger Installation",short:"Level 2 home & workplace chargers, done right.",icon:d2,description:"Certified installs for Tesla, ChargePoint, Wallbox and more. We size the circuit, pull the permit, and leave a clean run from panel to charger.",bullets:["All major Level 2 brands","Garage, driveway, & multi-unit","Load calculations included","Rebate paperwork assistance"],category:"both"},{slug:"lighting-design",title:"Lighting Design & Install",short:"Recessed, accent, landscape, and retrofit LED.",icon:E2,description:"From a single can light to a full kitchen remodel or commercial retrofit, we plan layouts that look great and cut energy use.",bullets:["Recessed & under-cabinet","Landscape & accent lighting","Smart switches & dimmers","LED retrofits & rebates"],category:"both"},{slug:"generators",title:"Standby Generators",short:"Whole-home & light-commercial backup power.",icon:G2,description:"Sioux Falls weather doesn't ask permission. We install and service automatic standby generators that switch on within seconds of an outage.",bullets:["Generac & Kohler authorized install","Automatic transfer switch","Annual service plans","Natural gas & propane"],category:"both"},{slug:"troubleshooting",title:"Troubleshooting & Repair",short:"Find the real problem, fix it the first time.",icon:I2,description:"Dead outlets, mystery breakers, burning smells — our techs methodically diagnose and repair instead of guessing.",bullets:["Whole-house diagnostics","GFCI / AFCI repair","Aluminum wiring remediation","Code violation fixes"],category:"both"},{slug:"remodels",title:"Remodels & Additions",short:"Kitchen, bath, basement, and new builds.",icon:q2,description:"Working with your contractor — or directly with you — we wire remodels and additions cleanly the first time, on schedule.",bullets:["Kitchen & bath rewires","Basement finishing","Whole-home rewires","Pre-drywall walk-throughs"],category:"residential"},{slug:"commercial-fitout",title:"Tenant Fit-Outs",short:"Offices, retail, restaurants, warehouses.",icon:f2,description:"We collaborate with GCs and property managers to turn empty space into working space — on budget, on time, code-compliant.",bullets:["Power & data infrastru
55cture","Lighting layout & controls","Sign and exterior power","After-hours installation"],category:"commercial"},{slug:"smart-home",title:"Smart Home Wiring",short:"Networking, smart switches, automation.",icon:D2,description:"Structured wiring, smart switches, hubs, and the no-nonsense advice on what's actually worth installing.",bullets:["Cat6 & coax structured wiring","Smart switches & scenes","Whole-home audio prep","Hub & camera installation"],category:"residential"},{slug:"emergency",title:"24/7 Emergency Service",short:"Storm damage, outages, hazards.",icon:b2,description:"When power goes down or sparks fly, you need an electrician now. Our on-call techs respond around the clock.",bullets:["Storm damage & downed lines coordination","Burning smell & arc-fault response","Partial outage diagnosis","Temporary power restoration"],category:"both"}];function WN(e){return XN.find(t=>t.slug===e)}const ZN=()=>jt(()=>import("./services._slug-CxTnHX1Z.js"),[]),eM=()=>jt(()=>import("./services._slug-Co2vkQA4.js"),__vite__mapDeps([22,2,23,6])),tM=yn("/services/$slug")({loader:({params:e})=>{const t=WN(e.slug);if(!t)throw Ob();return{service:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[]};const{service:r}=e;return{meta:[{title:`${r.title} — Sioux Falls | Action Electric Company`},{name:"description",content:r.description},{property:"og:title",content:`${r.title} — Sioux Falls | Action Electric Company`},{property:"og:description",content:r.description},{property:"og:url",content:ve(`/services/${t.slug}`)},{property:"og:image",content:ve(Mn)},{property:"og:image:alt",content:`${r.title} by Action Electric`},{name:"twitter:image",content:ve(Mn)},{name:"twitter:image:alt",content:`${r.title} by Action Electric`},{name:"twitter:title",content:`${r.title} — Sioux Falls | Action Electric Company`},{name:"twitter:description",content:r.description}],links:[{rel:"canonical",href:ve(`/services/${t.slug}`)}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:r.title,description:r.description,provider:{"@type":"Electrician",name:"Action Electric Company"},areaServed:"Sioux Falls, SD"})}]}},component:Ot(eM,"component"),notFoundComponent:Ot(ZN,"notFoundComponent")}),nM=()=>jt(()=>import("./blog._slug-VY04wI7H.js"),__vite__mapDeps([24,17,23])),rM=()=>jt(()=>import("./blog._slug-C-i426EL.js"),[]),sM=()=>jt(()=>import("./blog._slug-Do0ELy-l.js"),[]),aM=yn("/blog/$slug")({loader:async({params:e})=>{const t=await HN({data:{slug:e.slug}});if(!t)throw Ob();return{post:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[]};const{post:r}=e;return{meta:[{title:`${r.title} — Action Electric`},{name:"description",content:r.excerpt},{name:"keywords",content:r.keywords.join(", ")},{property:"og:title",content:r.title},{property:"og:description",content:r.excerpt},{property:"og:type",content:"article"},{property:"og:image",content:ve(r.cover)},{property:"og:url",content:ve(`/blog/${t.slug}`)},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:ve(r.cover)},{name:"twitter:image:alt",content:r.title},{name:"twitter:title",content:r.title},{name:"twitter:description",content:r.excerpt}],links:[{rel:"canonical",href:ve(`/blog/${t.slug}`)}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:r.title,description:r.excerpt,image:r.cover,datePublished:r.dateISO,keywords:r.keywords.join(", "),articleSection:r.category,author:{"@type":"Organization",name:"Action Electric Company"},publisher:{"@type":"Organization",name:"Action Electric Company",logo:{"@type":"ImageObject",url:ge.logo}}})}]}},notFoundComponent:Ot(sM,"notFoundComponent"),errorComponent:Ot(rM,"errorComponent"),component:Ot(nM,"component")}),jw=xN.update({id:"/services",path:"/services",getParentRoute:()=>vn}),iM=AN.update({id:"/review",path:"/review",getParentRoute:()=>vn}),oM=CN.update({id:"/residential",path:"/residential",getParentRoute:()=>vn}),lM=kN.update({id:"/projects",path:"/projects",getParentRoute:()=>vn}),cM=MN.update({id:"/faq",path:"/faq",getParentRoute:()=>vn}),uM=LN.update({id:"/employment",path:"/employment",getParentRoute:()=>vn}),dM=zN.update({id:"/contact",path:"/contact",getParentRoute:()=>vn}),hM=BN.update({id:"/commercial",path:"/commercial",getParentRoute:()=>vn}),Nw=GN.update({id:"/blog",path:"/blog",getParentRoute:()=>vn}),fM=YN.update({id:"/about",path:"/about",getParentRoute:()=>vn}),pM=JN.update({id:"/",path:"/",getParentRoute:()=>vn}),mM=tM.update({id:"/$slug",path:"/$slug",getParentRoute:()=>jw}),gM=aM.update({id:"/$slug",path:"/$slug",getParentRoute:()=>Nw}),yM={BlogSlugRoute:gM},vM=Nw._addFileChildren(yM),bM={ServicesSlugRoute:mM},wM=jw._addFileChildren(bM),_M={IndexRoute:pM,AboutRoute:fM,BlogRoute:vM,CommercialRoute:hM,ContactRoute:dM,EmploymentRoute:uM,FaqRoute:cM,ProjectsRoute:lM,ResidentialRoute:oM,ReviewRoute:iM,ServicesRoute:wM},SM=vn._addFileChildren(_M),EM=()=>{const e=new Zk;return oR({routeTree:SM,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function xM(){const e=await EM();let t;if(Zv){const r=await Zv.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,t=r.serializationAdapters,e.options.defaultSsr=r.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};
55return t.push(cA),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await fA(e),e}async function TM(){const e=await xM();return window.$_TSR?.h(),e}var zh;function AM(){return zh||(zh=TM()),N.jsx(yA,{promise:zh,children:e=>N.jsx(uR,{router:e})})}re.startTransition(()=>{ZS.hydrateRoot(document,N.jsx(re.StrictMode,{children:N.jsx(AM,{})}))});export{c2 as A,NM as B,m2 as C,af as D,qn as E,jN as F,uw as G,Nk as H,Mk as I,sf as J,ow as K,Nn as L,T2 as M,Kk as N,zk as O,Lo as P,Vt as Q,te as R,ge as S,MM as T,DM as U,F2 as X,G2 as Z,XN as a,wf as b,yo as c,UM as d,bb as e,wb as f,pt as g,RM as h,Gt as i,N as j,Bj as k,R2 as l,_b as m,E2 as n,Pc as o,qN as p,Mn as q,re as r,tM as s,LM as t,kt as u,aM as v,IN as w,Xc as x,Hk as y,Dk as z};

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