tokentracker-cli 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.zh-CN.md +6 -4
- package/dashboard/dist/assets/Card-CTRPazyG.js +1 -0
- package/dashboard/dist/assets/DashboardPage-BJVPrOly.js +1 -0
- package/dashboard/dist/assets/FadeIn-NAG8xImb.js +1 -0
- package/dashboard/dist/assets/HeaderGithubStar-CwnC8N_4.js +1 -0
- package/dashboard/dist/assets/IpCheckPage-Bqz8OFmD.js +1 -0
- package/dashboard/dist/assets/LandingPage-Dz7yTDPI.js +4356 -0
- package/dashboard/dist/assets/LeaderboardPage-DX_tP5qi.js +5 -0
- package/dashboard/dist/assets/LeaderboardProfilePage-BI4R73XX.js +1 -0
- package/dashboard/dist/assets/LimitsPage-D15dhSFp.js +2 -0
- package/dashboard/dist/assets/LoginPage-CSWfDVcM.js +1 -0
- package/dashboard/dist/assets/NativeAuthCallbackPage-D6Stzae_.js +1 -0
- package/dashboard/dist/assets/PopoverPopup-DgTXWAeN.js +12 -0
- package/dashboard/dist/assets/ProviderIcon-CEhS41Kz.js +1 -0
- package/dashboard/dist/assets/SettingsPage-CaPVlEzU.js +1 -0
- package/dashboard/dist/assets/SkillsPage-CGH_F5Y0.js +1 -0
- package/dashboard/dist/assets/WidgetsPage-Cjad4Q71.js +1 -0
- package/dashboard/dist/assets/chevron-down-DGOV7_Uw.js +1 -0
- package/dashboard/dist/assets/download-DCjD_Xm9.js +1 -0
- package/dashboard/dist/assets/leaderboard-columns-BK2-Jp3k.js +1 -0
- package/dashboard/dist/assets/{main-B-qohcBn.css → main-Bnr_KT_S.css} +1 -1
- package/dashboard/dist/assets/main-DTrs3jUq.js +612 -0
- package/dashboard/dist/assets/use-limits-display-prefs-rF66WvRU.js +1 -0
- package/dashboard/dist/assets/use-native-settings-DK8RelvO.js +1 -0
- package/dashboard/dist/assets/use-reduced-motion-BsYZLRkk.js +1 -0
- package/dashboard/dist/assets/use-usage-limits-jLzoEy77.js +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +1 -1
- package/src/lib/local-api.js +5 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/main-DAAixEqh.js +0 -4982
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-BJVPrOly.js","assets/use-usage-limits-jLzoEy77.js","assets/PopoverPopup-DgTXWAeN.js","assets/Card-CTRPazyG.js","assets/use-reduced-motion-BsYZLRkk.js","assets/ProviderIcon-CEhS41Kz.js","assets/FadeIn-NAG8xImb.js","assets/LandingPage-Dz7yTDPI.js","assets/HeaderGithubStar-CwnC8N_4.js","assets/LeaderboardPage-DX_tP5qi.js","assets/leaderboard-columns-BK2-Jp3k.js","assets/chevron-down-DGOV7_Uw.js","assets/LeaderboardProfilePage-BI4R73XX.js","assets/LimitsPage-D15dhSFp.js","assets/use-limits-display-prefs-rF66WvRU.js","assets/SettingsPage-CaPVlEzU.js","assets/use-native-settings-DK8RelvO.js","assets/download-DCjD_Xm9.js","assets/SkillsPage-CGH_F5Y0.js","assets/WidgetsPage-Cjad4Q71.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function rP(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(a,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function vb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aP(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var s=!1;try{s=this instanceof a}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),n}var sh={exports:{}},lo={},oh={exports:{}},Ze={};var Sy;function iP(){if(Sy)return Ze;Sy=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,T={};function P(N,q,xe){this.props=N,this.context=q,this.refs=T,this.updater=xe||w}P.prototype.isReactComponent={},P.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,q,"setState")},P.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=P.prototype;function D(N,q,xe){this.props=N,this.context=q,this.refs=T,this.updater=xe||w}var M=D.prototype=new L;M.constructor=D,x(M,P.prototype),M.isPureReactComponent=!0;var I=Array.isArray,K=Object.prototype.hasOwnProperty,G={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function S(N,q,xe){var Ae,Se={},Ce=null,qe=null;if(q!=null)for(Ae in q.ref!==void 0&&(qe=q.ref),q.key!==void 0&&(Ce=""+q.key),q)K.call(q,Ae)&&!W.hasOwnProperty(Ae)&&(Se[Ae]=q[Ae]);var Xe=arguments.length-2;if(Xe===1)Se.children=xe;else if(1<Xe){for(var Ue=Array(Xe),jt=0;jt<Xe;jt++)Ue[jt]=arguments[jt+2];Se.children=Ue}if(N&&N.defaultProps)for(Ae in Xe=N.defaultProps,Xe)Se[Ae]===void 0&&(Se[Ae]=Xe[Ae]);return{$$typeof:e,type:N,key:Ce,ref:qe,props:Se,_owner:G.current}}function Z(N,q){return{$$typeof:e,type:N.type,key:q,ref:N.ref,props:N.props,_owner:N._owner}}function X(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function _e(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(xe){return q[xe]})}var oe=/\/+/g;function Re(N,q){return typeof N=="object"&&N!==null&&N.key!=null?_e(""+N.key):q.toString(36)}function fe(N,q,xe,Ae,Se){var Ce=typeof N;(Ce==="undefined"||Ce==="boolean")&&(N=null);var qe=!1;if(N===null)qe=!0;else switch(Ce){case"string":case"number":qe=!0;break;case"object":switch(N.$$typeof){case e:case t:qe=!0}}if(qe)return qe=N,Se=Se(qe),N=Ae===""?"."+Re(qe,0):Ae,I(Se)?(xe="",N!=null&&(xe=N.replace(oe,"$&/")+"/"),fe(Se,q,xe,"",function(jt){return jt})):Se!=null&&(X(Se)&&(Se=Z(Se,xe+(!Se.key||qe&&qe.key===Se.key?"":(""+Se.key).replace(oe,"$&/")+"/")+N)),q.push(Se)),1;if(qe=0,Ae=Ae===""?".":Ae+":",I(N))for(var Xe=0;Xe<N.length;Xe++){Ce=N[Xe];var Ue=Ae+Re(Ce,Xe);qe+=fe(Ce,q,xe,Ue,Se)}else if(Ue=b(N),typeof Ue=="function")for(N=Ue.call(N),Xe=0;!(Ce=N.next()).done;)Ce=Ce.value,Ue=Ae+Re(Ce,Xe++),qe+=fe(Ce,q,xe,Ue,Se);else if(Ce==="object")throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return qe}function ce(N,q,xe){if(N==null)return N;var Ae=[],Se=0;return fe(N,Ae,"","",function(Ce){return q.call(xe,Ce,Se++)}),Ae}function ue(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(xe){(N._status===0||N._status===-1)&&(N._status=1,N._result=xe)},function(xe){(N._status===0||N._status===-1)&&(N._status=2,N._result=xe)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var Me={current:null},H={transition:null},Y={ReactCurrentDispatcher:Me,ReactCurrentBatchConfig:H,ReactCurrentOwner:G};function $(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:ce,forEach:function(N,q,xe){ce(N,function(){q.apply(this,arguments)},xe)},count:function(N){var q=0;return ce(N,function(){q++}),q},toArray:function(N){return ce(N,function(q){return q})||[]},only:function(N){if(!X(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ze.Component=P,Ze.Fragment=n,Ze.Profiler=s,Ze.PureComponent=D,Ze.StrictMode=a,Ze.Suspense=h,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Ze.act=$,Ze.cloneElement=function(N,q,xe){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var Ae=x({},N.props),Se=N.key,Ce=N.ref,qe=N._owner;if(q!=null){if(q.ref!==void 0&&(Ce=q.ref,qe=G.current),q.key!==void 0&&(Se=""+q.key),N.type&&N.type.defaultProps)var Xe=N.type.defaultProps;for(Ue in q)K.call(q,Ue)&&!W.hasOwnProperty(Ue)&&(Ae[Ue]=q[Ue]===void 0&&Xe!==void 0?Xe[Ue]:q[Ue])}var Ue=arguments.length-2;if(Ue===1)Ae.children=xe;else if(1<Ue){Xe=Array(Ue);for(var jt=0;jt<Ue;jt++)Xe[jt]=arguments[jt+2];Ae.children=Xe}return{$$typeof:e,type:N.type,key:Se,ref:Ce,props:Ae,_owner:qe}},Ze.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:o,_context:N},N.Consumer=N},Ze.createElement=S,Ze.createFactory=function(N){var q=S.bind(null,N);return q.type=N,q},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(N){return{$$typeof:c,render:N}},Ze.isValidElement=X,Ze.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:ue}},Ze.memo=function(N,q){return{$$typeof:f,type:N,compare:q===void 0?null:q}},Ze.startTransition=function(N){var q=H.transition;H.transition={};try{N()}finally{H.transition=q}},Ze.unstable_act=$,Ze.useCallback=function(N,q){return Me.current.useCallback(N,q)},Ze.useContext=function(N){return Me.current.useContext(N)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(N){return Me.current.useDeferredValue(N)},Ze.useEffect=function(N,q){return Me.current.useEffect(N,q)},Ze.useId=function(){return Me.current.useId()},Ze.useImperativeHandle=function(N,q,xe){return Me.current.useImperativeHandle(N,q,xe)},Ze.useInsertionEffect=function(N,q){return Me.current.useInsertionEffect(N,q)},Ze.useLayoutEffect=function(N,q){return Me.current.useLayoutEffect(N,q)},Ze.useMemo=function(N,q){return Me.current.useMemo(N,q)},Ze.useReducer=function(N,q,xe){return Me.current.useReducer(N,q,xe)},Ze.useRef=function(N){return Me.current.useRef(N)},Ze.useState=function(N){return Me.current.useState(N)},Ze.useSyncExternalStore=function(N,q,xe){return Me.current.useSyncExternalStore(N,q,xe)},Ze.useTransition=function(){return Me.current.useTransition()},Ze.version="18.3.1",Ze}var Py;function Vf(){return Py||(Py=1,oh.exports=iP()),oh.exports}var Ty;function sP(){if(Ty)return lo;Ty=1;var e=Vf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,h,f){var m,y={},b=null,w=null;f!==void 0&&(b=""+f),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(w=h.ref);for(m in h)a.call(h,m)&&!o.hasOwnProperty(m)&&(y[m]=h[m]);if(c&&c.defaultProps)for(m in h=c.defaultProps,h)y[m]===void 0&&(y[m]=h[m]);return{$$typeof:t,type:c,key:b,ref:w,props:y,_owner:s.current}}return lo.Fragment=n,lo.jsx=u,lo.jsxs=u,lo}var Cy;function oP(){return Cy||(Cy=1,sh.exports=sP()),sh.exports}var U=oP(),k=Vf();const zf=vb(k),lP=rP({__proto__:null,default:zf},[k]);var nu={},lh={exports:{}},yn={},uh={exports:{}},ch={};var Ey;function uP(){return Ey||(Ey=1,(function(e){function t(H,Y){var $=H.length;H.push(Y);e:for(;0<$;){var N=$-1>>>1,q=H[N];if(0<s(q,Y))H[N]=Y,H[$]=q,$=N;else break e}}function n(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var Y=H[0],$=H.pop();if($!==Y){H[0]=$;e:for(var N=0,q=H.length,xe=q>>>1;N<xe;){var Ae=2*(N+1)-1,Se=H[Ae],Ce=Ae+1,qe=H[Ce];if(0>s(Se,$))Ce<q&&0>s(qe,Se)?(H[N]=qe,H[Ce]=$,N=Ce):(H[N]=Se,H[Ae]=$,N=Ae);else if(Ce<q&&0>s(qe,$))H[N]=qe,H[Ce]=$,N=Ce;else break e}}return Y}function s(H,Y){var $=H.sortIndex-Y.sortIndex;return $!==0?$:H.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var h=[],f=[],m=1,y=null,b=3,w=!1,x=!1,T=!1,P=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(H){for(var Y=n(f);Y!==null;){if(Y.callback===null)a(f);else if(Y.startTime<=H)a(f),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=n(f)}}function I(H){if(T=!1,M(H),!x)if(n(h)!==null)x=!0,ue(K);else{var Y=n(f);Y!==null&&Me(I,Y.startTime-H)}}function K(H,Y){x=!1,T&&(T=!1,L(S),S=-1),w=!0;var $=b;try{for(M(Y),y=n(h);y!==null&&(!(y.expirationTime>Y)||H&&!_e());){var N=y.callback;if(typeof N=="function"){y.callback=null,b=y.priorityLevel;var q=N(y.expirationTime<=Y);Y=e.unstable_now(),typeof q=="function"?y.callback=q:y===n(h)&&a(h),M(Y)}else a(h);y=n(h)}if(y!==null)var xe=!0;else{var Ae=n(f);Ae!==null&&Me(I,Ae.startTime-Y),xe=!1}return xe}finally{y=null,b=$,w=!1}}var G=!1,W=null,S=-1,Z=5,X=-1;function _e(){return!(e.unstable_now()-X<Z)}function oe(){if(W!==null){var H=e.unstable_now();X=H;var Y=!0;try{Y=W(!0,H)}finally{Y?Re():(G=!1,W=null)}}else G=!1}var Re;if(typeof D=="function")Re=function(){D(oe)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ce=fe.port2;fe.port1.onmessage=oe,Re=function(){ce.postMessage(null)}}else Re=function(){P(oe,0)};function ue(H){W=H,G||(G=!0,Re())}function Me(H,Y){S=P(function(){H(e.unstable_now())},Y)}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(H){H.callback=null},e.unstable_continueExecution=function(){x||w||(x=!0,ue(K))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(H){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var $=b;b=Y;try{return H()}finally{b=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,Y){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var $=b;b=H;try{return Y()}finally{b=$}},e.unstable_scheduleCallback=function(H,Y,$){var N=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?N+$:N):$=N,H){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,H={id:m++,callback:Y,priorityLevel:H,startTime:$,expirationTime:q,sortIndex:-1},$>N?(H.sortIndex=$,t(f,H),n(h)===null&&H===n(f)&&(T?(L(S),S=-1):T=!0,Me(I,$-N))):(H.sortIndex=q,t(h,H),x||w||(x=!0,ue(K))),H},e.unstable_shouldYield=_e,e.unstable_wrapCallback=function(H){var Y=b;return function(){var $=b;b=Y;try{return H.apply(this,arguments)}finally{b=$}}}})(ch)),ch}var Ry;function cP(){return Ry||(Ry=1,uh.exports=uP()),uh.exports}var Ay;function dP(){if(Ay)return yn;Ay=1;var e=Vf(),t=cP();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,l=1;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function o(r,i){u(r,i),u(r+"Capture",i)}function u(r,i){for(s[r]=i,r=0;r<i.length;r++)a.add(i[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function b(r){return h.call(y,r)?!0:h.call(m,r)?!1:f.test(r)?y[r]=!0:(m[r]=!0,!1)}function w(r,i,l,d){if(l!==null&&l.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return d?!1:l!==null?!l.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function x(r,i,l,d){if(i===null||typeof i>"u"||w(r,i,l,d))return!0;if(d)return!1;if(l!==null)switch(l.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function T(r,i,l,d,p,g,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=p,this.mustUseProperty=l,this.propertyName=r,this.type=i,this.sanitizeURL=g,this.removeEmptyString=_}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){P[r]=new T(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];P[i]=new T(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){P[r]=new T(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){P[r]=new T(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){P[r]=new T(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){P[r]=new T(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){P[r]=new T(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){P[r]=new T(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){P[r]=new T(r,5,!1,r.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function D(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(L,D);P[i]=new T(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(L,D);P[i]=new T(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(L,D);P[i]=new T(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){P[r]=new T(r,1,!1,r.toLowerCase(),null,!1,!1)}),P.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){P[r]=new T(r,1,!1,r.toLowerCase(),null,!0,!0)});function M(r,i,l,d){var p=P.hasOwnProperty(i)?P[i]:null;(p!==null?p.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(x(i,l,p,d)&&(l=null),d||p===null?b(i)&&(l===null?r.removeAttribute(i):r.setAttribute(i,""+l)):p.mustUseProperty?r[p.propertyName]=l===null?p.type===3?!1:"":l:(i=p.attributeName,d=p.attributeNamespace,l===null?r.removeAttribute(i):(p=p.type,l=p===3||p===4&&l===!0?"":""+l,d?r.setAttributeNS(d,i,l):r.setAttribute(i,l))))}var I=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,K=Symbol.for("react.element"),G=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),_e=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),Re=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),Me=Symbol.for("react.offscreen"),H=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=H&&r[H]||r["@@iterator"],typeof r=="function"?r:null)}var $=Object.assign,N;function q(r){if(N===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);N=i&&i[1]||""}return`
|
|
3
|
+
`+N+r}var xe=!1;function Ae(r,i){if(!r||xe)return"";xe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(z){var d=z}Reflect.construct(r,[],i)}else{try{i.call()}catch(z){d=z}r.call(i.prototype)}else{try{throw Error()}catch(z){d=z}r()}}catch(z){if(z&&d&&typeof z.stack=="string"){for(var p=z.stack.split(`
|
|
4
|
+
`),g=d.stack.split(`
|
|
5
|
+
`),_=p.length-1,E=g.length-1;1<=_&&0<=E&&p[_]!==g[E];)E--;for(;1<=_&&0<=E;_--,E--)if(p[_]!==g[E]){if(_!==1||E!==1)do if(_--,E--,0>E||p[_]!==g[E]){var A=`
|
|
6
|
+
`+p[_].replace(" at new "," at ");return r.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",r.displayName)),A}while(1<=_&&0<=E);break}}}finally{xe=!1,Error.prepareStackTrace=l}return(r=r?r.displayName||r.name:"")?q(r):""}function Se(r){switch(r.tag){case 5:return q(r.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return r=Ae(r.type,!1),r;case 11:return r=Ae(r.type.render,!1),r;case 1:return r=Ae(r.type,!0),r;default:return""}}function Ce(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case W:return"Fragment";case G:return"Portal";case Z:return"Profiler";case S:return"StrictMode";case Re:return"Suspense";case fe:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case _e:return(r.displayName||"Context")+".Consumer";case X:return(r._context.displayName||"Context")+".Provider";case oe:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ce:return i=r.displayName||null,i!==null?i:Ce(r.type)||"Memo";case ue:i=r._payload,r=r._init;try{return Ce(r(i))}catch{}}return null}function qe(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ce(i);case 8:return i===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Xe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ue(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function jt(r){var i=Ue(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),d=""+r[i];if(!r.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,g=l.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(_){d=""+_,g.call(this,_)}}),Object.defineProperty(r,i,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(_){d=""+_},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function $n(r){r._valueTracker||(r._valueTracker=jt(r))}function Tr(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),d="";return r&&(d=Ue(r)?r.checked?"true":"false":r.value),r=d,r!==l?(i.setValue(r),!0):!1}function pt(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function en(r,i){var l=i.checked;return $({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??r._wrapperState.initialChecked})}function ks(r,i){var l=i.defaultValue==null?"":i.defaultValue,d=i.checked!=null?i.checked:i.defaultChecked;l=Xe(i.value!=null?i.value:l),r._wrapperState={initialChecked:d,initialValue:l,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Yo(r,i){i=i.checked,i!=null&&M(r,"checked",i,!1)}function Hn(r,i){Yo(r,i);var l=Xe(i.value),d=i.type;if(l!=null)d==="number"?(l===0&&r.value===""||r.value!=l)&&(r.value=""+l):r.value!==""+l&&(r.value=""+l);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?xs(r,i.type,l):i.hasOwnProperty("defaultValue")&&xs(r,i.type,Xe(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function Zo(r,i,l){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var d=i.type;if(!(d!=="submit"&&d!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,l||i===r.value||(r.value=i),r.defaultValue=i}l=r.name,l!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,l!==""&&(r.name=l)}function xs(r,i,l){(i!=="number"||pt(r.ownerDocument)!==r)&&(l==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+l&&(r.defaultValue=""+l))}var qr=Array.isArray;function Gr(r,i,l,d){if(r=r.options,i){i={};for(var p=0;p<l.length;p++)i["$"+l[p]]=!0;for(l=0;l<r.length;l++)p=i.hasOwnProperty("$"+r[l].value),r[l].selected!==p&&(r[l].selected=p),p&&d&&(r[l].defaultSelected=!0)}else{for(l=""+Xe(l),i=null,p=0;p<r.length;p++){if(r[p].value===l){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function Ss(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return $({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Qo(r,i){var l=i.value;if(l==null){if(l=i.children,i=i.defaultValue,l!=null){if(i!=null)throw Error(n(92));if(qr(l)){if(1<l.length)throw Error(n(93));l=l[0]}i=l}i==null&&(i=""),l=i}r._wrapperState={initialValue:Xe(l)}}function Xo(r,i){var l=Xe(i.value),d=Xe(i.defaultValue);l!=null&&(l=""+l,l!==r.value&&(r.value=l),i.defaultValue==null&&r.defaultValue!==l&&(r.defaultValue=l)),d!=null&&(r.defaultValue=""+d)}function or(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function Yr(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function yi(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?Yr(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Zr,Tn=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,l,d,p){MSApp.execUnsafeLocalFunction(function(){return r(i,l,d,p)})}:r})(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(Zr=Zr||document.createElement("div"),Zr.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Zr.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function tn(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var Qr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Tc=["Webkit","ms","Moz","O"];Object.keys(Qr).forEach(function(r){Tc.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Qr[i]=Qr[r]})});function vi(r,i,l){return i==null||typeof i=="boolean"||i===""?"":l||typeof i!="number"||i===0||Qr.hasOwnProperty(r)&&Qr[r]?(""+i).trim():i+"px"}function Jo(r,i){r=r.style;for(var l in i)if(i.hasOwnProperty(l)){var d=l.indexOf("--")===0,p=vi(l,i[l],d);l==="float"&&(l="cssFloat"),d?r.setProperty(l,p):r[l]=p}}var Wn=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bi(r,i){if(i){if(Wn[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function _i(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){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 wi=null;function Ps(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ki=null,Kn=null,Cr=null;function xi(r){if(r=qs(r)){if(typeof ki!="function")throw Error(n(280));var i=r.stateNode;i&&(i=yl(i),ki(r.stateNode,r.type,i))}}function el(r){Kn?Cr?Cr.push(r):Cr=[r]:Kn=r}function Ts(){if(Kn){var r=Kn,i=Cr;if(Cr=Kn=null,xi(r),i)for(r=0;r<i.length;r++)xi(i[r])}}function tl(r,i){return r(i)}function Cs(){}var Xr=!1;function Ua(r,i,l){if(Xr)return r(i,l);Xr=!0;try{return tl(r,i,l)}finally{Xr=!1,(Kn!==null||Cr!==null)&&(Cs(),Ts())}}function Jr(r,i){var l=r.stateNode;if(l===null)return null;var d=yl(l);if(d===null)return null;l=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(n(231,i,typeof l));return l}var Es=!1;if(c)try{var Ba={};Object.defineProperty(Ba,"passive",{get:function(){Es=!0}}),window.addEventListener("test",Ba,Ba),window.removeEventListener("test",Ba,Ba)}catch{Es=!1}function R(r,i,l,d,p,g,_,E,A){var z=Array.prototype.slice.call(arguments,3);try{i.apply(l,z)}catch(ee){this.onError(ee)}}var j=!1,V=null,te=!1,ae=null,Ee={onError:function(r){j=!0,V=r}};function pe(r,i,l,d,p,g,_,E,A){j=!1,V=null,R.apply(Ee,arguments)}function De(r,i,l,d,p,g,_,E,A){if(pe.apply(this,arguments),j){if(j){var z=V;j=!1,V=null}else throw Error(n(198));te||(te=!0,ae=z)}}function he(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function Ne(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function Oe(r){if(he(r)!==r)throw Error(n(188))}function Le(r){var i=r.alternate;if(!i){if(i=he(r),i===null)throw Error(n(188));return i!==r?null:r}for(var l=r,d=i;;){var p=l.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){l=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===l)return Oe(p),r;if(g===d)return Oe(p),i;g=g.sibling}throw Error(n(188))}if(l.return!==d.return)l=p,d=g;else{for(var _=!1,E=p.child;E;){if(E===l){_=!0,l=p,d=g;break}if(E===d){_=!0,d=p,l=g;break}E=E.sibling}if(!_){for(E=g.child;E;){if(E===l){_=!0,l=g,d=p;break}if(E===d){_=!0,d=g,l=p;break}E=E.sibling}if(!_)throw Error(n(189))}}if(l.alternate!==d)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?r:i}function st(r){return r=Le(r),r!==null?et(r):null}function et(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=et(r);if(i!==null)return i;r=r.sibling}return null}var ht=t.unstable_scheduleCallback,Pt=t.unstable_cancelCallback,$t=t.unstable_shouldYield,lt=t.unstable_requestPaint,rt=t.unstable_now,Er=t.unstable_getCurrentPriorityLevel,Rr=t.unstable_ImmediatePriority,qn=t.unstable_UserBlockingPriority,nn=t.unstable_NormalPriority,Rs=t.unstable_LowPriority,ea=t.unstable_IdlePriority,Cn=null,rn=null;function Si(r){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Cn,r,void 0,(r.current.flags&128)===128)}catch{}}var $e=Math.clz32?Math.clz32:Ar,Ut=Math.log,ta=Math.LN2;function Ar(r){return r>>>=0,r===0?32:31-(Ut(r)/ta|0)|0}var ct=64,Lr=4194304;function na(r){switch(r&-r){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Pi(r,i){var l=r.pendingLanes;if(l===0)return 0;var d=0,p=r.suspendedLanes,g=r.pingedLanes,_=l&268435455;if(_!==0){var E=_&~p;E!==0?d=na(E):(g&=_,g!==0&&(d=na(g)))}else _=l&~p,_!==0?d=na(_):g!==0&&(d=na(g));if(d===0)return 0;if(i!==0&&i!==d&&(i&p)===0&&(p=d&-d,g=i&-i,p>=g||p===16&&(g&4194240)!==0))return i;if((d&4)!==0&&(d|=l&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=d;0<i;)l=31-$e(i),p=1<<l,d|=r[l],i&=~p;return d}function kx(r,i){switch(r){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64: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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xx(r,i){for(var l=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes;0<g;){var _=31-$e(g),E=1<<_,A=p[_];A===-1?((E&l)===0||(E&d)!==0)&&(p[_]=kx(E,i)):A<=i&&(r.expiredLanes|=E),g&=~E}}function Cc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function tm(){var r=ct;return ct<<=1,(ct&4194240)===0&&(ct=64),r}function Ec(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function As(r,i,l){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-$e(i),r[i]=l}function Sx(r,i){var l=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<l;){var p=31-$e(l),g=1<<p;i[p]=0,d[p]=-1,r[p]=-1,l&=~g}}function Rc(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var d=31-$e(l),p=1<<d;p&i|r[d]&i&&(r[d]|=i),l&=~p}}var ut=0;function nm(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var rm,Ac,am,im,sm,Lc=!1,nl=[],ra=null,aa=null,ia=null,Ls=new Map,Ds=new Map,sa=[],Px="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 submit".split(" ");function om(r,i){switch(r){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":ia=null;break;case"pointerover":case"pointerout":Ls.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(i.pointerId)}}function Ms(r,i,l,d,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:i,domEventName:l,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},i!==null&&(i=qs(i),i!==null&&Ac(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function Tx(r,i,l,d,p){switch(i){case"focusin":return ra=Ms(ra,r,i,l,d,p),!0;case"dragenter":return aa=Ms(aa,r,i,l,d,p),!0;case"mouseover":return ia=Ms(ia,r,i,l,d,p),!0;case"pointerover":var g=p.pointerId;return Ls.set(g,Ms(Ls.get(g)||null,r,i,l,d,p)),!0;case"gotpointercapture":return g=p.pointerId,Ds.set(g,Ms(Ds.get(g)||null,r,i,l,d,p)),!0}return!1}function lm(r){var i=Fa(r.target);if(i!==null){var l=he(i);if(l!==null){if(i=l.tag,i===13){if(i=Ne(l),i!==null){r.blockedOn=i,sm(r.priority,function(){am(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function rl(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=Mc(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(l===null){l=r.nativeEvent;var d=new l.constructor(l.type,l);wi=d,l.target.dispatchEvent(d),wi=null}else return i=qs(l),i!==null&&Ac(i),r.blockedOn=l,!1;i.shift()}return!0}function um(r,i,l){rl(r)&&l.delete(i)}function Cx(){Lc=!1,ra!==null&&rl(ra)&&(ra=null),aa!==null&&rl(aa)&&(aa=null),ia!==null&&rl(ia)&&(ia=null),Ls.forEach(um),Ds.forEach(um)}function Ns(r,i){r.blockedOn===i&&(r.blockedOn=null,Lc||(Lc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Cx)))}function Os(r){function i(p){return Ns(p,r)}if(0<nl.length){Ns(nl[0],r);for(var l=1;l<nl.length;l++){var d=nl[l];d.blockedOn===r&&(d.blockedOn=null)}}for(ra!==null&&Ns(ra,r),aa!==null&&Ns(aa,r),ia!==null&&Ns(ia,r),Ls.forEach(i),Ds.forEach(i),l=0;l<sa.length;l++)d=sa[l],d.blockedOn===r&&(d.blockedOn=null);for(;0<sa.length&&(l=sa[0],l.blockedOn===null);)lm(l),l.blockedOn===null&&sa.shift()}var Ti=I.ReactCurrentBatchConfig,al=!0;function Ex(r,i,l,d){var p=ut,g=Ti.transition;Ti.transition=null;try{ut=1,Dc(r,i,l,d)}finally{ut=p,Ti.transition=g}}function Rx(r,i,l,d){var p=ut,g=Ti.transition;Ti.transition=null;try{ut=4,Dc(r,i,l,d)}finally{ut=p,Ti.transition=g}}function Dc(r,i,l,d){if(al){var p=Mc(r,i,l,d);if(p===null)Zc(r,i,d,il,l),om(r,d);else if(Tx(p,r,i,l,d))d.stopPropagation();else if(om(r,d),i&4&&-1<Px.indexOf(r)){for(;p!==null;){var g=qs(p);if(g!==null&&rm(g),g=Mc(r,i,l,d),g===null&&Zc(r,i,d,il,l),g===p)break;p=g}p!==null&&d.stopPropagation()}else Zc(r,i,d,null,l)}}var il=null;function Mc(r,i,l,d){if(il=null,r=Ps(d),r=Fa(r),r!==null)if(i=he(r),i===null)r=null;else if(l=i.tag,l===13){if(r=Ne(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return il=r,null}function cm(r){switch(r){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Er()){case Rr:return 1;case qn:return 4;case nn:case Rs:return 16;case ea:return 536870912;default:return 16}default:return 16}}var oa=null,Nc=null,sl=null;function dm(){if(sl)return sl;var r,i=Nc,l=i.length,d,p="value"in oa?oa.value:oa.textContent,g=p.length;for(r=0;r<l&&i[r]===p[r];r++);var _=l-r;for(d=1;d<=_&&i[l-d]===p[g-d];d++);return sl=p.slice(r,1<d?1-d:void 0)}function ol(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function ll(){return!0}function hm(){return!1}function vn(r){function i(l,d,p,g,_){this._reactName=l,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var E in r)r.hasOwnProperty(E)&&(l=r[E],this[E]=l?l(g):g[E]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?ll:hm,this.isPropagationStopped=hm,this}return $(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),i}var Ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Oc=vn(Ci),Is=$({},Ci,{view:0,detail:0}),Ax=vn(Is),Ic,jc,js,ul=$({},Is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==js&&(js&&r.type==="mousemove"?(Ic=r.screenX-js.screenX,jc=r.screenY-js.screenY):jc=Ic=0,js=r),Ic)},movementY:function(r){return"movementY"in r?r.movementY:jc}}),fm=vn(ul),Lx=$({},ul,{dataTransfer:0}),Dx=vn(Lx),Mx=$({},Is,{relatedTarget:0}),Uc=vn(Mx),Nx=$({},Ci,{animationName:0,elapsedTime:0,pseudoElement:0}),Ox=vn(Nx),Ix=$({},Ci,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),jx=vn(Ix),Ux=$({},Ci,{data:0}),pm=vn(Ux),Bx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fx={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"},Vx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zx(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=Vx[r])?!!i[r]:!1}function Bc(){return zx}var $x=$({},Is,{key:function(r){if(r.key){var i=Bx[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=ol(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Fx[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bc,charCode:function(r){return r.type==="keypress"?ol(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ol(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Hx=vn($x),Wx=$({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mm=vn(Wx),Kx=$({},Is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bc}),qx=vn(Kx),Gx=$({},Ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yx=vn(Gx),Zx=$({},ul,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Qx=vn(Zx),Xx=[9,13,27,32],Fc=c&&"CompositionEvent"in window,Us=null;c&&"documentMode"in document&&(Us=document.documentMode);var Jx=c&&"TextEvent"in window&&!Us,gm=c&&(!Fc||Us&&8<Us&&11>=Us),ym=" ",vm=!1;function bm(r,i){switch(r){case"keyup":return Xx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _m(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ei=!1;function eS(r,i){switch(r){case"compositionend":return _m(i);case"keypress":return i.which!==32?null:(vm=!0,ym);case"textInput":return r=i.data,r===ym&&vm?null:r;default:return null}}function tS(r,i){if(Ei)return r==="compositionend"||!Fc&&bm(r,i)?(r=dm(),sl=Nc=oa=null,Ei=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return gm&&i.locale!=="ko"?null:i.data;default:return null}}var nS={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 wm(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!nS[r.type]:i==="textarea"}function km(r,i,l,d){el(d),i=pl(i,"onChange"),0<i.length&&(l=new Oc("onChange","change",null,l,d),r.push({event:l,listeners:i}))}var Bs=null,Fs=null;function rS(r){Fm(r,0)}function cl(r){var i=Mi(r);if(Tr(i))return r}function aS(r,i){if(r==="change")return i}var xm=!1;if(c){var Vc;if(c){var zc="oninput"in document;if(!zc){var Sm=document.createElement("div");Sm.setAttribute("oninput","return;"),zc=typeof Sm.oninput=="function"}Vc=zc}else Vc=!1;xm=Vc&&(!document.documentMode||9<document.documentMode)}function Pm(){Bs&&(Bs.detachEvent("onpropertychange",Tm),Fs=Bs=null)}function Tm(r){if(r.propertyName==="value"&&cl(Fs)){var i=[];km(i,Fs,r,Ps(r)),Ua(rS,i)}}function iS(r,i,l){r==="focusin"?(Pm(),Bs=i,Fs=l,Bs.attachEvent("onpropertychange",Tm)):r==="focusout"&&Pm()}function sS(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return cl(Fs)}function oS(r,i){if(r==="click")return cl(i)}function lS(r,i){if(r==="input"||r==="change")return cl(i)}function uS(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Gn=typeof Object.is=="function"?Object.is:uS;function Vs(r,i){if(Gn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),d=Object.keys(i);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var p=l[d];if(!h.call(i,p)||!Gn(r[p],i[p]))return!1}return!0}function Cm(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Em(r,i){var l=Cm(r);r=0;for(var d;l;){if(l.nodeType===3){if(d=r+l.textContent.length,r<=i&&d>=i)return{node:l,offset:i-r};r=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Cm(l)}}function Rm(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Rm(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Am(){for(var r=window,i=pt();i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=pt(r.document)}return i}function $c(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function cS(r){var i=Am(),l=r.focusedElem,d=r.selectionRange;if(i!==l&&l&&l.ownerDocument&&Rm(l.ownerDocument.documentElement,l)){if(d!==null&&$c(l)){if(i=d.start,r=d.end,r===void 0&&(r=i),"selectionStart"in l)l.selectionStart=i,l.selectionEnd=Math.min(r,l.value.length);else if(r=(i=l.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var p=l.textContent.length,g=Math.min(d.start,p);d=d.end===void 0?g:Math.min(d.end,p),!r.extend&&g>d&&(p=d,d=g,g=p),p=Em(l,g);var _=Em(l,d);p&&_&&(r.rangeCount!==1||r.anchorNode!==p.node||r.anchorOffset!==p.offset||r.focusNode!==_.node||r.focusOffset!==_.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),r.removeAllRanges(),g>d?(r.addRange(i),r.extend(_.node,_.offset)):(i.setEnd(_.node,_.offset),r.addRange(i)))}}for(i=[],r=l;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<i.length;l++)r=i[l],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var dS=c&&"documentMode"in document&&11>=document.documentMode,Ri=null,Hc=null,zs=null,Wc=!1;function Lm(r,i,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Wc||Ri==null||Ri!==pt(d)||(d=Ri,"selectionStart"in d&&$c(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),zs&&Vs(zs,d)||(zs=d,d=pl(Hc,"onSelect"),0<d.length&&(i=new Oc("onSelect","select",null,i,l),r.push({event:i,listeners:d}),i.target=Ri)))}function dl(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}var Ai={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionend:dl("Transition","TransitionEnd")},Kc={},Dm={};c&&(Dm=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);function hl(r){if(Kc[r])return Kc[r];if(!Ai[r])return r;var i=Ai[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in Dm)return Kc[r]=i[l];return r}var Mm=hl("animationend"),Nm=hl("animationiteration"),Om=hl("animationstart"),Im=hl("transitionend"),jm=new Map,Um="abort auxClick 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(" ");function la(r,i){jm.set(r,i),o(i,[r])}for(var qc=0;qc<Um.length;qc++){var Gc=Um[qc],hS=Gc.toLowerCase(),fS=Gc[0].toUpperCase()+Gc.slice(1);la(hS,"on"+fS)}la(Mm,"onAnimationEnd"),la(Nm,"onAnimationIteration"),la(Om,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(Im,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $s="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(" "),pS=new Set("cancel close invalid load scroll toggle".split(" ").concat($s));function Bm(r,i,l){var d=r.type||"unknown-event";r.currentTarget=l,De(d,i,void 0,r),r.currentTarget=null}function Fm(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var d=r[l],p=d.event;d=d.listeners;e:{var g=void 0;if(i)for(var _=d.length-1;0<=_;_--){var E=d[_],A=E.instance,z=E.currentTarget;if(E=E.listener,A!==g&&p.isPropagationStopped())break e;Bm(p,E,z),g=A}else for(_=0;_<d.length;_++){if(E=d[_],A=E.instance,z=E.currentTarget,E=E.listener,A!==g&&p.isPropagationStopped())break e;Bm(p,E,z),g=A}}}if(te)throw r=ae,te=!1,ae=null,r}function mt(r,i){var l=i[nd];l===void 0&&(l=i[nd]=new Set);var d=r+"__bubble";l.has(d)||(Vm(i,r,2,!1),l.add(d))}function Yc(r,i,l){var d=0;i&&(d|=4),Vm(l,r,d,i)}var fl="_reactListening"+Math.random().toString(36).slice(2);function Hs(r){if(!r[fl]){r[fl]=!0,a.forEach(function(l){l!=="selectionchange"&&(pS.has(l)||Yc(l,!1,r),Yc(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[fl]||(i[fl]=!0,Yc("selectionchange",!1,i))}}function Vm(r,i,l,d){switch(cm(i)){case 1:var p=Ex;break;case 4:p=Rx;break;default:p=Dc}l=p.bind(null,i,l,r),p=void 0,!Es||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(i,l,{capture:!0,passive:p}):r.addEventListener(i,l,!0):p!==void 0?r.addEventListener(i,l,{passive:p}):r.addEventListener(i,l,!1)}function Zc(r,i,l,d,p){var g=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var _=d.tag;if(_===3||_===4){var E=d.stateNode.containerInfo;if(E===p||E.nodeType===8&&E.parentNode===p)break;if(_===4)for(_=d.return;_!==null;){var A=_.tag;if((A===3||A===4)&&(A=_.stateNode.containerInfo,A===p||A.nodeType===8&&A.parentNode===p))return;_=_.return}for(;E!==null;){if(_=Fa(E),_===null)return;if(A=_.tag,A===5||A===6){d=g=_;continue e}E=E.parentNode}}d=d.return}Ua(function(){var z=g,ee=Ps(l),ne=[];e:{var J=jm.get(r);if(J!==void 0){var de=Oc,ye=r;switch(r){case"keypress":if(ol(l)===0)break e;case"keydown":case"keyup":de=Hx;break;case"focusin":ye="focus",de=Uc;break;case"focusout":ye="blur",de=Uc;break;case"beforeblur":case"afterblur":de=Uc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=fm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Dx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=qx;break;case Mm:case Nm:case Om:de=Ox;break;case Im:de=Yx;break;case"scroll":de=Ax;break;case"wheel":de=Qx;break;case"copy":case"cut":case"paste":de=jx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=mm}var ke=(i&4)!==0,Tt=!ke&&r==="scroll",B=ke?J!==null?J+"Capture":null:J;ke=[];for(var O=z,F;O!==null;){F=O;var se=F.stateNode;if(F.tag===5&&se!==null&&(F=se,B!==null&&(se=Jr(O,B),se!=null&&ke.push(Ws(O,se,F)))),Tt)break;O=O.return}0<ke.length&&(J=new de(J,ye,null,l,ee),ne.push({event:J,listeners:ke}))}}if((i&7)===0){e:{if(J=r==="mouseover"||r==="pointerover",de=r==="mouseout"||r==="pointerout",J&&l!==wi&&(ye=l.relatedTarget||l.fromElement)&&(Fa(ye)||ye[Dr]))break e;if((de||J)&&(J=ee.window===ee?ee:(J=ee.ownerDocument)?J.defaultView||J.parentWindow:window,de?(ye=l.relatedTarget||l.toElement,de=z,ye=ye?Fa(ye):null,ye!==null&&(Tt=he(ye),ye!==Tt||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(de=null,ye=z),de!==ye)){if(ke=fm,se="onMouseLeave",B="onMouseEnter",O="mouse",(r==="pointerout"||r==="pointerover")&&(ke=mm,se="onPointerLeave",B="onPointerEnter",O="pointer"),Tt=de==null?J:Mi(de),F=ye==null?J:Mi(ye),J=new ke(se,O+"leave",de,l,ee),J.target=Tt,J.relatedTarget=F,se=null,Fa(ee)===z&&(ke=new ke(B,O+"enter",ye,l,ee),ke.target=F,ke.relatedTarget=Tt,se=ke),Tt=se,de&&ye)t:{for(ke=de,B=ye,O=0,F=ke;F;F=Li(F))O++;for(F=0,se=B;se;se=Li(se))F++;for(;0<O-F;)ke=Li(ke),O--;for(;0<F-O;)B=Li(B),F--;for(;O--;){if(ke===B||B!==null&&ke===B.alternate)break t;ke=Li(ke),B=Li(B)}ke=null}else ke=null;de!==null&&zm(ne,J,de,ke,!1),ye!==null&&Tt!==null&&zm(ne,Tt,ye,ke,!0)}}e:{if(J=z?Mi(z):window,de=J.nodeName&&J.nodeName.toLowerCase(),de==="select"||de==="input"&&J.type==="file")var Pe=aS;else if(wm(J))if(xm)Pe=lS;else{Pe=sS;var Ie=iS}else(de=J.nodeName)&&de.toLowerCase()==="input"&&(J.type==="checkbox"||J.type==="radio")&&(Pe=oS);if(Pe&&(Pe=Pe(r,z))){km(ne,Pe,l,ee);break e}Ie&&Ie(r,J,z),r==="focusout"&&(Ie=J._wrapperState)&&Ie.controlled&&J.type==="number"&&xs(J,"number",J.value)}switch(Ie=z?Mi(z):window,r){case"focusin":(wm(Ie)||Ie.contentEditable==="true")&&(Ri=Ie,Hc=z,zs=null);break;case"focusout":zs=Hc=Ri=null;break;case"mousedown":Wc=!0;break;case"contextmenu":case"mouseup":case"dragend":Wc=!1,Lm(ne,l,ee);break;case"selectionchange":if(dS)break;case"keydown":case"keyup":Lm(ne,l,ee)}var je;if(Fc)e:{switch(r){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Ei?bm(r,l)&&(Fe="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Fe="onCompositionStart");Fe&&(gm&&l.locale!=="ko"&&(Ei||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Ei&&(je=dm()):(oa=ee,Nc="value"in oa?oa.value:oa.textContent,Ei=!0)),Ie=pl(z,Fe),0<Ie.length&&(Fe=new pm(Fe,r,null,l,ee),ne.push({event:Fe,listeners:Ie}),je?Fe.data=je:(je=_m(l),je!==null&&(Fe.data=je)))),(je=Jx?eS(r,l):tS(r,l))&&(z=pl(z,"onBeforeInput"),0<z.length&&(ee=new pm("onBeforeInput","beforeinput",null,l,ee),ne.push({event:ee,listeners:z}),ee.data=je))}Fm(ne,i)})}function Ws(r,i,l){return{instance:r,listener:i,currentTarget:l}}function pl(r,i){for(var l=i+"Capture",d=[];r!==null;){var p=r,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=Jr(r,l),g!=null&&d.unshift(Ws(r,g,p)),g=Jr(r,i),g!=null&&d.push(Ws(r,g,p))),r=r.return}return d}function Li(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function zm(r,i,l,d,p){for(var g=i._reactName,_=[];l!==null&&l!==d;){var E=l,A=E.alternate,z=E.stateNode;if(A!==null&&A===d)break;E.tag===5&&z!==null&&(E=z,p?(A=Jr(l,g),A!=null&&_.unshift(Ws(l,A,E))):p||(A=Jr(l,g),A!=null&&_.push(Ws(l,A,E)))),l=l.return}_.length!==0&&r.push({event:i,listeners:_})}var mS=/\r\n?/g,gS=/\u0000|\uFFFD/g;function $m(r){return(typeof r=="string"?r:""+r).replace(mS,`
|
|
7
|
+
`).replace(gS,"")}function ml(r,i,l){if(i=$m(i),$m(r)!==i&&l)throw Error(n(425))}function gl(){}var Qc=null,Xc=null;function Jc(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var ed=typeof setTimeout=="function"?setTimeout:void 0,yS=typeof clearTimeout=="function"?clearTimeout:void 0,Hm=typeof Promise=="function"?Promise:void 0,vS=typeof queueMicrotask=="function"?queueMicrotask:typeof Hm<"u"?function(r){return Hm.resolve(null).then(r).catch(bS)}:ed;function bS(r){setTimeout(function(){throw r})}function td(r,i){var l=i,d=0;do{var p=l.nextSibling;if(r.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"){if(d===0){r.removeChild(p),Os(i);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=p}while(l);Os(i)}function ua(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Wm(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"){if(i===0)return r;i--}else l==="/$"&&i++}r=r.previousSibling}return null}var Di=Math.random().toString(36).slice(2),lr="__reactFiber$"+Di,Ks="__reactProps$"+Di,Dr="__reactContainer$"+Di,nd="__reactEvents$"+Di,_S="__reactListeners$"+Di,wS="__reactHandles$"+Di;function Fa(r){var i=r[lr];if(i)return i;for(var l=r.parentNode;l;){if(i=l[Dr]||l[lr]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=Wm(r);r!==null;){if(l=r[lr])return l;r=Wm(r)}return i}r=l,l=r.parentNode}return null}function qs(r){return r=r[lr]||r[Dr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Mi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function yl(r){return r[Ks]||null}var rd=[],Ni=-1;function ca(r){return{current:r}}function gt(r){0>Ni||(r.current=rd[Ni],rd[Ni]=null,Ni--)}function ft(r,i){Ni++,rd[Ni]=r.current,r.current=i}var da={},Gt=ca(da),hn=ca(!1),Va=da;function Oi(r,i){var l=r.type.contextTypes;if(!l)return da;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===i)return d.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in l)p[g]=i[g];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=p),p}function fn(r){return r=r.childContextTypes,r!=null}function vl(){gt(hn),gt(Gt)}function Km(r,i,l){if(Gt.current!==da)throw Error(n(168));ft(Gt,i),ft(hn,l)}function qm(r,i,l){var d=r.stateNode;if(i=i.childContextTypes,typeof d.getChildContext!="function")return l;d=d.getChildContext();for(var p in d)if(!(p in i))throw Error(n(108,qe(r)||"Unknown",p));return $({},l,d)}function bl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||da,Va=Gt.current,ft(Gt,r),ft(hn,hn.current),!0}function Gm(r,i,l){var d=r.stateNode;if(!d)throw Error(n(169));l?(r=qm(r,i,Va),d.__reactInternalMemoizedMergedChildContext=r,gt(hn),gt(Gt),ft(Gt,r)):gt(hn),ft(hn,l)}var Mr=null,_l=!1,ad=!1;function Ym(r){Mr===null?Mr=[r]:Mr.push(r)}function kS(r){_l=!0,Ym(r)}function ha(){if(!ad&&Mr!==null){ad=!0;var r=0,i=ut;try{var l=Mr;for(ut=1;r<l.length;r++){var d=l[r];do d=d(!0);while(d!==null)}Mr=null,_l=!1}catch(p){throw Mr!==null&&(Mr=Mr.slice(r+1)),ht(Rr,ha),p}finally{ut=i,ad=!1}}return null}var Ii=[],ji=0,wl=null,kl=0,En=[],Rn=0,za=null,Nr=1,Or="";function $a(r,i){Ii[ji++]=kl,Ii[ji++]=wl,wl=r,kl=i}function Zm(r,i,l){En[Rn++]=Nr,En[Rn++]=Or,En[Rn++]=za,za=r;var d=Nr;r=Or;var p=32-$e(d)-1;d&=~(1<<p),l+=1;var g=32-$e(i)+p;if(30<g){var _=p-p%5;g=(d&(1<<_)-1).toString(32),d>>=_,p-=_,Nr=1<<32-$e(i)+p|l<<p|d,Or=g+r}else Nr=1<<g|l<<p|d,Or=r}function id(r){r.return!==null&&($a(r,1),Zm(r,1,0))}function sd(r){for(;r===wl;)wl=Ii[--ji],Ii[ji]=null,kl=Ii[--ji],Ii[ji]=null;for(;r===za;)za=En[--Rn],En[Rn]=null,Or=En[--Rn],En[Rn]=null,Nr=En[--Rn],En[Rn]=null}var bn=null,_n=null,bt=!1,Yn=null;function Qm(r,i){var l=Mn(5,null,null,0);l.elementType="DELETED",l.stateNode=i,l.return=r,i=r.deletions,i===null?(r.deletions=[l],r.flags|=16):i.push(l)}function Xm(r,i){switch(r.tag){case 5:var l=r.type;return i=i.nodeType!==1||l.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,bn=r,_n=ua(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,bn=r,_n=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(l=za!==null?{id:Nr,overflow:Or}:null,r.memoizedState={dehydrated:i,treeContext:l,retryLane:1073741824},l=Mn(18,null,null,0),l.stateNode=i,l.return=r,r.child=l,bn=r,_n=null,!0):!1;default:return!1}}function od(r){return(r.mode&1)!==0&&(r.flags&128)===0}function ld(r){if(bt){var i=_n;if(i){var l=i;if(!Xm(r,i)){if(od(r))throw Error(n(418));i=ua(l.nextSibling);var d=bn;i&&Xm(r,i)?Qm(d,l):(r.flags=r.flags&-4097|2,bt=!1,bn=r)}}else{if(od(r))throw Error(n(418));r.flags=r.flags&-4097|2,bt=!1,bn=r}}}function Jm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;bn=r}function xl(r){if(r!==bn)return!1;if(!bt)return Jm(r),bt=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Jc(r.type,r.memoizedProps)),i&&(i=_n)){if(od(r))throw eg(),Error(n(418));for(;i;)Qm(r,i),i=ua(i.nextSibling)}if(Jm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"){if(i===0){_n=ua(r.nextSibling);break e}i--}else l!=="$"&&l!=="$!"&&l!=="$?"||i++}r=r.nextSibling}_n=null}}else _n=bn?ua(r.stateNode.nextSibling):null;return!0}function eg(){for(var r=_n;r;)r=ua(r.nextSibling)}function Ui(){_n=bn=null,bt=!1}function ud(r){Yn===null?Yn=[r]:Yn.push(r)}var xS=I.ReactCurrentBatchConfig;function Gs(r,i,l){if(r=l.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var d=l.stateNode}if(!d)throw Error(n(147,r));var p=d,g=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===g?i.ref:(i=function(_){var E=p.refs;_===null?delete E[g]:E[g]=_},i._stringRef=g,i)}if(typeof r!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,r))}return r}function Sl(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function tg(r){var i=r._init;return i(r._payload)}function ng(r){function i(B,O){if(r){var F=B.deletions;F===null?(B.deletions=[O],B.flags|=16):F.push(O)}}function l(B,O){if(!r)return null;for(;O!==null;)i(B,O),O=O.sibling;return null}function d(B,O){for(B=new Map;O!==null;)O.key!==null?B.set(O.key,O):B.set(O.index,O),O=O.sibling;return B}function p(B,O){return B=_a(B,O),B.index=0,B.sibling=null,B}function g(B,O,F){return B.index=F,r?(F=B.alternate,F!==null?(F=F.index,F<O?(B.flags|=2,O):F):(B.flags|=2,O)):(B.flags|=1048576,O)}function _(B){return r&&B.alternate===null&&(B.flags|=2),B}function E(B,O,F,se){return O===null||O.tag!==6?(O=eh(F,B.mode,se),O.return=B,O):(O=p(O,F),O.return=B,O)}function A(B,O,F,se){var Pe=F.type;return Pe===W?ee(B,O,F.props.children,se,F.key):O!==null&&(O.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===ue&&tg(Pe)===O.type)?(se=p(O,F.props),se.ref=Gs(B,O,F),se.return=B,se):(se=Gl(F.type,F.key,F.props,null,B.mode,se),se.ref=Gs(B,O,F),se.return=B,se)}function z(B,O,F,se){return O===null||O.tag!==4||O.stateNode.containerInfo!==F.containerInfo||O.stateNode.implementation!==F.implementation?(O=th(F,B.mode,se),O.return=B,O):(O=p(O,F.children||[]),O.return=B,O)}function ee(B,O,F,se,Pe){return O===null||O.tag!==7?(O=Qa(F,B.mode,se,Pe),O.return=B,O):(O=p(O,F),O.return=B,O)}function ne(B,O,F){if(typeof O=="string"&&O!==""||typeof O=="number")return O=eh(""+O,B.mode,F),O.return=B,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case K:return F=Gl(O.type,O.key,O.props,null,B.mode,F),F.ref=Gs(B,null,O),F.return=B,F;case G:return O=th(O,B.mode,F),O.return=B,O;case ue:var se=O._init;return ne(B,se(O._payload),F)}if(qr(O)||Y(O))return O=Qa(O,B.mode,F,null),O.return=B,O;Sl(B,O)}return null}function J(B,O,F,se){var Pe=O!==null?O.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return Pe!==null?null:E(B,O,""+F,se);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case K:return F.key===Pe?A(B,O,F,se):null;case G:return F.key===Pe?z(B,O,F,se):null;case ue:return Pe=F._init,J(B,O,Pe(F._payload),se)}if(qr(F)||Y(F))return Pe!==null?null:ee(B,O,F,se,null);Sl(B,F)}return null}function de(B,O,F,se,Pe){if(typeof se=="string"&&se!==""||typeof se=="number")return B=B.get(F)||null,E(O,B,""+se,Pe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case K:return B=B.get(se.key===null?F:se.key)||null,A(O,B,se,Pe);case G:return B=B.get(se.key===null?F:se.key)||null,z(O,B,se,Pe);case ue:var Ie=se._init;return de(B,O,F,Ie(se._payload),Pe)}if(qr(se)||Y(se))return B=B.get(F)||null,ee(O,B,se,Pe,null);Sl(O,se)}return null}function ye(B,O,F,se){for(var Pe=null,Ie=null,je=O,Fe=O=0,Vt=null;je!==null&&Fe<F.length;Fe++){je.index>Fe?(Vt=je,je=null):Vt=je.sibling;var ot=J(B,je,F[Fe],se);if(ot===null){je===null&&(je=Vt);break}r&&je&&ot.alternate===null&&i(B,je),O=g(ot,O,Fe),Ie===null?Pe=ot:Ie.sibling=ot,Ie=ot,je=Vt}if(Fe===F.length)return l(B,je),bt&&$a(B,Fe),Pe;if(je===null){for(;Fe<F.length;Fe++)je=ne(B,F[Fe],se),je!==null&&(O=g(je,O,Fe),Ie===null?Pe=je:Ie.sibling=je,Ie=je);return bt&&$a(B,Fe),Pe}for(je=d(B,je);Fe<F.length;Fe++)Vt=de(je,B,Fe,F[Fe],se),Vt!==null&&(r&&Vt.alternate!==null&&je.delete(Vt.key===null?Fe:Vt.key),O=g(Vt,O,Fe),Ie===null?Pe=Vt:Ie.sibling=Vt,Ie=Vt);return r&&je.forEach(function(wa){return i(B,wa)}),bt&&$a(B,Fe),Pe}function ke(B,O,F,se){var Pe=Y(F);if(typeof Pe!="function")throw Error(n(150));if(F=Pe.call(F),F==null)throw Error(n(151));for(var Ie=Pe=null,je=O,Fe=O=0,Vt=null,ot=F.next();je!==null&&!ot.done;Fe++,ot=F.next()){je.index>Fe?(Vt=je,je=null):Vt=je.sibling;var wa=J(B,je,ot.value,se);if(wa===null){je===null&&(je=Vt);break}r&&je&&wa.alternate===null&&i(B,je),O=g(wa,O,Fe),Ie===null?Pe=wa:Ie.sibling=wa,Ie=wa,je=Vt}if(ot.done)return l(B,je),bt&&$a(B,Fe),Pe;if(je===null){for(;!ot.done;Fe++,ot=F.next())ot=ne(B,ot.value,se),ot!==null&&(O=g(ot,O,Fe),Ie===null?Pe=ot:Ie.sibling=ot,Ie=ot);return bt&&$a(B,Fe),Pe}for(je=d(B,je);!ot.done;Fe++,ot=F.next())ot=de(je,B,Fe,ot.value,se),ot!==null&&(r&&ot.alternate!==null&&je.delete(ot.key===null?Fe:ot.key),O=g(ot,O,Fe),Ie===null?Pe=ot:Ie.sibling=ot,Ie=ot);return r&&je.forEach(function(nP){return i(B,nP)}),bt&&$a(B,Fe),Pe}function Tt(B,O,F,se){if(typeof F=="object"&&F!==null&&F.type===W&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case K:e:{for(var Pe=F.key,Ie=O;Ie!==null;){if(Ie.key===Pe){if(Pe=F.type,Pe===W){if(Ie.tag===7){l(B,Ie.sibling),O=p(Ie,F.props.children),O.return=B,B=O;break e}}else if(Ie.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===ue&&tg(Pe)===Ie.type){l(B,Ie.sibling),O=p(Ie,F.props),O.ref=Gs(B,Ie,F),O.return=B,B=O;break e}l(B,Ie);break}else i(B,Ie);Ie=Ie.sibling}F.type===W?(O=Qa(F.props.children,B.mode,se,F.key),O.return=B,B=O):(se=Gl(F.type,F.key,F.props,null,B.mode,se),se.ref=Gs(B,O,F),se.return=B,B=se)}return _(B);case G:e:{for(Ie=F.key;O!==null;){if(O.key===Ie)if(O.tag===4&&O.stateNode.containerInfo===F.containerInfo&&O.stateNode.implementation===F.implementation){l(B,O.sibling),O=p(O,F.children||[]),O.return=B,B=O;break e}else{l(B,O);break}else i(B,O);O=O.sibling}O=th(F,B.mode,se),O.return=B,B=O}return _(B);case ue:return Ie=F._init,Tt(B,O,Ie(F._payload),se)}if(qr(F))return ye(B,O,F,se);if(Y(F))return ke(B,O,F,se);Sl(B,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,O!==null&&O.tag===6?(l(B,O.sibling),O=p(O,F),O.return=B,B=O):(l(B,O),O=eh(F,B.mode,se),O.return=B,B=O),_(B)):l(B,O)}return Tt}var Bi=ng(!0),rg=ng(!1),Pl=ca(null),Tl=null,Fi=null,cd=null;function dd(){cd=Fi=Tl=null}function hd(r){var i=Pl.current;gt(Pl),r._currentValue=i}function fd(r,i,l){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===l)break;r=r.return}}function Vi(r,i){Tl=r,cd=Fi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(pn=!0),r.firstContext=null)}function An(r){var i=r._currentValue;if(cd!==r)if(r={context:r,memoizedValue:i,next:null},Fi===null){if(Tl===null)throw Error(n(308));Fi=r,Tl.dependencies={lanes:0,firstContext:r}}else Fi=Fi.next=r;return i}var Ha=null;function pd(r){Ha===null?Ha=[r]:Ha.push(r)}function ag(r,i,l,d){var p=i.interleaved;return p===null?(l.next=l,pd(i)):(l.next=p.next,p.next=l),i.interleaved=l,Ir(r,d)}function Ir(r,i){r.lanes|=i;var l=r.alternate;for(l!==null&&(l.lanes|=i),l=r,r=r.return;r!==null;)r.childLanes|=i,l=r.alternate,l!==null&&(l.childLanes|=i),l=r,r=r.return;return l.tag===3?l.stateNode:null}var fa=!1;function md(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ig(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function jr(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function pa(r,i,l){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(at&2)!==0){var p=d.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),d.pending=i,Ir(r,l)}return p=d.interleaved,p===null?(i.next=i,pd(d)):(i.next=p.next,p.next=i),d.interleaved=i,Ir(r,l)}function Cl(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194240)!==0)){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Rc(r,l)}}function sg(r,i){var l=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var p=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var _={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};g===null?p=g=_:g=g.next=_,l=l.next}while(l!==null);g===null?p=g=i:g=g.next=i}else p=g=i;l={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,effects:d.effects},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}function El(r,i,l,d){var p=r.updateQueue;fa=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var A=E,z=A.next;A.next=null,_===null?g=z:_.next=z,_=A;var ee=r.alternate;ee!==null&&(ee=ee.updateQueue,E=ee.lastBaseUpdate,E!==_&&(E===null?ee.firstBaseUpdate=z:E.next=z,ee.lastBaseUpdate=A))}if(g!==null){var ne=p.baseState;_=0,ee=z=A=null,E=g;do{var J=E.lane,de=E.eventTime;if((d&J)===J){ee!==null&&(ee=ee.next={eventTime:de,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var ye=r,ke=E;switch(J=i,de=l,ke.tag){case 1:if(ye=ke.payload,typeof ye=="function"){ne=ye.call(de,ne,J);break e}ne=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=ke.payload,J=typeof ye=="function"?ye.call(de,ne,J):ye,J==null)break e;ne=$({},ne,J);break e;case 2:fa=!0}}E.callback!==null&&E.lane!==0&&(r.flags|=64,J=p.effects,J===null?p.effects=[E]:J.push(E))}else de={eventTime:de,lane:J,tag:E.tag,payload:E.payload,callback:E.callback,next:null},ee===null?(z=ee=de,A=ne):ee=ee.next=de,_|=J;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;J=E,E=J.next,J.next=null,p.lastBaseUpdate=J,p.shared.pending=null}}while(!0);if(ee===null&&(A=ne),p.baseState=A,p.firstBaseUpdate=z,p.lastBaseUpdate=ee,i=p.shared.interleaved,i!==null){p=i;do _|=p.lane,p=p.next;while(p!==i)}else g===null&&(p.shared.lanes=0);qa|=_,r.lanes=_,r.memoizedState=ne}}function og(r,i,l){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var d=r[i],p=d.callback;if(p!==null){if(d.callback=null,d=l,typeof p!="function")throw Error(n(191,p));p.call(d)}}}var Ys={},ur=ca(Ys),Zs=ca(Ys),Qs=ca(Ys);function Wa(r){if(r===Ys)throw Error(n(174));return r}function gd(r,i){switch(ft(Qs,i),ft(Zs,r),ft(ur,Ys),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:yi(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=yi(i,r)}gt(ur),ft(ur,i)}function zi(){gt(ur),gt(Zs),gt(Qs)}function lg(r){Wa(Qs.current);var i=Wa(ur.current),l=yi(i,r.type);i!==l&&(ft(Zs,r),ft(ur,l))}function yd(r){Zs.current===r&&(gt(ur),gt(Zs))}var wt=ca(0);function Rl(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var vd=[];function bd(){for(var r=0;r<vd.length;r++)vd[r]._workInProgressVersionPrimary=null;vd.length=0}var Al=I.ReactCurrentDispatcher,_d=I.ReactCurrentBatchConfig,Ka=0,kt=null,Mt=null,Bt=null,Ll=!1,Xs=!1,Js=0,SS=0;function Yt(){throw Error(n(321))}function wd(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Gn(r[l],i[l]))return!1;return!0}function kd(r,i,l,d,p,g){if(Ka=g,kt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Al.current=r===null||r.memoizedState===null?ES:RS,r=l(d,p),Xs){g=0;do{if(Xs=!1,Js=0,25<=g)throw Error(n(301));g+=1,Bt=Mt=null,i.updateQueue=null,Al.current=AS,r=l(d,p)}while(Xs)}if(Al.current=Nl,i=Mt!==null&&Mt.next!==null,Ka=0,Bt=Mt=kt=null,Ll=!1,i)throw Error(n(300));return r}function xd(){var r=Js!==0;return Js=0,r}function cr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?kt.memoizedState=Bt=r:Bt=Bt.next=r,Bt}function Ln(){if(Mt===null){var r=kt.alternate;r=r!==null?r.memoizedState:null}else r=Mt.next;var i=Bt===null?kt.memoizedState:Bt.next;if(i!==null)Bt=i,Mt=r;else{if(r===null)throw Error(n(310));Mt=r,r={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},Bt===null?kt.memoizedState=Bt=r:Bt=Bt.next=r}return Bt}function eo(r,i){return typeof i=="function"?i(r):i}function Sd(r){var i=Ln(),l=i.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=r;var d=Mt,p=d.baseQueue,g=l.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}d.baseQueue=p=g,l.pending=null}if(p!==null){g=p.next,d=d.baseState;var E=_=null,A=null,z=g;do{var ee=z.lane;if((Ka&ee)===ee)A!==null&&(A=A.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),d=z.hasEagerState?z.eagerState:r(d,z.action);else{var ne={lane:ee,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};A===null?(E=A=ne,_=d):A=A.next=ne,kt.lanes|=ee,qa|=ee}z=z.next}while(z!==null&&z!==g);A===null?_=d:A.next=E,Gn(d,i.memoizedState)||(pn=!0),i.memoizedState=d,i.baseState=_,i.baseQueue=A,l.lastRenderedState=d}if(r=l.interleaved,r!==null){p=r;do g=p.lane,kt.lanes|=g,qa|=g,p=p.next;while(p!==r)}else p===null&&(l.lanes=0);return[i.memoizedState,l.dispatch]}function Pd(r){var i=Ln(),l=i.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=r;var d=l.dispatch,p=l.pending,g=i.memoizedState;if(p!==null){l.pending=null;var _=p=p.next;do g=r(g,_.action),_=_.next;while(_!==p);Gn(g,i.memoizedState)||(pn=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),l.lastRenderedState=g}return[g,d]}function ug(){}function cg(r,i){var l=kt,d=Ln(),p=i(),g=!Gn(d.memoizedState,p);if(g&&(d.memoizedState=p,pn=!0),d=d.queue,Td(fg.bind(null,l,d,r),[r]),d.getSnapshot!==i||g||Bt!==null&&Bt.memoizedState.tag&1){if(l.flags|=2048,to(9,hg.bind(null,l,d,p,i),void 0,null),Ft===null)throw Error(n(349));(Ka&30)!==0||dg(l,i,p)}return p}function dg(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=kt.updateQueue,i===null?(i={lastEffect:null,stores:null},kt.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function hg(r,i,l,d){i.value=l,i.getSnapshot=d,pg(i)&&mg(r)}function fg(r,i,l){return l(function(){pg(i)&&mg(r)})}function pg(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Gn(r,l)}catch{return!0}}function mg(r){var i=Ir(r,1);i!==null&&Jn(i,r,1,-1)}function gg(r){var i=cr();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:r},i.queue=r,r=r.dispatch=CS.bind(null,kt,r),[i.memoizedState,r]}function to(r,i,l,d){return r={tag:r,create:i,destroy:l,deps:d,next:null},i=kt.updateQueue,i===null?(i={lastEffect:null,stores:null},kt.updateQueue=i,i.lastEffect=r.next=r):(l=i.lastEffect,l===null?i.lastEffect=r.next=r:(d=l.next,l.next=r,r.next=d,i.lastEffect=r)),r}function yg(){return Ln().memoizedState}function Dl(r,i,l,d){var p=cr();kt.flags|=r,p.memoizedState=to(1|i,l,void 0,d===void 0?null:d)}function Ml(r,i,l,d){var p=Ln();d=d===void 0?null:d;var g=void 0;if(Mt!==null){var _=Mt.memoizedState;if(g=_.destroy,d!==null&&wd(d,_.deps)){p.memoizedState=to(i,l,g,d);return}}kt.flags|=r,p.memoizedState=to(1|i,l,g,d)}function vg(r,i){return Dl(8390656,8,r,i)}function Td(r,i){return Ml(2048,8,r,i)}function bg(r,i){return Ml(4,2,r,i)}function _g(r,i){return Ml(4,4,r,i)}function wg(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function kg(r,i,l){return l=l!=null?l.concat([r]):null,Ml(4,4,wg.bind(null,i,r),l)}function Cd(){}function xg(r,i){var l=Ln();i=i===void 0?null:i;var d=l.memoizedState;return d!==null&&i!==null&&wd(i,d[1])?d[0]:(l.memoizedState=[r,i],r)}function Sg(r,i){var l=Ln();i=i===void 0?null:i;var d=l.memoizedState;return d!==null&&i!==null&&wd(i,d[1])?d[0]:(r=r(),l.memoizedState=[r,i],r)}function Pg(r,i,l){return(Ka&21)===0?(r.baseState&&(r.baseState=!1,pn=!0),r.memoizedState=l):(Gn(l,i)||(l=tm(),kt.lanes|=l,qa|=l,r.baseState=!0),i)}function PS(r,i){var l=ut;ut=l!==0&&4>l?l:4,r(!0);var d=_d.transition;_d.transition={};try{r(!1),i()}finally{ut=l,_d.transition=d}}function Tg(){return Ln().memoizedState}function TS(r,i,l){var d=va(r);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},Cg(r))Eg(i,l);else if(l=ag(r,i,l,d),l!==null){var p=sn();Jn(l,r,d,p),Rg(l,i,d)}}function CS(r,i,l){var d=va(r),p={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(Cg(r))Eg(i,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var _=i.lastRenderedState,E=g(_,l);if(p.hasEagerState=!0,p.eagerState=E,Gn(E,_)){var A=i.interleaved;A===null?(p.next=p,pd(i)):(p.next=A.next,A.next=p),i.interleaved=p;return}}catch{}l=ag(r,i,p,d),l!==null&&(p=sn(),Jn(l,r,d,p),Rg(l,i,d))}}function Cg(r){var i=r.alternate;return r===kt||i!==null&&i===kt}function Eg(r,i){Xs=Ll=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function Rg(r,i,l){if((l&4194240)!==0){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Rc(r,l)}}var Nl={readContext:An,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},ES={readContext:An,useCallback:function(r,i){return cr().memoizedState=[r,i===void 0?null:i],r},useContext:An,useEffect:vg,useImperativeHandle:function(r,i,l){return l=l!=null?l.concat([r]):null,Dl(4194308,4,wg.bind(null,i,r),l)},useLayoutEffect:function(r,i){return Dl(4194308,4,r,i)},useInsertionEffect:function(r,i){return Dl(4,2,r,i)},useMemo:function(r,i){var l=cr();return i=i===void 0?null:i,r=r(),l.memoizedState=[r,i],r},useReducer:function(r,i,l){var d=cr();return i=l!==void 0?l(i):i,d.memoizedState=d.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},d.queue=r,r=r.dispatch=TS.bind(null,kt,r),[d.memoizedState,r]},useRef:function(r){var i=cr();return r={current:r},i.memoizedState=r},useState:gg,useDebugValue:Cd,useDeferredValue:function(r){return cr().memoizedState=r},useTransition:function(){var r=gg(!1),i=r[0];return r=PS.bind(null,r[1]),cr().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,l){var d=kt,p=cr();if(bt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=i(),Ft===null)throw Error(n(349));(Ka&30)!==0||dg(d,i,l)}p.memoizedState=l;var g={value:l,getSnapshot:i};return p.queue=g,vg(fg.bind(null,d,g,r),[r]),d.flags|=2048,to(9,hg.bind(null,d,g,l,i),void 0,null),l},useId:function(){var r=cr(),i=Ft.identifierPrefix;if(bt){var l=Or,d=Nr;l=(d&~(1<<32-$e(d)-1)).toString(32)+l,i=":"+i+"R"+l,l=Js++,0<l&&(i+="H"+l.toString(32)),i+=":"}else l=SS++,i=":"+i+"r"+l.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},RS={readContext:An,useCallback:xg,useContext:An,useEffect:Td,useImperativeHandle:kg,useInsertionEffect:bg,useLayoutEffect:_g,useMemo:Sg,useReducer:Sd,useRef:yg,useState:function(){return Sd(eo)},useDebugValue:Cd,useDeferredValue:function(r){var i=Ln();return Pg(i,Mt.memoizedState,r)},useTransition:function(){var r=Sd(eo)[0],i=Ln().memoizedState;return[r,i]},useMutableSource:ug,useSyncExternalStore:cg,useId:Tg,unstable_isNewReconciler:!1},AS={readContext:An,useCallback:xg,useContext:An,useEffect:Td,useImperativeHandle:kg,useInsertionEffect:bg,useLayoutEffect:_g,useMemo:Sg,useReducer:Pd,useRef:yg,useState:function(){return Pd(eo)},useDebugValue:Cd,useDeferredValue:function(r){var i=Ln();return Mt===null?i.memoizedState=r:Pg(i,Mt.memoizedState,r)},useTransition:function(){var r=Pd(eo)[0],i=Ln().memoizedState;return[r,i]},useMutableSource:ug,useSyncExternalStore:cg,useId:Tg,unstable_isNewReconciler:!1};function Zn(r,i){if(r&&r.defaultProps){i=$({},i),r=r.defaultProps;for(var l in r)i[l]===void 0&&(i[l]=r[l]);return i}return i}function Ed(r,i,l,d){i=r.memoizedState,l=l(d,i),l=l==null?i:$({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var Ol={isMounted:function(r){return(r=r._reactInternals)?he(r)===r:!1},enqueueSetState:function(r,i,l){r=r._reactInternals;var d=sn(),p=va(r),g=jr(d,p);g.payload=i,l!=null&&(g.callback=l),i=pa(r,g,p),i!==null&&(Jn(i,r,p,d),Cl(i,r,p))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var d=sn(),p=va(r),g=jr(d,p);g.tag=1,g.payload=i,l!=null&&(g.callback=l),i=pa(r,g,p),i!==null&&(Jn(i,r,p,d),Cl(i,r,p))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=sn(),d=va(r),p=jr(l,d);p.tag=2,i!=null&&(p.callback=i),i=pa(r,p,d),i!==null&&(Jn(i,r,d,l),Cl(i,r,d))}};function Ag(r,i,l,d,p,g,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,g,_):i.prototype&&i.prototype.isPureReactComponent?!Vs(l,d)||!Vs(p,g):!0}function Lg(r,i,l){var d=!1,p=da,g=i.contextType;return typeof g=="object"&&g!==null?g=An(g):(p=fn(i)?Va:Gt.current,d=i.contextTypes,g=(d=d!=null)?Oi(r,p):da),i=new i(l,g),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ol,r.stateNode=i,i._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=p,r.__reactInternalMemoizedMaskedChildContext=g),i}function Dg(r,i,l,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,d),i.state!==r&&Ol.enqueueReplaceState(i,i.state,null)}function Rd(r,i,l,d){var p=r.stateNode;p.props=l,p.state=r.memoizedState,p.refs={},md(r);var g=i.contextType;typeof g=="object"&&g!==null?p.context=An(g):(g=fn(i)?Va:Gt.current,p.context=Oi(r,g)),p.state=r.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Ed(r,i,g,l),p.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(i=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),i!==p.state&&Ol.enqueueReplaceState(p,p.state,null),El(r,l,p,d),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308)}function $i(r,i){try{var l="",d=i;do l+=Se(d),d=d.return;while(d);var p=l}catch(g){p=`
|
|
8
|
+
Error generating stack: `+g.message+`
|
|
9
|
+
`+g.stack}return{value:r,source:i,stack:p,digest:null}}function Ad(r,i,l){return{value:r,source:null,stack:l??null,digest:i??null}}function Ld(r,i){try{console.error(i.value)}catch(l){setTimeout(function(){throw l})}}var LS=typeof WeakMap=="function"?WeakMap:Map;function Mg(r,i,l){l=jr(-1,l),l.tag=3,l.payload={element:null};var d=i.value;return l.callback=function(){zl||(zl=!0,Kd=d),Ld(r,i)},l}function Ng(r,i,l){l=jr(-1,l),l.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=i.value;l.payload=function(){return d(p)},l.callback=function(){Ld(r,i)}}var g=r.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(l.callback=function(){Ld(r,i),typeof d!="function"&&(ga===null?ga=new Set([this]):ga.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),l}function Og(r,i,l){var d=r.pingCache;if(d===null){d=r.pingCache=new LS;var p=new Set;d.set(i,p)}else p=d.get(i),p===void 0&&(p=new Set,d.set(i,p));p.has(l)||(p.add(l),r=WS.bind(null,r,i,l),i.then(r,r))}function Ig(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function jg(r,i,l,d,p){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(i=jr(-1,1),i.tag=2,pa(l,i,1))),l.lanes|=1),r):(r.flags|=65536,r.lanes=p,r)}var DS=I.ReactCurrentOwner,pn=!1;function an(r,i,l,d){i.child=r===null?rg(i,null,l,d):Bi(i,r.child,l,d)}function Ug(r,i,l,d,p){l=l.render;var g=i.ref;return Vi(i,p),d=kd(r,i,l,d,g,p),l=xd(),r!==null&&!pn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~p,Ur(r,i,p)):(bt&&l&&id(i),i.flags|=1,an(r,i,d,p),i.child)}function Bg(r,i,l,d,p){if(r===null){var g=l.type;return typeof g=="function"&&!Jd(g)&&g.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(i.tag=15,i.type=g,Fg(r,i,g,d,p)):(r=Gl(l.type,null,d,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(g=r.child,(r.lanes&p)===0){var _=g.memoizedProps;if(l=l.compare,l=l!==null?l:Vs,l(_,d)&&r.ref===i.ref)return Ur(r,i,p)}return i.flags|=1,r=_a(g,d),r.ref=i.ref,r.return=i,i.child=r}function Fg(r,i,l,d,p){if(r!==null){var g=r.memoizedProps;if(Vs(g,d)&&r.ref===i.ref)if(pn=!1,i.pendingProps=d=g,(r.lanes&p)!==0)(r.flags&131072)!==0&&(pn=!0);else return i.lanes=r.lanes,Ur(r,i,p)}return Dd(r,i,l,d,p)}function Vg(r,i,l){var d=i.pendingProps,p=d.children,g=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},ft(Wi,wn),wn|=l;else{if((l&1073741824)===0)return r=g!==null?g.baseLanes|l:l,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,ft(Wi,wn),wn|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=g!==null?g.baseLanes:l,ft(Wi,wn),wn|=d}else g!==null?(d=g.baseLanes|l,i.memoizedState=null):d=l,ft(Wi,wn),wn|=d;return an(r,i,p,l),i.child}function zg(r,i){var l=i.ref;(r===null&&l!==null||r!==null&&r.ref!==l)&&(i.flags|=512,i.flags|=2097152)}function Dd(r,i,l,d,p){var g=fn(l)?Va:Gt.current;return g=Oi(i,g),Vi(i,p),l=kd(r,i,l,d,g,p),d=xd(),r!==null&&!pn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~p,Ur(r,i,p)):(bt&&d&&id(i),i.flags|=1,an(r,i,l,p),i.child)}function $g(r,i,l,d,p){if(fn(l)){var g=!0;bl(i)}else g=!1;if(Vi(i,p),i.stateNode===null)jl(r,i),Lg(i,l,d),Rd(i,l,d,p),d=!0;else if(r===null){var _=i.stateNode,E=i.memoizedProps;_.props=E;var A=_.context,z=l.contextType;typeof z=="object"&&z!==null?z=An(z):(z=fn(l)?Va:Gt.current,z=Oi(i,z));var ee=l.getDerivedStateFromProps,ne=typeof ee=="function"||typeof _.getSnapshotBeforeUpdate=="function";ne||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(E!==d||A!==z)&&Dg(i,_,d,z),fa=!1;var J=i.memoizedState;_.state=J,El(i,d,_,p),A=i.memoizedState,E!==d||J!==A||hn.current||fa?(typeof ee=="function"&&(Ed(i,l,ee,d),A=i.memoizedState),(E=fa||Ag(i,l,E,d,J,A,z))?(ne||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=A),_.props=d,_.state=A,_.context=z,d=E):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{_=i.stateNode,ig(r,i),E=i.memoizedProps,z=i.type===i.elementType?E:Zn(i.type,E),_.props=z,ne=i.pendingProps,J=_.context,A=l.contextType,typeof A=="object"&&A!==null?A=An(A):(A=fn(l)?Va:Gt.current,A=Oi(i,A));var de=l.getDerivedStateFromProps;(ee=typeof de=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(E!==ne||J!==A)&&Dg(i,_,d,A),fa=!1,J=i.memoizedState,_.state=J,El(i,d,_,p);var ye=i.memoizedState;E!==ne||J!==ye||hn.current||fa?(typeof de=="function"&&(Ed(i,l,de,d),ye=i.memoizedState),(z=fa||Ag(i,l,z,d,J,ye,A)||!1)?(ee||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(d,ye,A),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(d,ye,A)),typeof _.componentDidUpdate=="function"&&(i.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof _.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=ye),_.props=d,_.state=ye,_.context=A,d=z):(typeof _.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=1024),d=!1)}return Md(r,i,l,d,g,p)}function Md(r,i,l,d,p,g){zg(r,i);var _=(i.flags&128)!==0;if(!d&&!_)return p&&Gm(i,l,!1),Ur(r,i,g);d=i.stateNode,DS.current=i;var E=_&&typeof l.getDerivedStateFromError!="function"?null:d.render();return i.flags|=1,r!==null&&_?(i.child=Bi(i,r.child,null,g),i.child=Bi(i,null,E,g)):an(r,i,E,g),i.memoizedState=d.state,p&&Gm(i,l,!0),i.child}function Hg(r){var i=r.stateNode;i.pendingContext?Km(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Km(r,i.context,!1),gd(r,i.containerInfo)}function Wg(r,i,l,d,p){return Ui(),ud(p),i.flags|=256,an(r,i,l,d),i.child}var Nd={dehydrated:null,treeContext:null,retryLane:0};function Od(r){return{baseLanes:r,cachePool:null,transitions:null}}function Kg(r,i,l){var d=i.pendingProps,p=wt.current,g=!1,_=(i.flags&128)!==0,E;if((E=_)||(E=r!==null&&r.memoizedState===null?!1:(p&2)!==0),E?(g=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(p|=1),ft(wt,p&1),r===null)return ld(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(_=d.children,r=d.fallback,g?(d=i.mode,g=i.child,_={mode:"hidden",children:_},(d&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=_):g=Yl(_,d,0,null),r=Qa(r,d,l,null),g.return=i,r.return=i,g.sibling=r,i.child=g,i.child.memoizedState=Od(l),i.memoizedState=Nd,r):Id(i,_));if(p=r.memoizedState,p!==null&&(E=p.dehydrated,E!==null))return MS(r,i,_,d,E,p,l);if(g){g=d.fallback,_=i.mode,p=r.child,E=p.sibling;var A={mode:"hidden",children:d.children};return(_&1)===0&&i.child!==p?(d=i.child,d.childLanes=0,d.pendingProps=A,i.deletions=null):(d=_a(p,A),d.subtreeFlags=p.subtreeFlags&14680064),E!==null?g=_a(E,g):(g=Qa(g,_,l,null),g.flags|=2),g.return=i,d.return=i,d.sibling=g,i.child=d,d=g,g=i.child,_=r.child.memoizedState,_=_===null?Od(l):{baseLanes:_.baseLanes|l,cachePool:null,transitions:_.transitions},g.memoizedState=_,g.childLanes=r.childLanes&~l,i.memoizedState=Nd,d}return g=r.child,r=g.sibling,d=_a(g,{mode:"visible",children:d.children}),(i.mode&1)===0&&(d.lanes=l),d.return=i,d.sibling=null,r!==null&&(l=i.deletions,l===null?(i.deletions=[r],i.flags|=16):l.push(r)),i.child=d,i.memoizedState=null,d}function Id(r,i){return i=Yl({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function Il(r,i,l,d){return d!==null&&ud(d),Bi(i,r.child,null,l),r=Id(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function MS(r,i,l,d,p,g,_){if(l)return i.flags&256?(i.flags&=-257,d=Ad(Error(n(422))),Il(r,i,_,d)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(g=d.fallback,p=i.mode,d=Yl({mode:"visible",children:d.children},p,0,null),g=Qa(g,p,_,null),g.flags|=2,d.return=i,g.return=i,d.sibling=g,i.child=d,(i.mode&1)!==0&&Bi(i,r.child,null,_),i.child.memoizedState=Od(_),i.memoizedState=Nd,g);if((i.mode&1)===0)return Il(r,i,_,null);if(p.data==="$!"){if(d=p.nextSibling&&p.nextSibling.dataset,d)var E=d.dgst;return d=E,g=Error(n(419)),d=Ad(g,d,void 0),Il(r,i,_,d)}if(E=(_&r.childLanes)!==0,pn||E){if(d=Ft,d!==null){switch(_&-_){case 4:p=2;break;case 16:p=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(d.suspendedLanes|_))!==0?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,Ir(r,p),Jn(d,r,p,-1))}return Xd(),d=Ad(Error(n(421))),Il(r,i,_,d)}return p.data==="$?"?(i.flags|=128,i.child=r.child,i=KS.bind(null,r),p._reactRetry=i,null):(r=g.treeContext,_n=ua(p.nextSibling),bn=i,bt=!0,Yn=null,r!==null&&(En[Rn++]=Nr,En[Rn++]=Or,En[Rn++]=za,Nr=r.id,Or=r.overflow,za=i),i=Id(i,d.children),i.flags|=4096,i)}function qg(r,i,l){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),fd(r.return,i,l)}function jd(r,i,l,d,p){var g=r.memoizedState;g===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:p}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=l,g.tailMode=p)}function Gg(r,i,l){var d=i.pendingProps,p=d.revealOrder,g=d.tail;if(an(r,i,d.children,l),d=wt.current,(d&2)!==0)d=d&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&qg(r,l,i);else if(r.tag===19)qg(r,l,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(ft(wt,d),(i.mode&1)===0)i.memoizedState=null;else switch(p){case"forwards":for(l=i.child,p=null;l!==null;)r=l.alternate,r!==null&&Rl(r)===null&&(p=l),l=l.sibling;l=p,l===null?(p=i.child,i.child=null):(p=l.sibling,l.sibling=null),jd(i,!1,p,l,g);break;case"backwards":for(l=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&Rl(r)===null){i.child=p;break}r=p.sibling,p.sibling=l,l=p,p=r}jd(i,!0,l,null,g);break;case"together":jd(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function jl(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function Ur(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),qa|=i.lanes,(l&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(n(153));if(i.child!==null){for(r=i.child,l=_a(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=_a(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function NS(r,i,l){switch(i.tag){case 3:Hg(i),Ui();break;case 5:lg(i);break;case 1:fn(i.type)&&bl(i);break;case 4:gd(i,i.stateNode.containerInfo);break;case 10:var d=i.type._context,p=i.memoizedProps.value;ft(Pl,d._currentValue),d._currentValue=p;break;case 13:if(d=i.memoizedState,d!==null)return d.dehydrated!==null?(ft(wt,wt.current&1),i.flags|=128,null):(l&i.child.childLanes)!==0?Kg(r,i,l):(ft(wt,wt.current&1),r=Ur(r,i,l),r!==null?r.sibling:null);ft(wt,wt.current&1);break;case 19:if(d=(l&i.childLanes)!==0,(r.flags&128)!==0){if(d)return Gg(r,i,l);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ft(wt,wt.current),d)break;return null;case 22:case 23:return i.lanes=0,Vg(r,i,l)}return Ur(r,i,l)}var Yg,Ud,Zg,Qg;Yg=function(r,i){for(var l=i.child;l!==null;){if(l.tag===5||l.tag===6)r.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Ud=function(){},Zg=function(r,i,l,d){var p=r.memoizedProps;if(p!==d){r=i.stateNode,Wa(ur.current);var g=null;switch(l){case"input":p=en(r,p),d=en(r,d),g=[];break;case"select":p=$({},p,{value:void 0}),d=$({},d,{value:void 0}),g=[];break;case"textarea":p=Ss(r,p),d=Ss(r,d),g=[];break;default:typeof p.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=gl)}bi(l,d);var _;l=null;for(z in p)if(!d.hasOwnProperty(z)&&p.hasOwnProperty(z)&&p[z]!=null)if(z==="style"){var E=p[z];for(_ in E)E.hasOwnProperty(_)&&(l||(l={}),l[_]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(s.hasOwnProperty(z)?g||(g=[]):(g=g||[]).push(z,null));for(z in d){var A=d[z];if(E=p?.[z],d.hasOwnProperty(z)&&A!==E&&(A!=null||E!=null))if(z==="style")if(E){for(_ in E)!E.hasOwnProperty(_)||A&&A.hasOwnProperty(_)||(l||(l={}),l[_]="");for(_ in A)A.hasOwnProperty(_)&&E[_]!==A[_]&&(l||(l={}),l[_]=A[_])}else l||(g||(g=[]),g.push(z,l)),l=A;else z==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,E=E?E.__html:void 0,A!=null&&E!==A&&(g=g||[]).push(z,A)):z==="children"?typeof A!="string"&&typeof A!="number"||(g=g||[]).push(z,""+A):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(s.hasOwnProperty(z)?(A!=null&&z==="onScroll"&&mt("scroll",r),g||E===A||(g=[])):(g=g||[]).push(z,A))}l&&(g=g||[]).push("style",l);var z=g;(i.updateQueue=z)&&(i.flags|=4)}},Qg=function(r,i,l,d){l!==d&&(i.flags|=4)};function no(r,i){if(!bt)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Zt(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,d=0;if(i)for(var p=r.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags&14680064,d|=p.flags&14680064,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=l,i}function OS(r,i,l){var d=i.pendingProps;switch(sd(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(i),null;case 1:return fn(i.type)&&vl(),Zt(i),null;case 3:return d=i.stateNode,zi(),gt(hn),gt(Gt),bd(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(xl(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Yn!==null&&(Yd(Yn),Yn=null))),Ud(r,i),Zt(i),null;case 5:yd(i);var p=Wa(Qs.current);if(l=i.type,r!==null&&i.stateNode!=null)Zg(r,i,l,d,p),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!d){if(i.stateNode===null)throw Error(n(166));return Zt(i),null}if(r=Wa(ur.current),xl(i)){d=i.stateNode,l=i.type;var g=i.memoizedProps;switch(d[lr]=i,d[Ks]=g,r=(i.mode&1)!==0,l){case"dialog":mt("cancel",d),mt("close",d);break;case"iframe":case"object":case"embed":mt("load",d);break;case"video":case"audio":for(p=0;p<$s.length;p++)mt($s[p],d);break;case"source":mt("error",d);break;case"img":case"image":case"link":mt("error",d),mt("load",d);break;case"details":mt("toggle",d);break;case"input":ks(d,g),mt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!g.multiple},mt("invalid",d);break;case"textarea":Qo(d,g),mt("invalid",d)}bi(l,g),p=null;for(var _ in g)if(g.hasOwnProperty(_)){var E=g[_];_==="children"?typeof E=="string"?d.textContent!==E&&(g.suppressHydrationWarning!==!0&&ml(d.textContent,E,r),p=["children",E]):typeof E=="number"&&d.textContent!==""+E&&(g.suppressHydrationWarning!==!0&&ml(d.textContent,E,r),p=["children",""+E]):s.hasOwnProperty(_)&&E!=null&&_==="onScroll"&&mt("scroll",d)}switch(l){case"input":$n(d),Zo(d,g,!0);break;case"textarea":$n(d),or(d);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(d.onclick=gl)}d=p,i.updateQueue=d,d!==null&&(i.flags|=4)}else{_=p.nodeType===9?p:p.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Yr(l)),r==="http://www.w3.org/1999/xhtml"?l==="script"?(r=_.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=_.createElement(l,{is:d.is}):(r=_.createElement(l),l==="select"&&(_=r,d.multiple?_.multiple=!0:d.size&&(_.size=d.size))):r=_.createElementNS(r,l),r[lr]=i,r[Ks]=d,Yg(r,i,!1,!1),i.stateNode=r;e:{switch(_=_i(l,d),l){case"dialog":mt("cancel",r),mt("close",r),p=d;break;case"iframe":case"object":case"embed":mt("load",r),p=d;break;case"video":case"audio":for(p=0;p<$s.length;p++)mt($s[p],r);p=d;break;case"source":mt("error",r),p=d;break;case"img":case"image":case"link":mt("error",r),mt("load",r),p=d;break;case"details":mt("toggle",r),p=d;break;case"input":ks(r,d),p=en(r,d),mt("invalid",r);break;case"option":p=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},p=$({},d,{value:void 0}),mt("invalid",r);break;case"textarea":Qo(r,d),p=Ss(r,d),mt("invalid",r);break;default:p=d}bi(l,p),E=p;for(g in E)if(E.hasOwnProperty(g)){var A=E[g];g==="style"?Jo(r,A):g==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&Tn(r,A)):g==="children"?typeof A=="string"?(l!=="textarea"||A!=="")&&tn(r,A):typeof A=="number"&&tn(r,""+A):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(s.hasOwnProperty(g)?A!=null&&g==="onScroll"&&mt("scroll",r):A!=null&&M(r,g,A,_))}switch(l){case"input":$n(r),Zo(r,d,!1);break;case"textarea":$n(r),or(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Xe(d.value));break;case"select":r.multiple=!!d.multiple,g=d.value,g!=null?Gr(r,!!d.multiple,g,!1):d.defaultValue!=null&&Gr(r,!!d.multiple,d.defaultValue,!0);break;default:typeof p.onClick=="function"&&(r.onclick=gl)}switch(l){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return Zt(i),null;case 6:if(r&&i.stateNode!=null)Qg(r,i,r.memoizedProps,d);else{if(typeof d!="string"&&i.stateNode===null)throw Error(n(166));if(l=Wa(Qs.current),Wa(ur.current),xl(i)){if(d=i.stateNode,l=i.memoizedProps,d[lr]=i,(g=d.nodeValue!==l)&&(r=bn,r!==null))switch(r.tag){case 3:ml(d.nodeValue,l,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ml(d.nodeValue,l,(r.mode&1)!==0)}g&&(i.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[lr]=i,i.stateNode=d}return Zt(i),null;case 13:if(gt(wt),d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(bt&&_n!==null&&(i.mode&1)!==0&&(i.flags&128)===0)eg(),Ui(),i.flags|=98560,g=!1;else if(g=xl(i),d!==null&&d.dehydrated!==null){if(r===null){if(!g)throw Error(n(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[lr]=i}else Ui(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Zt(i),g=!1}else Yn!==null&&(Yd(Yn),Yn=null),g=!0;if(!g)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=l,i):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(wt.current&1)!==0?Nt===0&&(Nt=3):Xd())),i.updateQueue!==null&&(i.flags|=4),Zt(i),null);case 4:return zi(),Ud(r,i),r===null&&Hs(i.stateNode.containerInfo),Zt(i),null;case 10:return hd(i.type._context),Zt(i),null;case 17:return fn(i.type)&&vl(),Zt(i),null;case 19:if(gt(wt),g=i.memoizedState,g===null)return Zt(i),null;if(d=(i.flags&128)!==0,_=g.rendering,_===null)if(d)no(g,!1);else{if(Nt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(_=Rl(r),_!==null){for(i.flags|=128,no(g,!1),d=_.updateQueue,d!==null&&(i.updateQueue=d,i.flags|=4),i.subtreeFlags=0,d=l,l=i.child;l!==null;)g=l,r=d,g.flags&=14680066,_=g.alternate,_===null?(g.childLanes=0,g.lanes=r,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=_.childLanes,g.lanes=_.lanes,g.child=_.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=_.memoizedProps,g.memoizedState=_.memoizedState,g.updateQueue=_.updateQueue,g.type=_.type,r=_.dependencies,g.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l=l.sibling;return ft(wt,wt.current&1|2),i.child}r=r.sibling}g.tail!==null&&rt()>Ki&&(i.flags|=128,d=!0,no(g,!1),i.lanes=4194304)}else{if(!d)if(r=Rl(_),r!==null){if(i.flags|=128,d=!0,l=r.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),no(g,!0),g.tail===null&&g.tailMode==="hidden"&&!_.alternate&&!bt)return Zt(i),null}else 2*rt()-g.renderingStartTime>Ki&&l!==1073741824&&(i.flags|=128,d=!0,no(g,!1),i.lanes=4194304);g.isBackwards?(_.sibling=i.child,i.child=_):(l=g.last,l!==null?l.sibling=_:i.child=_,g.last=_)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=rt(),i.sibling=null,l=wt.current,ft(wt,d?l&1|2:l&1),i):(Zt(i),null);case 22:case 23:return Qd(),d=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(i.flags|=8192),d&&(i.mode&1)!==0?(wn&1073741824)!==0&&(Zt(i),i.subtreeFlags&6&&(i.flags|=8192)):Zt(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function IS(r,i){switch(sd(i),i.tag){case 1:return fn(i.type)&&vl(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return zi(),gt(hn),gt(Gt),bd(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return yd(i),null;case 13:if(gt(wt),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Ui()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return gt(wt),null;case 4:return zi(),null;case 10:return hd(i.type._context),null;case 22:case 23:return Qd(),null;case 24:return null;default:return null}}var Ul=!1,Qt=!1,jS=typeof WeakSet=="function"?WeakSet:Set,me=null;function Hi(r,i){var l=r.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){xt(r,i,d)}else l.current=null}function Bd(r,i,l){try{l()}catch(d){xt(r,i,d)}}var Xg=!1;function US(r,i){if(Qc=al,r=Am(),$c(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var p=d.anchorOffset,g=d.focusNode;d=d.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var _=0,E=-1,A=-1,z=0,ee=0,ne=r,J=null;t:for(;;){for(var de;ne!==l||p!==0&&ne.nodeType!==3||(E=_+p),ne!==g||d!==0&&ne.nodeType!==3||(A=_+d),ne.nodeType===3&&(_+=ne.nodeValue.length),(de=ne.firstChild)!==null;)J=ne,ne=de;for(;;){if(ne===r)break t;if(J===l&&++z===p&&(E=_),J===g&&++ee===d&&(A=_),(de=ne.nextSibling)!==null)break;ne=J,J=ne.parentNode}ne=de}l=E===-1||A===-1?null:{start:E,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Xc={focusedElem:r,selectionRange:l},al=!1,me=i;me!==null;)if(i=me,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,me=r;else for(;me!==null;){i=me;try{var ye=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var ke=ye.memoizedProps,Tt=ye.memoizedState,B=i.stateNode,O=B.getSnapshotBeforeUpdate(i.elementType===i.type?ke:Zn(i.type,ke),Tt);B.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var F=i.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(se){xt(i,i.return,se)}if(r=i.sibling,r!==null){r.return=i.return,me=r;break}me=i.return}return ye=Xg,Xg=!1,ye}function ro(r,i,l){var d=i.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var p=d=d.next;do{if((p.tag&r)===r){var g=p.destroy;p.destroy=void 0,g!==void 0&&Bd(i,l,g)}p=p.next}while(p!==d)}}function Bl(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&r)===r){var d=l.create;l.destroy=d()}l=l.next}while(l!==i)}}function Fd(r){var i=r.ref;if(i!==null){var l=r.stateNode;r.tag,r=l,typeof i=="function"?i(r):i.current=r}}function Jg(r){var i=r.alternate;i!==null&&(r.alternate=null,Jg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[lr],delete i[Ks],delete i[nd],delete i[_S],delete i[wS])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function ey(r){return r.tag===5||r.tag===3||r.tag===4}function ty(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||ey(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Vd(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?l.nodeType===8?l.parentNode.insertBefore(r,i):l.insertBefore(r,i):(l.nodeType===8?(i=l.parentNode,i.insertBefore(r,l)):(i=l,i.appendChild(r)),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=gl));else if(d!==4&&(r=r.child,r!==null))for(Vd(r,i,l),r=r.sibling;r!==null;)Vd(r,i,l),r=r.sibling}function zd(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(zd(r,i,l),r=r.sibling;r!==null;)zd(r,i,l),r=r.sibling}var Ht=null,Qn=!1;function ma(r,i,l){for(l=l.child;l!==null;)ny(r,i,l),l=l.sibling}function ny(r,i,l){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Cn,l)}catch{}switch(l.tag){case 5:Qt||Hi(l,i);case 6:var d=Ht,p=Qn;Ht=null,ma(r,i,l),Ht=d,Qn=p,Ht!==null&&(Qn?(r=Ht,l=l.stateNode,r.nodeType===8?r.parentNode.removeChild(l):r.removeChild(l)):Ht.removeChild(l.stateNode));break;case 18:Ht!==null&&(Qn?(r=Ht,l=l.stateNode,r.nodeType===8?td(r.parentNode,l):r.nodeType===1&&td(r,l),Os(r)):td(Ht,l.stateNode));break;case 4:d=Ht,p=Qn,Ht=l.stateNode.containerInfo,Qn=!0,ma(r,i,l),Ht=d,Qn=p;break;case 0:case 11:case 14:case 15:if(!Qt&&(d=l.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){p=d=d.next;do{var g=p,_=g.destroy;g=g.tag,_!==void 0&&((g&2)!==0||(g&4)!==0)&&Bd(l,i,_),p=p.next}while(p!==d)}ma(r,i,l);break;case 1:if(!Qt&&(Hi(l,i),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(E){xt(l,i,E)}ma(r,i,l);break;case 21:ma(r,i,l);break;case 22:l.mode&1?(Qt=(d=Qt)||l.memoizedState!==null,ma(r,i,l),Qt=d):ma(r,i,l);break;default:ma(r,i,l)}}function ry(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var l=r.stateNode;l===null&&(l=r.stateNode=new jS),i.forEach(function(d){var p=qS.bind(null,r,d);l.has(d)||(l.add(d),d.then(p,p))})}}function Xn(r,i){var l=i.deletions;if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];try{var g=r,_=i,E=_;e:for(;E!==null;){switch(E.tag){case 5:Ht=E.stateNode,Qn=!1;break e;case 3:Ht=E.stateNode.containerInfo,Qn=!0;break e;case 4:Ht=E.stateNode.containerInfo,Qn=!0;break e}E=E.return}if(Ht===null)throw Error(n(160));ny(g,_,p),Ht=null,Qn=!1;var A=p.alternate;A!==null&&(A.return=null),p.return=null}catch(z){xt(p,i,z)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)ay(i,r),i=i.sibling}function ay(r,i){var l=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Xn(i,r),dr(r),d&4){try{ro(3,r,r.return),Bl(3,r)}catch(ke){xt(r,r.return,ke)}try{ro(5,r,r.return)}catch(ke){xt(r,r.return,ke)}}break;case 1:Xn(i,r),dr(r),d&512&&l!==null&&Hi(l,l.return);break;case 5:if(Xn(i,r),dr(r),d&512&&l!==null&&Hi(l,l.return),r.flags&32){var p=r.stateNode;try{tn(p,"")}catch(ke){xt(r,r.return,ke)}}if(d&4&&(p=r.stateNode,p!=null)){var g=r.memoizedProps,_=l!==null?l.memoizedProps:g,E=r.type,A=r.updateQueue;if(r.updateQueue=null,A!==null)try{E==="input"&&g.type==="radio"&&g.name!=null&&Yo(p,g),_i(E,_);var z=_i(E,g);for(_=0;_<A.length;_+=2){var ee=A[_],ne=A[_+1];ee==="style"?Jo(p,ne):ee==="dangerouslySetInnerHTML"?Tn(p,ne):ee==="children"?tn(p,ne):M(p,ee,ne,z)}switch(E){case"input":Hn(p,g);break;case"textarea":Xo(p,g);break;case"select":var J=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var de=g.value;de!=null?Gr(p,!!g.multiple,de,!1):J!==!!g.multiple&&(g.defaultValue!=null?Gr(p,!!g.multiple,g.defaultValue,!0):Gr(p,!!g.multiple,g.multiple?[]:"",!1))}p[Ks]=g}catch(ke){xt(r,r.return,ke)}}break;case 6:if(Xn(i,r),dr(r),d&4){if(r.stateNode===null)throw Error(n(162));p=r.stateNode,g=r.memoizedProps;try{p.nodeValue=g}catch(ke){xt(r,r.return,ke)}}break;case 3:if(Xn(i,r),dr(r),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Os(i.containerInfo)}catch(ke){xt(r,r.return,ke)}break;case 4:Xn(i,r),dr(r);break;case 13:Xn(i,r),dr(r),p=r.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(Wd=rt())),d&4&&ry(r);break;case 22:if(ee=l!==null&&l.memoizedState!==null,r.mode&1?(Qt=(z=Qt)||ee,Xn(i,r),Qt=z):Xn(i,r),dr(r),d&8192){if(z=r.memoizedState!==null,(r.stateNode.isHidden=z)&&!ee&&(r.mode&1)!==0)for(me=r,ee=r.child;ee!==null;){for(ne=me=ee;me!==null;){switch(J=me,de=J.child,J.tag){case 0:case 11:case 14:case 15:ro(4,J,J.return);break;case 1:Hi(J,J.return);var ye=J.stateNode;if(typeof ye.componentWillUnmount=="function"){d=J,l=J.return;try{i=d,ye.props=i.memoizedProps,ye.state=i.memoizedState,ye.componentWillUnmount()}catch(ke){xt(d,l,ke)}}break;case 5:Hi(J,J.return);break;case 22:if(J.memoizedState!==null){oy(ne);continue}}de!==null?(de.return=J,me=de):oy(ne)}ee=ee.sibling}e:for(ee=null,ne=r;;){if(ne.tag===5){if(ee===null){ee=ne;try{p=ne.stateNode,z?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(E=ne.stateNode,A=ne.memoizedProps.style,_=A!=null&&A.hasOwnProperty("display")?A.display:null,E.style.display=vi("display",_))}catch(ke){xt(r,r.return,ke)}}}else if(ne.tag===6){if(ee===null)try{ne.stateNode.nodeValue=z?"":ne.memoizedProps}catch(ke){xt(r,r.return,ke)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===r)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===r)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===r)break e;ee===ne&&(ee=null),ne=ne.return}ee===ne&&(ee=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:Xn(i,r),dr(r),d&4&&ry(r);break;case 21:break;default:Xn(i,r),dr(r)}}function dr(r){var i=r.flags;if(i&2){try{e:{for(var l=r.return;l!==null;){if(ey(l)){var d=l;break e}l=l.return}throw Error(n(160))}switch(d.tag){case 5:var p=d.stateNode;d.flags&32&&(tn(p,""),d.flags&=-33);var g=ty(r);zd(r,g,p);break;case 3:case 4:var _=d.stateNode.containerInfo,E=ty(r);Vd(r,E,_);break;default:throw Error(n(161))}}catch(A){xt(r,r.return,A)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function BS(r,i,l){me=r,iy(r)}function iy(r,i,l){for(var d=(r.mode&1)!==0;me!==null;){var p=me,g=p.child;if(p.tag===22&&d){var _=p.memoizedState!==null||Ul;if(!_){var E=p.alternate,A=E!==null&&E.memoizedState!==null||Qt;E=Ul;var z=Qt;if(Ul=_,(Qt=A)&&!z)for(me=p;me!==null;)_=me,A=_.child,_.tag===22&&_.memoizedState!==null?ly(p):A!==null?(A.return=_,me=A):ly(p);for(;g!==null;)me=g,iy(g),g=g.sibling;me=p,Ul=E,Qt=z}sy(r)}else(p.subtreeFlags&8772)!==0&&g!==null?(g.return=p,me=g):sy(r)}}function sy(r){for(;me!==null;){var i=me;if((i.flags&8772)!==0){var l=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Qt||Bl(5,i);break;case 1:var d=i.stateNode;if(i.flags&4&&!Qt)if(l===null)d.componentDidMount();else{var p=i.elementType===i.type?l.memoizedProps:Zn(i.type,l.memoizedProps);d.componentDidUpdate(p,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var g=i.updateQueue;g!==null&&og(i,g,d);break;case 3:var _=i.updateQueue;if(_!==null){if(l=null,i.child!==null)switch(i.child.tag){case 5:l=i.child.stateNode;break;case 1:l=i.child.stateNode}og(i,_,l)}break;case 5:var E=i.stateNode;if(l===null&&i.flags&4){l=E;var A=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&l.focus();break;case"img":A.src&&(l.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var z=i.alternate;if(z!==null){var ee=z.memoizedState;if(ee!==null){var ne=ee.dehydrated;ne!==null&&Os(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Qt||i.flags&512&&Fd(i)}catch(J){xt(i,i.return,J)}}if(i===r){me=null;break}if(l=i.sibling,l!==null){l.return=i.return,me=l;break}me=i.return}}function oy(r){for(;me!==null;){var i=me;if(i===r){me=null;break}var l=i.sibling;if(l!==null){l.return=i.return,me=l;break}me=i.return}}function ly(r){for(;me!==null;){var i=me;try{switch(i.tag){case 0:case 11:case 15:var l=i.return;try{Bl(4,i)}catch(A){xt(i,l,A)}break;case 1:var d=i.stateNode;if(typeof d.componentDidMount=="function"){var p=i.return;try{d.componentDidMount()}catch(A){xt(i,p,A)}}var g=i.return;try{Fd(i)}catch(A){xt(i,g,A)}break;case 5:var _=i.return;try{Fd(i)}catch(A){xt(i,_,A)}}}catch(A){xt(i,i.return,A)}if(i===r){me=null;break}var E=i.sibling;if(E!==null){E.return=i.return,me=E;break}me=i.return}}var FS=Math.ceil,Fl=I.ReactCurrentDispatcher,$d=I.ReactCurrentOwner,Dn=I.ReactCurrentBatchConfig,at=0,Ft=null,Rt=null,Wt=0,wn=0,Wi=ca(0),Nt=0,ao=null,qa=0,Vl=0,Hd=0,io=null,mn=null,Wd=0,Ki=1/0,Br=null,zl=!1,Kd=null,ga=null,$l=!1,ya=null,Hl=0,so=0,qd=null,Wl=-1,Kl=0;function sn(){return(at&6)!==0?rt():Wl!==-1?Wl:Wl=rt()}function va(r){return(r.mode&1)===0?1:(at&2)!==0&&Wt!==0?Wt&-Wt:xS.transition!==null?(Kl===0&&(Kl=tm()),Kl):(r=ut,r!==0||(r=window.event,r=r===void 0?16:cm(r.type)),r)}function Jn(r,i,l,d){if(50<so)throw so=0,qd=null,Error(n(185));As(r,l,d),((at&2)===0||r!==Ft)&&(r===Ft&&((at&2)===0&&(Vl|=l),Nt===4&&ba(r,Wt)),gn(r,d),l===1&&at===0&&(i.mode&1)===0&&(Ki=rt()+500,_l&&ha()))}function gn(r,i){var l=r.callbackNode;xx(r,i);var d=Pi(r,r===Ft?Wt:0);if(d===0)l!==null&&Pt(l),r.callbackNode=null,r.callbackPriority=0;else if(i=d&-d,r.callbackPriority!==i){if(l!=null&&Pt(l),i===1)r.tag===0?kS(cy.bind(null,r)):Ym(cy.bind(null,r)),vS(function(){(at&6)===0&&ha()}),l=null;else{switch(nm(d)){case 1:l=Rr;break;case 4:l=qn;break;case 16:l=nn;break;case 536870912:l=ea;break;default:l=nn}l=vy(l,uy.bind(null,r))}r.callbackPriority=i,r.callbackNode=l}}function uy(r,i){if(Wl=-1,Kl=0,(at&6)!==0)throw Error(n(327));var l=r.callbackNode;if(qi()&&r.callbackNode!==l)return null;var d=Pi(r,r===Ft?Wt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||i)i=ql(r,d);else{i=d;var p=at;at|=2;var g=hy();(Ft!==r||Wt!==i)&&(Br=null,Ki=rt()+500,Ya(r,i));do try{$S();break}catch(E){dy(r,E)}while(!0);dd(),Fl.current=g,at=p,Rt!==null?i=0:(Ft=null,Wt=0,i=Nt)}if(i!==0){if(i===2&&(p=Cc(r),p!==0&&(d=p,i=Gd(r,p))),i===1)throw l=ao,Ya(r,0),ba(r,d),gn(r,rt()),l;if(i===6)ba(r,d);else{if(p=r.current.alternate,(d&30)===0&&!VS(p)&&(i=ql(r,d),i===2&&(g=Cc(r),g!==0&&(d=g,i=Gd(r,g))),i===1))throw l=ao,Ya(r,0),ba(r,d),gn(r,rt()),l;switch(r.finishedWork=p,r.finishedLanes=d,i){case 0:case 1:throw Error(n(345));case 2:Za(r,mn,Br);break;case 3:if(ba(r,d),(d&130023424)===d&&(i=Wd+500-rt(),10<i)){if(Pi(r,0)!==0)break;if(p=r.suspendedLanes,(p&d)!==d){sn(),r.pingedLanes|=r.suspendedLanes&p;break}r.timeoutHandle=ed(Za.bind(null,r,mn,Br),i);break}Za(r,mn,Br);break;case 4:if(ba(r,d),(d&4194240)===d)break;for(i=r.eventTimes,p=-1;0<d;){var _=31-$e(d);g=1<<_,_=i[_],_>p&&(p=_),d&=~g}if(d=p,d=rt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*FS(d/1960))-d,10<d){r.timeoutHandle=ed(Za.bind(null,r,mn,Br),d);break}Za(r,mn,Br);break;case 5:Za(r,mn,Br);break;default:throw Error(n(329))}}}return gn(r,rt()),r.callbackNode===l?uy.bind(null,r):null}function Gd(r,i){var l=io;return r.current.memoizedState.isDehydrated&&(Ya(r,i).flags|=256),r=ql(r,i),r!==2&&(i=mn,mn=l,i!==null&&Yd(i)),r}function Yd(r){mn===null?mn=r:mn.push.apply(mn,r)}function VS(r){for(var i=r;;){if(i.flags&16384){var l=i.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var d=0;d<l.length;d++){var p=l[d],g=p.getSnapshot;p=p.value;try{if(!Gn(g(),p))return!1}catch{return!1}}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ba(r,i){for(i&=~Hd,i&=~Vl,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var l=31-$e(i),d=1<<l;r[l]=-1,i&=~d}}function cy(r){if((at&6)!==0)throw Error(n(327));qi();var i=Pi(r,0);if((i&1)===0)return gn(r,rt()),null;var l=ql(r,i);if(r.tag!==0&&l===2){var d=Cc(r);d!==0&&(i=d,l=Gd(r,d))}if(l===1)throw l=ao,Ya(r,0),ba(r,i),gn(r,rt()),l;if(l===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Za(r,mn,Br),gn(r,rt()),null}function Zd(r,i){var l=at;at|=1;try{return r(i)}finally{at=l,at===0&&(Ki=rt()+500,_l&&ha())}}function Ga(r){ya!==null&&ya.tag===0&&(at&6)===0&&qi();var i=at;at|=1;var l=Dn.transition,d=ut;try{if(Dn.transition=null,ut=1,r)return r()}finally{ut=d,Dn.transition=l,at=i,(at&6)===0&&ha()}}function Qd(){wn=Wi.current,gt(Wi)}function Ya(r,i){r.finishedWork=null,r.finishedLanes=0;var l=r.timeoutHandle;if(l!==-1&&(r.timeoutHandle=-1,yS(l)),Rt!==null)for(l=Rt.return;l!==null;){var d=l;switch(sd(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&vl();break;case 3:zi(),gt(hn),gt(Gt),bd();break;case 5:yd(d);break;case 4:zi();break;case 13:gt(wt);break;case 19:gt(wt);break;case 10:hd(d.type._context);break;case 22:case 23:Qd()}l=l.return}if(Ft=r,Rt=r=_a(r.current,null),Wt=wn=i,Nt=0,ao=null,Hd=Vl=qa=0,mn=io=null,Ha!==null){for(i=0;i<Ha.length;i++)if(l=Ha[i],d=l.interleaved,d!==null){l.interleaved=null;var p=d.next,g=l.pending;if(g!==null){var _=g.next;g.next=p,d.next=_}l.pending=d}Ha=null}return r}function dy(r,i){do{var l=Rt;try{if(dd(),Al.current=Nl,Ll){for(var d=kt.memoizedState;d!==null;){var p=d.queue;p!==null&&(p.pending=null),d=d.next}Ll=!1}if(Ka=0,Bt=Mt=kt=null,Xs=!1,Js=0,$d.current=null,l===null||l.return===null){Nt=1,ao=i,Rt=null;break}e:{var g=r,_=l.return,E=l,A=i;if(i=Wt,E.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var z=A,ee=E,ne=ee.tag;if((ee.mode&1)===0&&(ne===0||ne===11||ne===15)){var J=ee.alternate;J?(ee.updateQueue=J.updateQueue,ee.memoizedState=J.memoizedState,ee.lanes=J.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var de=Ig(_);if(de!==null){de.flags&=-257,jg(de,_,E,g,i),de.mode&1&&Og(g,z,i),i=de,A=z;var ye=i.updateQueue;if(ye===null){var ke=new Set;ke.add(A),i.updateQueue=ke}else ye.add(A);break e}else{if((i&1)===0){Og(g,z,i),Xd();break e}A=Error(n(426))}}else if(bt&&E.mode&1){var Tt=Ig(_);if(Tt!==null){(Tt.flags&65536)===0&&(Tt.flags|=256),jg(Tt,_,E,g,i),ud($i(A,E));break e}}g=A=$i(A,E),Nt!==4&&(Nt=2),io===null?io=[g]:io.push(g),g=_;do{switch(g.tag){case 3:g.flags|=65536,i&=-i,g.lanes|=i;var B=Mg(g,A,i);sg(g,B);break e;case 1:E=A;var O=g.type,F=g.stateNode;if((g.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(ga===null||!ga.has(F)))){g.flags|=65536,i&=-i,g.lanes|=i;var se=Ng(g,E,i);sg(g,se);break e}}g=g.return}while(g!==null)}py(l)}catch(Pe){i=Pe,Rt===l&&l!==null&&(Rt=l=l.return);continue}break}while(!0)}function hy(){var r=Fl.current;return Fl.current=Nl,r===null?Nl:r}function Xd(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),Ft===null||(qa&268435455)===0&&(Vl&268435455)===0||ba(Ft,Wt)}function ql(r,i){var l=at;at|=2;var d=hy();(Ft!==r||Wt!==i)&&(Br=null,Ya(r,i));do try{zS();break}catch(p){dy(r,p)}while(!0);if(dd(),at=l,Fl.current=d,Rt!==null)throw Error(n(261));return Ft=null,Wt=0,Nt}function zS(){for(;Rt!==null;)fy(Rt)}function $S(){for(;Rt!==null&&!$t();)fy(Rt)}function fy(r){var i=yy(r.alternate,r,wn);r.memoizedProps=r.pendingProps,i===null?py(r):Rt=i,$d.current=null}function py(r){var i=r;do{var l=i.alternate;if(r=i.return,(i.flags&32768)===0){if(l=OS(l,i,wn),l!==null){Rt=l;return}}else{if(l=IS(l,i),l!==null){l.flags&=32767,Rt=l;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Nt=6,Rt=null;return}}if(i=i.sibling,i!==null){Rt=i;return}Rt=i=r}while(i!==null);Nt===0&&(Nt=5)}function Za(r,i,l){var d=ut,p=Dn.transition;try{Dn.transition=null,ut=1,HS(r,i,l,d)}finally{Dn.transition=p,ut=d}return null}function HS(r,i,l,d){do qi();while(ya!==null);if((at&6)!==0)throw Error(n(327));l=r.finishedWork;var p=r.finishedLanes;if(l===null)return null;if(r.finishedWork=null,r.finishedLanes=0,l===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var g=l.lanes|l.childLanes;if(Sx(r,g),r===Ft&&(Rt=Ft=null,Wt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||$l||($l=!0,vy(nn,function(){return qi(),null})),g=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||g){g=Dn.transition,Dn.transition=null;var _=ut;ut=1;var E=at;at|=4,$d.current=null,US(r,l),ay(l,r),cS(Xc),al=!!Qc,Xc=Qc=null,r.current=l,BS(l),lt(),at=E,ut=_,Dn.transition=g}else r.current=l;if($l&&($l=!1,ya=r,Hl=p),g=r.pendingLanes,g===0&&(ga=null),Si(l.stateNode),gn(r,rt()),i!==null)for(d=r.onRecoverableError,l=0;l<i.length;l++)p=i[l],d(p.value,{componentStack:p.stack,digest:p.digest});if(zl)throw zl=!1,r=Kd,Kd=null,r;return(Hl&1)!==0&&r.tag!==0&&qi(),g=r.pendingLanes,(g&1)!==0?r===qd?so++:(so=0,qd=r):so=0,ha(),null}function qi(){if(ya!==null){var r=nm(Hl),i=Dn.transition,l=ut;try{if(Dn.transition=null,ut=16>r?16:r,ya===null)var d=!1;else{if(r=ya,ya=null,Hl=0,(at&6)!==0)throw Error(n(331));var p=at;for(at|=4,me=r.current;me!==null;){var g=me,_=g.child;if((me.flags&16)!==0){var E=g.deletions;if(E!==null){for(var A=0;A<E.length;A++){var z=E[A];for(me=z;me!==null;){var ee=me;switch(ee.tag){case 0:case 11:case 15:ro(8,ee,g)}var ne=ee.child;if(ne!==null)ne.return=ee,me=ne;else for(;me!==null;){ee=me;var J=ee.sibling,de=ee.return;if(Jg(ee),ee===z){me=null;break}if(J!==null){J.return=de,me=J;break}me=de}}}var ye=g.alternate;if(ye!==null){var ke=ye.child;if(ke!==null){ye.child=null;do{var Tt=ke.sibling;ke.sibling=null,ke=Tt}while(ke!==null)}}me=g}}if((g.subtreeFlags&2064)!==0&&_!==null)_.return=g,me=_;else e:for(;me!==null;){if(g=me,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:ro(9,g,g.return)}var B=g.sibling;if(B!==null){B.return=g.return,me=B;break e}me=g.return}}var O=r.current;for(me=O;me!==null;){_=me;var F=_.child;if((_.subtreeFlags&2064)!==0&&F!==null)F.return=_,me=F;else e:for(_=O;me!==null;){if(E=me,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Bl(9,E)}}catch(Pe){xt(E,E.return,Pe)}if(E===_){me=null;break e}var se=E.sibling;if(se!==null){se.return=E.return,me=se;break e}me=E.return}}if(at=p,ha(),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Cn,r)}catch{}d=!0}return d}finally{ut=l,Dn.transition=i}}return!1}function my(r,i,l){i=$i(l,i),i=Mg(r,i,1),r=pa(r,i,1),i=sn(),r!==null&&(As(r,1,i),gn(r,i))}function xt(r,i,l){if(r.tag===3)my(r,r,l);else for(;i!==null;){if(i.tag===3){my(i,r,l);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ga===null||!ga.has(d))){r=$i(l,r),r=Ng(i,r,1),i=pa(i,r,1),r=sn(),i!==null&&(As(i,1,r),gn(i,r));break}}i=i.return}}function WS(r,i,l){var d=r.pingCache;d!==null&&d.delete(i),i=sn(),r.pingedLanes|=r.suspendedLanes&l,Ft===r&&(Wt&l)===l&&(Nt===4||Nt===3&&(Wt&130023424)===Wt&&500>rt()-Wd?Ya(r,0):Hd|=l),gn(r,i)}function gy(r,i){i===0&&((r.mode&1)===0?i=1:(i=Lr,Lr<<=1,(Lr&130023424)===0&&(Lr=4194304)));var l=sn();r=Ir(r,i),r!==null&&(As(r,i,l),gn(r,l))}function KS(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),gy(r,l)}function qS(r,i){var l=0;switch(r.tag){case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(l=p.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(i),gy(r,l)}var yy;yy=function(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps||hn.current)pn=!0;else{if((r.lanes&l)===0&&(i.flags&128)===0)return pn=!1,NS(r,i,l);pn=(r.flags&131072)!==0}else pn=!1,bt&&(i.flags&1048576)!==0&&Zm(i,kl,i.index);switch(i.lanes=0,i.tag){case 2:var d=i.type;jl(r,i),r=i.pendingProps;var p=Oi(i,Gt.current);Vi(i,l),p=kd(null,i,d,r,p,l);var g=xd();return i.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,fn(d)?(g=!0,bl(i)):g=!1,i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,md(i),p.updater=Ol,i.stateNode=p,p._reactInternals=i,Rd(i,d,r,l),i=Md(null,i,d,!0,g,l)):(i.tag=0,bt&&g&&id(i),an(null,i,p,l),i=i.child),i;case 16:d=i.elementType;e:{switch(jl(r,i),r=i.pendingProps,p=d._init,d=p(d._payload),i.type=d,p=i.tag=YS(d),r=Zn(d,r),p){case 0:i=Dd(null,i,d,r,l);break e;case 1:i=$g(null,i,d,r,l);break e;case 11:i=Ug(null,i,d,r,l);break e;case 14:i=Bg(null,i,d,Zn(d.type,r),l);break e}throw Error(n(306,d,""))}return i;case 0:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Zn(d,p),Dd(r,i,d,p,l);case 1:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Zn(d,p),$g(r,i,d,p,l);case 3:e:{if(Hg(i),r===null)throw Error(n(387));d=i.pendingProps,g=i.memoizedState,p=g.element,ig(r,i),El(i,d,null,l);var _=i.memoizedState;if(d=_.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){p=$i(Error(n(423)),i),i=Wg(r,i,d,l,p);break e}else if(d!==p){p=$i(Error(n(424)),i),i=Wg(r,i,d,l,p);break e}else for(_n=ua(i.stateNode.containerInfo.firstChild),bn=i,bt=!0,Yn=null,l=rg(i,null,d,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ui(),d===p){i=Ur(r,i,l);break e}an(r,i,d,l)}i=i.child}return i;case 5:return lg(i),r===null&&ld(i),d=i.type,p=i.pendingProps,g=r!==null?r.memoizedProps:null,_=p.children,Jc(d,p)?_=null:g!==null&&Jc(d,g)&&(i.flags|=32),zg(r,i),an(r,i,_,l),i.child;case 6:return r===null&&ld(i),null;case 13:return Kg(r,i,l);case 4:return gd(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=Bi(i,null,d,l):an(r,i,d,l),i.child;case 11:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Zn(d,p),Ug(r,i,d,p,l);case 7:return an(r,i,i.pendingProps,l),i.child;case 8:return an(r,i,i.pendingProps.children,l),i.child;case 12:return an(r,i,i.pendingProps.children,l),i.child;case 10:e:{if(d=i.type._context,p=i.pendingProps,g=i.memoizedProps,_=p.value,ft(Pl,d._currentValue),d._currentValue=_,g!==null)if(Gn(g.value,_)){if(g.children===p.children&&!hn.current){i=Ur(r,i,l);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var E=g.dependencies;if(E!==null){_=g.child;for(var A=E.firstContext;A!==null;){if(A.context===d){if(g.tag===1){A=jr(-1,l&-l),A.tag=2;var z=g.updateQueue;if(z!==null){z=z.shared;var ee=z.pending;ee===null?A.next=A:(A.next=ee.next,ee.next=A),z.pending=A}}g.lanes|=l,A=g.alternate,A!==null&&(A.lanes|=l),fd(g.return,l,i),E.lanes|=l;break}A=A.next}}else if(g.tag===10)_=g.type===i.type?null:g.child;else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=l,E=_.alternate,E!==null&&(E.lanes|=l),fd(_,l,i),_=g.sibling}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===i){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}an(r,i,p.children,l),i=i.child}return i;case 9:return p=i.type,d=i.pendingProps.children,Vi(i,l),p=An(p),d=d(p),i.flags|=1,an(r,i,d,l),i.child;case 14:return d=i.type,p=Zn(d,i.pendingProps),p=Zn(d.type,p),Bg(r,i,d,p,l);case 15:return Fg(r,i,i.type,i.pendingProps,l);case 17:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Zn(d,p),jl(r,i),i.tag=1,fn(d)?(r=!0,bl(i)):r=!1,Vi(i,l),Lg(i,d,p),Rd(i,d,p,l),Md(null,i,d,!0,r,l);case 19:return Gg(r,i,l);case 22:return Vg(r,i,l)}throw Error(n(156,i.tag))};function vy(r,i){return ht(r,i)}function GS(r,i,l,d){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(r,i,l,d){return new GS(r,i,l,d)}function Jd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function YS(r){if(typeof r=="function")return Jd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===oe)return 11;if(r===ce)return 14}return 2}function _a(r,i){var l=r.alternate;return l===null?(l=Mn(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&14680064,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l}function Gl(r,i,l,d,p,g){var _=2;if(d=r,typeof r=="function")Jd(r)&&(_=1);else if(typeof r=="string")_=5;else e:switch(r){case W:return Qa(l.children,p,g,i);case S:_=8,p|=8;break;case Z:return r=Mn(12,l,i,p|2),r.elementType=Z,r.lanes=g,r;case Re:return r=Mn(13,l,i,p),r.elementType=Re,r.lanes=g,r;case fe:return r=Mn(19,l,i,p),r.elementType=fe,r.lanes=g,r;case Me:return Yl(l,p,g,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case X:_=10;break e;case _e:_=9;break e;case oe:_=11;break e;case ce:_=14;break e;case ue:_=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=Mn(_,l,i,p),i.elementType=r,i.type=d,i.lanes=g,i}function Qa(r,i,l,d){return r=Mn(7,r,d,i),r.lanes=l,r}function Yl(r,i,l,d){return r=Mn(22,r,d,i),r.elementType=Me,r.lanes=l,r.stateNode={isHidden:!1},r}function eh(r,i,l){return r=Mn(6,r,null,i),r.lanes=l,r}function th(r,i,l){return i=Mn(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function ZS(r,i,l,d,p){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ec(0),this.expirationTimes=Ec(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ec(0),this.identifierPrefix=d,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function nh(r,i,l,d,p,g,_,E,A){return r=new ZS(r,i,l,E,A),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Mn(3,null,null,i),r.current=g,g.stateNode=r,g.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},md(g),r}function QS(r,i,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:G,key:d==null?null:""+d,children:r,containerInfo:i,implementation:l}}function by(r){if(!r)return da;r=r._reactInternals;e:{if(he(r)!==r||r.tag!==1)throw Error(n(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(fn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(r.tag===1){var l=r.type;if(fn(l))return qm(r,l,i)}return i}function _y(r,i,l,d,p,g,_,E,A){return r=nh(l,d,!0,r,p,g,_,E,A),r.context=by(null),l=r.current,d=sn(),p=va(l),g=jr(d,p),g.callback=i??null,pa(l,g,p),r.current.lanes=p,As(r,p,d),gn(r,d),r}function Zl(r,i,l,d){var p=i.current,g=sn(),_=va(p);return l=by(l),i.context===null?i.context=l:i.pendingContext=l,i=jr(g,_),i.payload={element:r},d=d===void 0?null:d,d!==null&&(i.callback=d),r=pa(p,i,_),r!==null&&(Jn(r,p,_,g),Cl(r,p,_)),_}function Ql(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function wy(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function rh(r,i){wy(r,i),(r=r.alternate)&&wy(r,i)}function XS(){return null}var ky=typeof reportError=="function"?reportError:function(r){console.error(r)};function ah(r){this._internalRoot=r}Xl.prototype.render=ah.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));Zl(r,i,null,null)},Xl.prototype.unmount=ah.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Ga(function(){Zl(null,r,null,null)}),i[Dr]=null}};function Xl(r){this._internalRoot=r}Xl.prototype.unstable_scheduleHydration=function(r){if(r){var i=im();r={blockedOn:null,target:r,priority:i};for(var l=0;l<sa.length&&i!==0&&i<sa[l].priority;l++);sa.splice(l,0,r),l===0&&lm(r)}};function ih(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Jl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function xy(){}function JS(r,i,l,d,p){if(p){if(typeof d=="function"){var g=d;d=function(){var z=Ql(_);g.call(z)}}var _=_y(i,d,r,0,null,!1,!1,"",xy);return r._reactRootContainer=_,r[Dr]=_.current,Hs(r.nodeType===8?r.parentNode:r),Ga(),_}for(;p=r.lastChild;)r.removeChild(p);if(typeof d=="function"){var E=d;d=function(){var z=Ql(A);E.call(z)}}var A=nh(r,0,!1,null,null,!1,!1,"",xy);return r._reactRootContainer=A,r[Dr]=A.current,Hs(r.nodeType===8?r.parentNode:r),Ga(function(){Zl(i,A,l,d)}),A}function eu(r,i,l,d,p){var g=l._reactRootContainer;if(g){var _=g;if(typeof p=="function"){var E=p;p=function(){var A=Ql(_);E.call(A)}}Zl(i,_,r,p)}else _=JS(l,i,r,p,d);return Ql(_)}rm=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var l=na(i.pendingLanes);l!==0&&(Rc(i,l|1),gn(i,rt()),(at&6)===0&&(Ki=rt()+500,ha()))}break;case 13:Ga(function(){var d=Ir(r,1);if(d!==null){var p=sn();Jn(d,r,1,p)}}),rh(r,1)}},Ac=function(r){if(r.tag===13){var i=Ir(r,134217728);if(i!==null){var l=sn();Jn(i,r,134217728,l)}rh(r,134217728)}},am=function(r){if(r.tag===13){var i=va(r),l=Ir(r,i);if(l!==null){var d=sn();Jn(l,r,i,d)}rh(r,i)}},im=function(){return ut},sm=function(r,i){var l=ut;try{return ut=r,i()}finally{ut=l}},ki=function(r,i,l){switch(i){case"input":if(Hn(r,l),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<l.length;i++){var d=l[i];if(d!==r&&d.form===r.form){var p=yl(d);if(!p)throw Error(n(90));Tr(d),Hn(d,p)}}}break;case"textarea":Xo(r,l);break;case"select":i=l.value,i!=null&&Gr(r,!!l.multiple,i,!1)}},tl=Zd,Cs=Ga;var eP={usingClientEntryPoint:!1,Events:[qs,Mi,yl,el,Ts,Zd]},oo={findFiberByHostInstance:Fa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tP={bundleType:oo.bundleType,version:oo.version,rendererPackageName:oo.rendererPackageName,rendererConfig:oo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=st(r),r===null?null:r.stateNode},findFiberByHostInstance:oo.findFiberByHostInstance||XS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{Cn=tu.inject(tP),rn=tu}catch{}}return yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eP,yn.createPortal=function(r,i){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ih(i))throw Error(n(200));return QS(r,i,null,l)},yn.createRoot=function(r,i){if(!ih(r))throw Error(n(299));var l=!1,d="",p=ky;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(p=i.onRecoverableError)),i=nh(r,1,!1,null,null,l,!1,d,p),r[Dr]=i.current,Hs(r.nodeType===8?r.parentNode:r),new ah(i)},yn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=st(i),r=r===null?null:r.stateNode,r},yn.flushSync=function(r){return Ga(r)},yn.hydrate=function(r,i,l){if(!Jl(i))throw Error(n(200));return eu(null,r,i,!0,l)},yn.hydrateRoot=function(r,i,l){if(!ih(r))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,p=!1,g="",_=ky;if(l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),i=_y(i,null,r,1,l??null,p,!1,g,_),r[Dr]=i.current,Hs(r),d)for(r=0;r<d.length;r++)l=d[r],p=l._getVersion,p=p(l._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[l,p]:i.mutableSourceEagerHydrationData.push(l,p);return new Xl(i)},yn.render=function(r,i,l){if(!Jl(i))throw Error(n(200));return eu(null,r,i,!1,l)},yn.unmountComponentAtNode=function(r){if(!Jl(r))throw Error(n(40));return r._reactRootContainer?(Ga(function(){eu(null,null,r,!1,function(){r._reactRootContainer=null,r[Dr]=null})}),!0):!1},yn.unstable_batchedUpdates=Zd,yn.unstable_renderSubtreeIntoContainer=function(r,i,l,d){if(!Jl(l))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return eu(r,i,l,!1,d)},yn.version="18.3.1-next-f1338f8080-20240426",yn}var Ly;function bb(){if(Ly)return lh.exports;Ly=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(),lh.exports=dP(),lh.exports}var Dy;function hP(){if(Dy)return nu;Dy=1;var e=bb();return nu.createRoot=e.createRoot,nu.hydrateRoot=e.hydrateRoot,nu}var fP=hP();var _b=e=>{throw TypeError(e)},pP=(e,t,n)=>t.has(e)||_b("Cannot "+n),dh=(e,t,n)=>(pP(e,t,"read from private field"),n?n.call(e):t.get(e)),mP=(e,t,n)=>t.has(e)?_b("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),My="popstate";function Ny(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function gP(e={}){function t(a,s){let o=s.state?.masked,{pathname:u,search:c,hash:h}=o||a.location;return Co("",{pathname:u,search:c,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:br(s)}return vP(t,n,null,e)}function Qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Et(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yP(){return Math.random().toString(36).substring(2,10)}function Oy(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Co(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wr(t):t,state:n,key:t&&t.key||a||yP(),unstable_mask:s}}function br({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Wr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function vP(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,u=s.history,c="POP",h=null,f=m();f==null&&(f=0,u.replaceState({...u.state,idx:f},""));function m(){return(u.state||{idx:null}).idx}function y(){c="POP";let P=m(),L=P==null?null:P-f;f=P,h&&h({action:c,location:T.location,delta:L})}function b(P,L){c="PUSH";let D=Ny(P)?P:Co(T.location,P,L);f=m()+1;let M=Oy(D,f),I=T.createHref(D.unstable_mask||D);try{u.pushState(M,"",I)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;s.location.assign(I)}o&&h&&h({action:c,location:T.location,delta:1})}function w(P,L){c="REPLACE";let D=Ny(P)?P:Co(T.location,P,L);f=m();let M=Oy(D,f),I=T.createHref(D.unstable_mask||D);u.replaceState(M,"",I),o&&h&&h({action:c,location:T.location,delta:0})}function x(P){return wb(P)}let T={get action(){return c},get location(){return e(s,u)},listen(P){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(My,y),h=P,()=>{s.removeEventListener(My,y),h=null}},createHref(P){return t(s,P)},createURL:x,encodeLocation(P){let L=x(P);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:b,replace:w,go(P){return u.go(P)}};return T}function wb(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Qe(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:br(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}var go,Iy=class{constructor(e){if(mP(this,go,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(dh(this,go).has(e))return dh(this,go).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){dh(this,go).set(e,t)}};go=new WeakMap;var bP=new Set(["lazy","caseSensitive","path","id","index","children"]);function _P(e){return bP.has(e)}var wP=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function kP(e){return wP.has(e)}function xP(e){return e.index===!0}function Eo(e,t,n=[],a={},s=!1){return e.map((o,u)=>{let c=[...n,String(u)],h=typeof o.id=="string"?o.id:c.join("-");if(Qe(o.index!==!0||!o.children,"Cannot specify children on an index route"),Qe(s||!a[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),xP(o)){let f={...o,id:h};return a[h]=jy(f,t(f)),f}else{let f={...o,id:h,children:void 0};return a[h]=jy(f,t(f)),o.children&&(f.children=Eo(o.children,t,c,a,s)),f}})}function jy(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ta(e,t,n="/"){return yo(e,t,n,!1)}function yo(e,t,n,a){let s=typeof t=="string"?Wr(t):t,o=Un(s.pathname||"/",n);if(o==null)return null;let u=kb(e);PP(u);let c=null;for(let h=0;c==null&&h<u.length;++h){let f=IP(o);c=NP(u[h],f,a)}return c}function SP(e,t){let{route:n,pathname:a,params:s}=e;return{id:n.id,pathname:a,params:s,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function kb(e,t=[],n=[],a="",s=!1){let o=(u,c,h=s,f)=>{let m={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(a)&&h)return;Qe(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length)}let y=rr([a,m.relativePath]),b=n.concat(m);u.children&&u.children.length>0&&(Qe(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),kb(u.children,t,b,y,h)),!(u.path==null&&!u.index)&&t.push({path:y,score:DP(y,u.index),routesMeta:b})};return e.forEach((u,c)=>{if(u.path===""||!u.path?.includes("?"))o(u,c);else for(let h of xb(u.path))o(u,c,!0,h)}),t}function xb(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let u=xb(a.join("/")),c=[];return c.push(...u.map(h=>h===""?o:[o,h].join("/"))),s&&c.push(...u),c.map(h=>e.startsWith("/")&&h===""?"/":h)}function PP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:MP(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var TP=/^:[\w-]+$/,CP=3,EP=2,RP=1,AP=10,LP=-2,Uy=e=>e==="*";function DP(e,t){let n=e.split("/"),a=n.length;return n.some(Uy)&&(a+=LP),t&&(a+=EP),n.filter(s=>!Uy(s)).reduce((s,o)=>s+(TP.test(o)?CP:o===""?RP:AP),a)}function MP(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function NP(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",u=[];for(let c=0;c<a.length;++c){let h=a[c],f=c===a.length-1,m=o==="/"?t:t.slice(o.length)||"/",y=Ou({path:h.relativePath,caseSensitive:h.caseSensitive,end:f},m),b=h.route;if(!y&&f&&n&&!a[a.length-1].route.index&&(y=Ou({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},m)),!y)return null;Object.assign(s,y.params),u.push({params:s,pathname:rr([o,y.pathname]),pathnameBase:BP(rr([o,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(o=rr([o,y.pathnameBase]))}return u}function Ou(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=OP(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],u=o.replace(/(.)\/+$/,"$1"),c=s.slice(1);return{params:a.reduce((f,{paramName:m,isOptional:y},b)=>{if(m==="*"){let x=c[b]||"";u=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const w=c[b];return y&&!w?f[m]=void 0:f[m]=(w||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:u,pattern:e}}function OP(e,t=!1,n=!0){Et(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,h,f,m)=>{if(a.push({paramName:c,isOptional:h!=null}),h){let y=m.charAt(f+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function IP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Et(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Un(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function jP({basename:e,pathname:t}){return t==="/"?e:rr([e,t])}var Sb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$f=e=>Sb.test(e);function UP(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Wr(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=By(n.substring(1),"/"):o=By(n,t)):o=t,{pathname:o,search:FP(a),hash:VP(s)}}function By(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hh(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pb(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Hf(e){let t=Pb(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function lc(e,t,n,a=!1){let s;typeof e=="string"?s=Wr(e):(s={...e},Qe(!s.pathname||!s.pathname.includes("?"),hh("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),hh("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),hh("#","search","hash",s)));let o=e===""||s.pathname==="",u=o?"/":s.pathname,c;if(u==null)c=n;else{let y=t.length-1;if(!a&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),y-=1;s.pathname=b.join("/")}c=y>=0?t[y]:"/"}let h=UP(s,c),f=u&&u!=="/"&&u.endsWith("/"),m=(o||u===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(f||m)&&(h.pathname+="/"),h}var rr=e=>e.join("/").replace(/\/\/+/g,"/"),BP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),FP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,VP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Io=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ro(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jo(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Tb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Cb(e,t){let n=e;if(typeof n!="string"||!Sb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(Tb)try{let o=new URL(window.location.href),u=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Un(u.pathname,t);u.origin===o.origin&&c!=null?n=c+u.search+u.hash:s=!0}catch{Et(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}var Ra=Symbol("Uninstrumented");function zP(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:t.id,index:t.index,path:t.path,instrument(o){let u=Object.keys(n);for(let c of u)o[c]&&n[c].push(o[c])}}));let a={};if(typeof t.lazy=="function"&&n.lazy.length>0){let s=ns(n.lazy,t.lazy,()=>{});s&&(a.lazy=s)}if(typeof t.lazy=="object"){let s=t.lazy;["middleware","loader","action"].forEach(o=>{let u=s[o],c=n[`lazy.${o}`];if(typeof u=="function"&&c.length>0){let h=ns(c,u,()=>{});h&&(a.lazy=Object.assign(a.lazy||{},{[o]:h}))}})}return["loader","action"].forEach(s=>{let o=t[s];if(typeof o=="function"&&n[s].length>0){let u=o[Ra]??o,c=ns(n[s],u,(...h)=>Fy(h[0]));c&&(s==="loader"&&u.hydrate===!0&&(c.hydrate=!0),c[Ra]=u,a[s]=c)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(a.middleware=t.middleware.map(s=>{let o=s[Ra]??s,u=ns(n.middleware,o,(...c)=>Fy(c[0]));return u?(u[Ra]=o,u):s})),a}function $P(e,t){let n={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(s){let o=Object.keys(s);for(let u of o)s[u]&&n[u].push(s[u])}})),n.navigate.length>0){let a=e.navigate[Ra]??e.navigate,s=ns(n.navigate,a,(...o)=>{let[u,c]=o;return{to:typeof u=="number"||typeof u=="string"?u:u?br(u):".",...Vy(e,c??{})}});s&&(s[Ra]=a,e.navigate=s)}if(n.fetch.length>0){let a=e.fetch[Ra]??e.fetch,s=ns(n.fetch,a,(...o)=>{let[u,,c,h]=o;return{href:c??".",fetcherKey:u,...Vy(e,h??{})}});s&&(s[Ra]=a,e.fetch=s)}return e}function ns(e,t,n){return e.length===0?null:async(...a)=>{let s=await Eb(e,n(...a),()=>t(...a),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function Eb(e,t,n,a){let s=e[a],o;if(s){let u,c=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=Eb(e,t,n,a-1),o=await u,Qe(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await s(c,t)}catch(h){console.error("An instrumentation function threw an error:",h)}u||await c(),await u}else try{o={type:"success",value:await n()}}catch(u){o={type:"error",value:u}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Fy(e){let{request:t,context:n,params:a,unstable_pattern:s}=e;return{request:HP(t),params:{...a},unstable_pattern:s,context:WP(n)}}function Vy(e,t){return{currentUrl:br(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function HP(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function WP(e){if(qP(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var KP=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qP(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===KP}var Rb=["POST","PUT","PATCH","DELETE"],GP=new Set(Rb),YP=["GET",...Rb],ZP=new Set(YP),Ab=new Set([301,302,303,307,308]),QP=new Set([307,308]),fh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},XP={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uo={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},JP=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Lb="remix-router-transitions",Db=Symbol("ResetLoaderData");function e1(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],s=e.mapRouteProperties||JP,o=s;if(e.unstable_instrumentations){let R=e.unstable_instrumentations;o=j=>({...s(j),...zP(R.map(V=>V.route).filter(Boolean),j)})}let u={},c=Eo(e.routes,o,void 0,u),h,f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let m=e.dataStrategy||i1,y={...e.future},b=null,w=new Set,x=null,T=null,P=null,L=e.hydrationData!=null,D=Ta(c,e.history.location,f),M=!1,I=null,K,G;if(D==null&&!e.patchRoutesOnNavigation){let R=Nn(404,{pathname:e.history.location.pathname}),{matches:j,route:V}=ru(c);K=!0,G=!K,D=j,I={[V.id]:R}}else if(D&&!e.hydrationData&&Xr(D,c,e.history.location.pathname).active&&(D=null),D)if(D.some(R=>R.route.lazy))K=!1,G=!K;else if(!D.some(R=>Wf(R.route)))K=!0,G=!K;else{let R=e.hydrationData?e.hydrationData.loaderData:null,j=e.hydrationData?e.hydrationData.errors:null,V=D;if(j){let te=D.findIndex(ae=>j[ae.route.id]!==void 0);V=V.slice(0,te+1)}G=!1,K=V.every(te=>{let ae=Mb(te.route,R,j);return G=G||ae.renderFallback,!ae.shouldLoad})}else{K=!1,G=!K,D=[];let R=Xr(null,c,e.history.location.pathname);R.active&&R.matches&&(M=!0,D=R.matches)}let W,S={historyAction:e.history.action,location:e.history.location,matches:D,initialized:K,renderFallback:G,navigation:fh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||I,fetchers:new Map,blockers:new Map},Z="POP",X=null,_e=!1,oe,Re=!1,fe=new Map,ce=null,ue=!1,Me=!1,H=new Set,Y=new Map,$=0,N=-1,q=new Map,xe=new Set,Ae=new Map,Se=new Map,Ce=new Set,qe=new Map,Xe,Ue=null;function jt(){if(b=e.history.listen(({action:R,location:j,delta:V})=>{if(Xe){Xe(),Xe=void 0;return}Et(qe.size===0||V!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let te=Cr({currentLocation:S.location,nextLocation:j,historyAction:R});if(te&&V!=null){let ae=new Promise(Ee=>{Xe=Ee});e.history.go(V*-1),Kn(te,{state:"blocked",location:j,proceed(){Kn(te,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),ae.then(()=>e.history.go(V))},reset(){let Ee=new Map(S.blockers);Ee.set(te,uo),pt({blockers:Ee})}}),X?.resolve(),X=null;return}return Hn(R,j)}),n){x1(t,fe);let R=()=>S1(t,fe);t.addEventListener("pagehide",R),ce=()=>t.removeEventListener("pagehide",R)}return S.initialized||Hn("POP",S.location,{initialHydration:!0}),W}function $n(){b&&b(),ce&&ce(),w.clear(),oe&&oe.abort(),S.fetchers.forEach((R,j)=>vi(j)),S.blockers.forEach((R,j)=>ki(j))}function Tr(R){return w.add(R),()=>w.delete(R)}function pt(R,j={}){R.matches&&(R.matches=R.matches.map(ae=>{let Ee=u[ae.route.id],pe=ae.route;return pe.element!==Ee.element||pe.errorElement!==Ee.errorElement||pe.hydrateFallbackElement!==Ee.hydrateFallbackElement?{...ae,route:Ee}:ae})),S={...S,...R};let V=[],te=[];S.fetchers.forEach((ae,Ee)=>{ae.state==="idle"&&(Ce.has(Ee)?V.push(Ee):te.push(Ee))}),Ce.forEach(ae=>{!S.fetchers.has(ae)&&!Y.has(ae)&&V.push(ae)}),[...w].forEach(ae=>ae(S,{deletedFetchers:V,newErrors:R.errors??null,viewTransitionOpts:j.viewTransitionOpts,flushSync:j.flushSync===!0})),V.forEach(ae=>vi(ae)),te.forEach(ae=>S.fetchers.delete(ae))}function en(R,j,{flushSync:V}={}){let te=S.actionData!=null&&S.navigation.formMethod!=null&&Xt(S.navigation.formMethod)&&S.navigation.state==="loading"&&R.state?._isRedirect!==!0,ae;j.actionData?Object.keys(j.actionData).length>0?ae=j.actionData:ae=null:te?ae=S.actionData:ae=null;let Ee=j.loaderData?Qy(S.loaderData,j.loaderData,j.matches||[],j.errors):S.loaderData,pe=S.blockers;pe.size>0&&(pe=new Map(pe),pe.forEach((Oe,Le)=>pe.set(Le,uo)));let De=ue?!1:Cs(R,j.matches||S.matches),he=_e===!0||S.navigation.formMethod!=null&&Xt(S.navigation.formMethod)&&R.state?._isRedirect!==!0;h&&(c=h,h=void 0),ue||Z==="POP"||(Z==="PUSH"?e.history.push(R,R.state):Z==="REPLACE"&&e.history.replace(R,R.state));let Ne;if(Z==="POP"){let Oe=fe.get(S.location.pathname);Oe&&Oe.has(R.pathname)?Ne={currentLocation:S.location,nextLocation:R}:fe.has(R.pathname)&&(Ne={currentLocation:R,nextLocation:S.location})}else if(Re){let Oe=fe.get(S.location.pathname);Oe?Oe.add(R.pathname):(Oe=new Set([R.pathname]),fe.set(S.location.pathname,Oe)),Ne={currentLocation:S.location,nextLocation:R}}pt({...j,actionData:ae,loaderData:Ee,historyAction:Z,location:R,initialized:!0,renderFallback:!1,navigation:fh,revalidation:"idle",restoreScrollPosition:De,preventScrollReset:he,blockers:pe},{viewTransitionOpts:Ne,flushSync:V===!0}),Z="POP",_e=!1,Re=!1,ue=!1,Me=!1,X?.resolve(),X=null,Ue?.resolve(),Ue=null}async function ks(R,j){if(X?.resolve(),X=null,typeof R=="number"){X||(X=tv());let ht=X.promise;return e.history.go(R),ht}let V=Wh(S.location,S.matches,f,R,j?.fromRouteId,j?.relative),{path:te,submission:ae,error:Ee}=zy(!1,V,j),pe;j?.unstable_mask&&(pe={pathname:"",search:"",hash:"",...typeof j.unstable_mask=="string"?Wr(j.unstable_mask):{...S.location.unstable_mask,...j.unstable_mask}});let De=S.location,he=Co(De,te,j&&j.state,void 0,pe);he={...he,...e.history.encodeLocation(he)};let Ne=j&&j.replace!=null?j.replace:void 0,Oe="PUSH";Ne===!0?Oe="REPLACE":Ne===!1||ae!=null&&Xt(ae.formMethod)&&ae.formAction===S.location.pathname+S.location.search&&(Oe="REPLACE");let Le=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,st=(j&&j.flushSync)===!0,et=Cr({currentLocation:De,nextLocation:he,historyAction:Oe});if(et){Kn(et,{state:"blocked",location:he,proceed(){Kn(et,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),ks(R,j)},reset(){let ht=new Map(S.blockers);ht.set(et,uo),pt({blockers:ht})}});return}await Hn(Oe,he,{submission:ae,pendingError:Ee,preventScrollReset:Le,replace:j&&j.replace,enableViewTransition:j&&j.viewTransition,flushSync:st,callSiteDefaultShouldRevalidate:j&&j.unstable_defaultShouldRevalidate})}function Yo(){Ue||(Ue=tv()),Zr(),pt({revalidation:"loading"});let R=Ue.promise;return S.navigation.state==="submitting"?R:S.navigation.state==="idle"?(Hn(S.historyAction,S.location,{startUninterruptedRevalidation:!0}),R):(Hn(Z||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation,enableViewTransition:Re===!0}),R)}async function Hn(R,j,V){oe&&oe.abort(),oe=null,Z=R,ue=(V&&V.startUninterruptedRevalidation)===!0,tl(S.location,S.matches),_e=(V&&V.preventScrollReset)===!0,Re=(V&&V.enableViewTransition)===!0;let te=h||c,ae=V&&V.overrideNavigation,Ee=V?.initialHydration&&S.matches&&S.matches.length>0&&!M?S.matches:Ta(te,j,f),pe=(V&&V.flushSync)===!0;if(Ee&&S.initialized&&!Me&&f1(S.location,j)&&!(V&&V.submission&&Xt(V.submission.formMethod))){en(j,{matches:Ee},{flushSync:pe});return}let De=Xr(Ee,te,j.pathname);if(De.active&&De.matches&&(Ee=De.matches),!Ee){let{error:Pt,notFoundMatches:$t,route:lt}=xi(j.pathname);en(j,{matches:$t,loaderData:{},errors:{[lt.id]:Pt}},{flushSync:pe});return}oe=new AbortController;let he=Ji(e.history,j,oe.signal,V&&V.submission),Ne=e.getContext?await e.getContext():new Iy,Oe;if(V&&V.pendingError)Oe=[Ca(Ee).route.id,{type:"error",error:V.pendingError}];else if(V&&V.submission&&Xt(V.submission.formMethod)){let Pt=await Zo(he,j,V.submission,Ee,Ne,De.active,V&&V.initialHydration===!0,{replace:V.replace,flushSync:pe});if(Pt.shortCircuited)return;if(Pt.pendingActionResult){let[$t,lt]=Pt.pendingActionResult;if(xn(lt)&&Ro(lt.error)&<.error.status===404){oe=null,en(j,{matches:Pt.matches,loaderData:{},errors:{[$t]:lt.error}});return}}Ee=Pt.matches||Ee,Oe=Pt.pendingActionResult,ae=ph(j,V.submission),pe=!1,De.active=!1,he=Ji(e.history,he.url,he.signal)}let{shortCircuited:Le,matches:st,loaderData:et,errors:ht}=await xs(he,j,Ee,Ne,De.active,ae,V&&V.submission,V&&V.fetcherSubmission,V&&V.replace,V&&V.initialHydration===!0,pe,Oe,V&&V.callSiteDefaultShouldRevalidate);Le||(oe=null,en(j,{matches:st||Ee,...Xy(Oe),loaderData:et,errors:ht}))}async function Zo(R,j,V,te,ae,Ee,pe,De={}){Zr();let he=w1(j,V);if(pt({navigation:he},{flushSync:De.flushSync===!0}),Ee){let Le=await Ua(te,j.pathname,R.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){if(Le.partialMatches.length===0){let{matches:et,route:ht}=ru(c);return{matches:et,pendingActionResult:[ht.id,{type:"error",error:Le.error}]}}let st=Ca(Le.partialMatches).route.id;return{matches:Le.partialMatches,pendingActionResult:[st,{type:"error",error:Le.error}]}}else if(Le.matches)te=Le.matches;else{let{notFoundMatches:st,error:et,route:ht}=xi(j.pathname);return{matches:st,pendingActionResult:[ht.id,{type:"error",error:et}]}}}let Ne,Oe=yu(te,j);if(!Oe.route.action&&!Oe.route.lazy)Ne={type:"error",error:Nn(405,{method:R.method,pathname:j.pathname,routeId:Oe.route.id})};else{let Le=os(o,u,R,te,Oe,pe?[]:a,ae),st=await Yr(R,Le,ae,null);if(Ne=st[Oe.route.id],!Ne){for(let et of te)if(st[et.route.id]){Ne=st[et.route.id];break}}if(R.signal.aborted)return{shortCircuited:!0}}if(ti(Ne)){let Le;return De&&De.replace!=null?Le=De.replace:Le=Gy(Ne.response.headers.get("Location"),new URL(R.url),f,e.history)===S.location.pathname+S.location.search,await or(R,Ne,!0,{submission:V,replace:Le}),{shortCircuited:!0}}if(xn(Ne)){let Le=Ca(te,Oe.route.id);return(De&&De.replace)!==!0&&(Z="PUSH"),{matches:te,pendingActionResult:[Le.route.id,Ne,Oe.route.id]}}return{matches:te,pendingActionResult:[Oe.route.id,Ne]}}async function xs(R,j,V,te,ae,Ee,pe,De,he,Ne,Oe,Le,st){let et=Ee||ph(j,pe),ht=pe||De||ev(et),Pt=!ue&&!Ne;if(ae){if(Pt){let Ut=qr(Le);pt({navigation:et,...Ut!==void 0?{actionData:Ut}:{}},{flushSync:Oe})}let $e=await Ua(V,j.pathname,R.signal);if($e.type==="aborted")return{shortCircuited:!0};if($e.type==="error"){if($e.partialMatches.length===0){let{matches:ta,route:Ar}=ru(c);return{matches:ta,loaderData:{},errors:{[Ar.id]:$e.error}}}let Ut=Ca($e.partialMatches).route.id;return{matches:$e.partialMatches,loaderData:{},errors:{[Ut]:$e.error}}}else if($e.matches)V=$e.matches;else{let{error:Ut,notFoundMatches:ta,route:Ar}=xi(j.pathname);return{matches:ta,loaderData:{},errors:{[Ar.id]:Ut}}}}let $t=h||c,{dsMatches:lt,revalidatingFetchers:rt}=$y(R,te,o,u,e.history,S,V,ht,j,Ne?[]:a,Ne===!0,Me,H,Ce,Ae,xe,$t,f,e.patchRoutesOnNavigation!=null,Le,st);if(N=++$,!e.dataStrategy&&!lt.some($e=>$e.shouldLoad)&&!lt.some($e=>$e.route.middleware&&$e.route.middleware.length>0)&&rt.length===0){let $e=_i();return en(j,{matches:V,loaderData:{},errors:Le&&xn(Le[1])?{[Le[0]]:Le[1].error}:null,...Xy(Le),...$e?{fetchers:new Map(S.fetchers)}:{}},{flushSync:Oe}),{shortCircuited:!0}}if(Pt){let $e={};if(!ae){$e.navigation=et;let Ut=qr(Le);Ut!==void 0&&($e.actionData=Ut)}rt.length>0&&($e.fetchers=Gr(rt)),pt($e,{flushSync:Oe})}rt.forEach($e=>{Wn($e.key),$e.controller&&Y.set($e.key,$e.controller)});let Er=()=>rt.forEach($e=>Wn($e.key));oe&&oe.signal.addEventListener("abort",Er);let{loaderResults:Rr,fetcherResults:qn}=await yi(lt,rt,R,te);if(R.signal.aborted)return{shortCircuited:!0};oe&&oe.signal.removeEventListener("abort",Er),rt.forEach($e=>Y.delete($e.key));let nn=au(Rr);if(nn)return await or(R,nn.result,!0,{replace:he}),{shortCircuited:!0};if(nn=au(qn),nn)return xe.add(nn.key),await or(R,nn.result,!0,{replace:he}),{shortCircuited:!0};let{loaderData:Rs,errors:ea}=Zy(S,V,Rr,Le,rt,qn);Ne&&S.errors&&(ea={...S.errors,...ea});let Cn=_i(),rn=wi(N),Si=Cn||rn||rt.length>0;return{matches:V,loaderData:Rs,errors:ea,...Si?{fetchers:new Map(S.fetchers)}:{}}}function qr(R){if(R&&!xn(R[1]))return{[R[0]]:R[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function Gr(R){return R.forEach(j=>{let V=S.fetchers.get(j.key),te=co(void 0,V?V.data:void 0);S.fetchers.set(j.key,te)}),new Map(S.fetchers)}async function Ss(R,j,V,te){Wn(R);let ae=(te&&te.flushSync)===!0,Ee=h||c,pe=Wh(S.location,S.matches,f,V,j,te?.relative),De=Ta(Ee,pe,f),he=Xr(De,Ee,pe);if(he.active&&he.matches&&(De=he.matches),!De){tn(R,j,Nn(404,{pathname:pe}),{flushSync:ae});return}let{path:Ne,submission:Oe,error:Le}=zy(!0,pe,te);if(Le){tn(R,j,Le,{flushSync:ae});return}let st=e.getContext?await e.getContext():new Iy,et=(te&&te.preventScrollReset)===!0;if(Oe&&Xt(Oe.formMethod)){await Qo(R,j,Ne,De,st,he.active,ae,et,Oe,te&&te.unstable_defaultShouldRevalidate);return}Ae.set(R,{routeId:j,path:Ne}),await Xo(R,j,Ne,De,st,he.active,ae,et,Oe)}async function Qo(R,j,V,te,ae,Ee,pe,De,he,Ne){Zr(),Ae.delete(R);let Oe=S.fetchers.get(R);Tn(R,k1(he,Oe),{flushSync:pe});let Le=new AbortController,st=Ji(e.history,V,Le.signal,he);if(Ee){let ct=await Ua(te,new URL(st.url).pathname,st.signal,R);if(ct.type==="aborted")return;if(ct.type==="error"){tn(R,j,ct.error,{flushSync:pe});return}else if(ct.matches)te=ct.matches;else{tn(R,j,Nn(404,{pathname:V}),{flushSync:pe});return}}let et=yu(te,V);if(!et.route.action&&!et.route.lazy){let ct=Nn(405,{method:he.formMethod,pathname:V,routeId:j});tn(R,j,ct,{flushSync:pe});return}Y.set(R,Le);let ht=$,Pt=os(o,u,st,te,et,a,ae),$t=await Yr(st,Pt,ae,R),lt=$t[et.route.id];if(!lt){for(let ct of Pt)if($t[ct.route.id]){lt=$t[ct.route.id];break}}if(st.signal.aborted){Y.get(R)===Le&&Y.delete(R);return}if(Ce.has(R)){if(ti(lt)||xn(lt)){Tn(R,Vr(void 0));return}}else{if(ti(lt))if(Y.delete(R),N>ht){Tn(R,Vr(void 0));return}else return xe.add(R),Tn(R,co(he)),or(st,lt,!1,{fetcherSubmission:he,preventScrollReset:De});if(xn(lt)){tn(R,j,lt.error);return}}let rt=S.navigation.location||S.location,Er=Ji(e.history,rt,Le.signal),Rr=h||c,qn=S.navigation.state!=="idle"?Ta(Rr,S.navigation.location,f):S.matches;Qe(qn,"Didn't find any matches after fetcher action");let nn=++$;q.set(R,nn);let Rs=co(he,lt.data);S.fetchers.set(R,Rs);let{dsMatches:ea,revalidatingFetchers:Cn}=$y(Er,ae,o,u,e.history,S,qn,he,rt,a,!1,Me,H,Ce,Ae,xe,Rr,f,e.patchRoutesOnNavigation!=null,[et.route.id,lt],Ne);Cn.filter(ct=>ct.key!==R).forEach(ct=>{let Lr=ct.key,na=S.fetchers.get(Lr),Pi=co(void 0,na?na.data:void 0);S.fetchers.set(Lr,Pi),Wn(Lr),ct.controller&&Y.set(Lr,ct.controller)}),pt({fetchers:new Map(S.fetchers)});let rn=()=>Cn.forEach(ct=>Wn(ct.key));Le.signal.addEventListener("abort",rn);let{loaderResults:Si,fetcherResults:$e}=await yi(ea,Cn,Er,ae);if(Le.signal.aborted)return;if(Le.signal.removeEventListener("abort",rn),q.delete(R),Y.delete(R),Cn.forEach(ct=>Y.delete(ct.key)),S.fetchers.has(R)){let ct=Vr(lt.data);S.fetchers.set(R,ct)}let Ut=au(Si);if(Ut)return or(Er,Ut.result,!1,{preventScrollReset:De});if(Ut=au($e),Ut)return xe.add(Ut.key),or(Er,Ut.result,!1,{preventScrollReset:De});let{loaderData:ta,errors:Ar}=Zy(S,qn,Si,void 0,Cn,$e);wi(nn),S.navigation.state==="loading"&&nn>N?(Qe(Z,"Expected pending action"),oe&&oe.abort(),en(S.navigation.location,{matches:qn,loaderData:ta,errors:Ar,fetchers:new Map(S.fetchers)})):(pt({errors:Ar,loaderData:Qy(S.loaderData,ta,qn,Ar),fetchers:new Map(S.fetchers)}),Me=!1)}async function Xo(R,j,V,te,ae,Ee,pe,De,he){let Ne=S.fetchers.get(R);Tn(R,co(he,Ne?Ne.data:void 0),{flushSync:pe});let Oe=new AbortController,Le=Ji(e.history,V,Oe.signal);if(Ee){let lt=await Ua(te,new URL(Le.url).pathname,Le.signal,R);if(lt.type==="aborted")return;if(lt.type==="error"){tn(R,j,lt.error,{flushSync:pe});return}else if(lt.matches)te=lt.matches;else{tn(R,j,Nn(404,{pathname:V}),{flushSync:pe});return}}let st=yu(te,V);Y.set(R,Oe);let et=$,ht=os(o,u,Le,te,st,a,ae),$t=(await Yr(Le,ht,ae,R))[st.route.id];if(Y.get(R)===Oe&&Y.delete(R),!Le.signal.aborted){if(Ce.has(R)){Tn(R,Vr(void 0));return}if(ti($t))if(N>et){Tn(R,Vr(void 0));return}else{xe.add(R),await or(Le,$t,!1,{preventScrollReset:De});return}if(xn($t)){tn(R,j,$t.error);return}Tn(R,Vr($t.data))}}async function or(R,j,V,{submission:te,fetcherSubmission:ae,preventScrollReset:Ee,replace:pe}={}){V||(X?.resolve(),X=null),j.response.headers.has("X-Remix-Revalidate")&&(Me=!0);let De=j.response.headers.get("Location");Qe(De,"Expected a Location header on the redirect Response"),De=Gy(De,new URL(R.url),f,e.history);let he=Co(S.location,De,{_isRedirect:!0});if(n){let ht=!1;if(j.response.headers.has("X-Remix-Reload-Document"))ht=!0;else if($f(De)){const Pt=wb(De,!0);ht=Pt.origin!==t.location.origin||Un(Pt.pathname,f)==null}if(ht){pe?t.location.replace(De):t.location.assign(De);return}}oe=null;let Ne=pe===!0||j.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Oe,formAction:Le,formEncType:st}=S.navigation;!te&&!ae&&Oe&&Le&&st&&(te=ev(S.navigation));let et=te||ae;if(QP.has(j.response.status)&&et&&Xt(et.formMethod))await Hn(Ne,he,{submission:{...et,formAction:De},preventScrollReset:Ee||_e,enableViewTransition:V?Re:void 0});else{let ht=ph(he,te);await Hn(Ne,he,{overrideNavigation:ht,fetcherSubmission:ae,preventScrollReset:Ee||_e,enableViewTransition:V?Re:void 0})}}async function Yr(R,j,V,te){let ae,Ee={};try{ae=await o1(m,R,j,te,V,!1)}catch(pe){return j.filter(De=>De.shouldLoad).forEach(De=>{Ee[De.route.id]={type:"error",error:pe}}),Ee}if(R.signal.aborted)return Ee;if(!Xt(R.method))for(let pe of j){if(ae[pe.route.id]?.type==="error")break;!ae.hasOwnProperty(pe.route.id)&&!S.loaderData.hasOwnProperty(pe.route.id)&&(!S.errors||!S.errors.hasOwnProperty(pe.route.id))&&pe.shouldCallHandler()&&(ae[pe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${pe.route.id}`)})}for(let[pe,De]of Object.entries(ae))if(y1(De)){let he=De.result;Ee[pe]={type:"redirect",response:d1(he,R,pe,j,f)}}else Ee[pe]=await c1(De);return Ee}async function yi(R,j,V,te){let ae=Yr(V,R,te,null),Ee=Promise.all(j.map(async he=>{if(he.matches&&he.match&&he.request&&he.controller){let Oe=(await Yr(he.request,he.matches,te,he.key))[he.match.route.id];return{[he.key]:Oe}}else return Promise.resolve({[he.key]:{type:"error",error:Nn(404,{pathname:he.path})}})})),pe=await ae,De=(await Ee).reduce((he,Ne)=>Object.assign(he,Ne),{});return{loaderResults:pe,fetcherResults:De}}function Zr(){Me=!0,Ae.forEach((R,j)=>{Y.has(j)&&H.add(j),Wn(j)})}function Tn(R,j,V={}){S.fetchers.set(R,j),pt({fetchers:new Map(S.fetchers)},{flushSync:(V&&V.flushSync)===!0})}function tn(R,j,V,te={}){let ae=Ca(S.matches,j);vi(R),pt({errors:{[ae.route.id]:V},fetchers:new Map(S.fetchers)},{flushSync:(te&&te.flushSync)===!0})}function Qr(R){return Se.set(R,(Se.get(R)||0)+1),Ce.has(R)&&Ce.delete(R),S.fetchers.get(R)||XP}function Tc(R,j){Wn(R,j?.reason),Tn(R,Vr(null))}function vi(R){let j=S.fetchers.get(R);Y.has(R)&&!(j&&j.state==="loading"&&q.has(R))&&Wn(R),Ae.delete(R),q.delete(R),xe.delete(R),Ce.delete(R),H.delete(R),S.fetchers.delete(R)}function Jo(R){let j=(Se.get(R)||0)-1;j<=0?(Se.delete(R),Ce.add(R)):Se.set(R,j),pt({fetchers:new Map(S.fetchers)})}function Wn(R,j){let V=Y.get(R);V&&(V.abort(j),Y.delete(R))}function bi(R){for(let j of R){let V=Qr(j),te=Vr(V.data);S.fetchers.set(j,te)}}function _i(){let R=[],j=!1;for(let V of xe){let te=S.fetchers.get(V);Qe(te,`Expected fetcher: ${V}`),te.state==="loading"&&(xe.delete(V),R.push(V),j=!0)}return bi(R),j}function wi(R){let j=[];for(let[V,te]of q)if(te<R){let ae=S.fetchers.get(V);Qe(ae,`Expected fetcher: ${V}`),ae.state==="loading"&&(Wn(V),q.delete(V),j.push(V))}return bi(j),j.length>0}function Ps(R,j){let V=S.blockers.get(R)||uo;return qe.get(R)!==j&&qe.set(R,j),V}function ki(R){S.blockers.delete(R),qe.delete(R)}function Kn(R,j){let V=S.blockers.get(R)||uo;Qe(V.state==="unblocked"&&j.state==="blocked"||V.state==="blocked"&&j.state==="blocked"||V.state==="blocked"&&j.state==="proceeding"||V.state==="blocked"&&j.state==="unblocked"||V.state==="proceeding"&&j.state==="unblocked",`Invalid blocker state transition: ${V.state} -> ${j.state}`);let te=new Map(S.blockers);te.set(R,j),pt({blockers:te})}function Cr({currentLocation:R,nextLocation:j,historyAction:V}){if(qe.size===0)return;qe.size>1&&Et(!1,"A router only supports one blocker at a time");let te=Array.from(qe.entries()),[ae,Ee]=te[te.length-1],pe=S.blockers.get(ae);if(!(pe&&pe.state==="proceeding")&&Ee({currentLocation:R,nextLocation:j,historyAction:V}))return ae}function xi(R){let j=Nn(404,{pathname:R}),V=h||c,{matches:te,route:ae}=ru(V);return{notFoundMatches:te,route:ae,error:j}}function el(R,j,V){if(x=R,P=j,T=V||null,!L&&S.navigation===fh){L=!0;let te=Cs(S.location,S.matches);te!=null&&pt({restoreScrollPosition:te})}return()=>{x=null,P=null,T=null}}function Ts(R,j){return T&&T(R,j.map(te=>SP(te,S.loaderData)))||R.key}function tl(R,j){if(x&&P){let V=Ts(R,j);x[V]=P()}}function Cs(R,j){if(x){let V=Ts(R,j),te=x[V];if(typeof te=="number")return te}return null}function Xr(R,j,V){if(e.patchRoutesOnNavigation)if(R){if(Object.keys(R[0].params).length>0)return{active:!0,matches:yo(j,V,f,!0)}}else return{active:!0,matches:yo(j,V,f,!0)||[]};return{active:!1,matches:null}}async function Ua(R,j,V,te){if(!e.patchRoutesOnNavigation)return{type:"success",matches:R};let ae=R;for(;;){let Ee=h==null,pe=h||c,De=u;try{await e.patchRoutesOnNavigation({signal:V,path:j,matches:ae,fetcherKey:te,patch:(Oe,Le)=>{V.aborted||Hy(Oe,Le,pe,De,o,!1)}})}catch(Oe){return{type:"error",error:Oe,partialMatches:ae}}finally{Ee&&!V.aborted&&(c=[...c])}if(V.aborted)return{type:"aborted"};let he=Ta(pe,j,f),Ne=null;if(he){if(Object.keys(he[0].params).length===0)return{type:"success",matches:he};if(Ne=yo(pe,j,f,!0),!(Ne&&ae.length<Ne.length&&Jr(ae,Ne.slice(0,ae.length))))return{type:"success",matches:he}}if(Ne||(Ne=yo(pe,j,f,!0)),!Ne||Jr(ae,Ne))return{type:"success",matches:null};ae=Ne}}function Jr(R,j){return R.length===j.length&&R.every((V,te)=>V.route.id===j[te].route.id)}function Es(R){u={},h=Eo(R,o,void 0,u)}function Ba(R,j,V=!1){let te=h==null;Hy(R,j,h||c,u,o,V),te&&(c=[...c],pt({}))}return W={get basename(){return f},get future(){return y},get state(){return S},get routes(){return c},get window(){return t},initialize:jt,subscribe:Tr,enableScrollRestoration:el,navigate:ks,fetch:Ss,revalidate:Yo,createHref:R=>e.history.createHref(R),encodeLocation:R=>e.history.encodeLocation(R),getFetcher:Qr,resetFetcher:Tc,deleteFetcher:Jo,dispose:$n,getBlocker:Ps,deleteBlocker:ki,patchRoutes:Ba,_internalFetchControllers:Y,_internalSetRoutes:Es,_internalSetStateDoNotUseOrYouWillBreakYourApp(R){pt(R)}},e.unstable_instrumentations&&(W=$P(W,e.unstable_instrumentations.map(R=>R.router).filter(Boolean))),W}function t1(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Wh(e,t,n,a,s,o){let u,c;if(s){u=[];for(let f of t)if(u.push(f),f.route.id===s){c=f;break}}else u=t,c=t[t.length-1];let h=lc(a||".",Hf(u),Un(e.pathname,n)||e.pathname,o==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&c){let f=qf(h.search);if(c.route.index&&!f)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&f){let m=new URLSearchParams(h.search),y=m.getAll("index");m.delete("index"),y.filter(w=>w).forEach(w=>m.append("index",w));let b=m.toString();h.search=b?`?${b}`:""}}return n!=="/"&&(h.pathname=jP({basename:n,pathname:h.pathname})),br(h)}function zy(e,t,n){if(!n||!t1(n))return{path:t};if(n.formMethod&&!_1(n.formMethod))return{path:t,error:Nn(405,{method:n.formMethod})};let a=()=>({path:t,error:Nn(400,{type:"invalid-body"})}),o=(n.formMethod||"get").toUpperCase(),u=Bb(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Xt(o))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((b,[w,x])=>`${b}${w}=${x}
|
|
10
|
+
`,""):String(n.body);return{path:t,submission:{formMethod:o,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!Xt(o))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:o,formAction:u,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let c,h;if(n.formData)c=qh(n.formData),h=n.formData;else if(n.body instanceof FormData)c=qh(n.body),h=n.body;else if(n.body instanceof URLSearchParams)c=n.body,h=Yy(c);else if(n.body==null)c=new URLSearchParams,h=new FormData;else try{c=new URLSearchParams(n.body),h=Yy(c)}catch{return a()}let f={formMethod:o,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Xt(f.formMethod))return{path:t,submission:f};let m=Wr(t);return e&&m.search&&qf(m.search)&&c.append("index",""),m.search=`?${c}`,{path:br(m),submission:f}}function $y(e,t,n,a,s,o,u,c,h,f,m,y,b,w,x,T,P,L,D,M,I){let K=M?xn(M[1])?M[1].error:M[1].data:void 0,G=s.createURL(o.location),W=s.createURL(h),S;if(m&&o.errors){let ce=Object.keys(o.errors)[0];S=u.findIndex(ue=>ue.route.id===ce)}else if(M&&xn(M[1])){let ce=M[0];S=u.findIndex(ue=>ue.route.id===ce)-1}let Z=M?M[1].statusCode:void 0,X=Z&&Z>=400,_e={currentUrl:G,currentParams:o.matches[0]?.params||{},nextUrl:W,nextParams:u[0].params,...c,actionResult:K,actionStatus:Z},oe=jo(u),Re=u.map((ce,ue)=>{let{route:Me}=ce,H=null;if(S!=null&&ue>S)H=!1;else if(Me.lazy)H=!0;else if(!Wf(Me))H=!1;else if(m){let{shouldLoad:q}=Mb(Me,o.loaderData,o.errors);H=q}else n1(o.loaderData,o.matches[ue],ce)&&(H=!0);if(H!==null)return Kh(n,a,e,oe,ce,f,t,H);let Y=!1;typeof I=="boolean"?Y=I:X?Y=!1:(y||G.pathname+G.search===W.pathname+W.search||G.search!==W.search||r1(o.matches[ue],ce))&&(Y=!0);let $={..._e,defaultShouldRevalidate:Y},N=wo(ce,$);return Kh(n,a,e,oe,ce,f,t,N,$,I)}),fe=[];return x.forEach((ce,ue)=>{if(m||!u.some(Ae=>Ae.route.id===ce.routeId)||w.has(ue))return;let Me=o.fetchers.get(ue),H=Me&&Me.state!=="idle"&&Me.data===void 0,Y=Ta(P,ce.path,L);if(!Y){if(D&&H)return;fe.push({key:ue,routeId:ce.routeId,path:ce.path,matches:null,match:null,request:null,controller:null});return}if(T.has(ue))return;let $=yu(Y,ce.path),N=new AbortController,q=Ji(s,ce.path,N.signal),xe=null;if(b.has(ue))b.delete(ue),xe=os(n,a,q,Y,$,f,t);else if(H)y&&(xe=os(n,a,q,Y,$,f,t));else{let Ae;typeof I=="boolean"?Ae=I:X?Ae=!1:Ae=y;let Se={..._e,defaultShouldRevalidate:Ae};wo($,Se)&&(xe=os(n,a,q,Y,$,f,t,Se))}xe&&fe.push({key:ue,routeId:ce.routeId,path:ce.path,matches:xe,match:$,request:q,controller:N})}),{dsMatches:Re,revalidatingFetchers:fe}}function Wf(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Mb(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Wf(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,s=n!=null&&n[e.id]!==void 0;if(!a&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!s;return{shouldLoad:o,renderFallback:o}}function n1(e,t,n){let a=!t||n.route.id!==t.route.id,s=!e.hasOwnProperty(n.route.id);return a||s}function r1(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function wo(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Hy(e,t,n,a,s,o){let u;if(e){let f=a[e];Qe(f,`No route found to patch children into: routeId = ${e}`),f.children||(f.children=[]),u=f.children}else u=n;let c=[],h=[];if(t.forEach(f=>{let m=u.find(y=>Nb(f,y));m?h.push({existingRoute:m,newRoute:f}):c.push(f)}),c.length>0){let f=Eo(c,s,[e||"_","patch",String(u?.length||"0")],a);u.push(...f)}if(o&&h.length>0)for(let f=0;f<h.length;f++){let{existingRoute:m,newRoute:y}=h[f],b=m,[w]=Eo([y],s,[],{},!0);Object.assign(b,{element:w.element?w.element:b.element,errorElement:w.errorElement?w.errorElement:b.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:b.hydrateFallbackElement})}}function Nb(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((n,a)=>t.children?.some(s=>Nb(n,s)))??!1:!1}var Wy=new WeakMap,Ob=({key:e,route:t,manifest:n,mapRouteProperties:a})=>{let s=n[t.id];if(Qe(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let o=s.lazy[e];if(!o)return;let u=Wy.get(s);u||(u={},Wy.set(s,u));let c=u[e];if(c)return c;let h=(async()=>{let f=_P(e),y=s[e]!==void 0&&e!=="hasErrorBoundary";if(f)Et(!f,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(y)Et(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await o();b!=null&&(Object.assign(s,{[e]:b}),Object.assign(s,a(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(b=>b===void 0)&&(s.lazy=void 0))})();return u[e]=h,h},Ky=new WeakMap;function a1(e,t,n,a,s){let o=n[e.id];if(Qe(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let m=Ky.get(o);if(m)return{lazyRoutePromise:m,lazyHandlerPromise:m};let y=(async()=>{Qe(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),w={};for(let x in b){let T=b[x];if(T===void 0)continue;let P=kP(x),D=o[x]!==void 0&&x!=="hasErrorBoundary";P?Et(!P,"Route property "+x+" is not a supported property to be returned from a lazy route function. This property will be ignored."):D?Et(!D,`Route "${o.id}" has a static property "${x}" defined but its lazy function is also returning a value for this property. The lazy route property "${x}" will be ignored.`):w[x]=T}Object.assign(o,w),Object.assign(o,{...a(o),lazy:void 0})})();return Ky.set(o,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let u=Object.keys(e.lazy),c=[],h;for(let m of u){if(s&&s.includes(m))continue;let y=Ob({key:m,route:e,manifest:n,mapRouteProperties:a});y&&(c.push(y),m===t&&(h=y))}let f=c.length>0?Promise.all(c).then(()=>{}):void 0;return f?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:h}}async function qy(e){let t=e.matches.filter(s=>s.shouldLoad),n={};return(await Promise.all(t.map(s=>s.resolve()))).forEach((s,o)=>{n[t[o].route.id]=s}),n}async function i1(e){return e.matches.some(t=>t.route.middleware)?Ib(e,()=>qy(e)):qy(e)}function Ib(e,t){return s1(e,t,a=>{if(b1(a))throw a;return a},m1,n);function n(a,s,o){if(o)return Promise.resolve(Object.assign(o.value,{[s]:{type:"error",result:a}}));{let{matches:u}=e,c=Math.min(Math.max(u.findIndex(f=>f.route.id===s),0),Math.max(u.findIndex(f=>f.shouldCallHandler()),0)),h=Ca(u,u[c].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:a}})}}}async function s1(e,t,n,a,s){let{matches:o,request:u,params:c,context:h,unstable_pattern:f}=e,m=o.flatMap(b=>b.route.middleware?b.route.middleware.map(w=>[b.route.id,w]):[]);return await jb({request:u,params:c,context:h,unstable_pattern:f},m,t,n,a,s)}async function jb(e,t,n,a,s,o,u=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let h=t[u];if(!h)return await n();let[f,m]=h,y,b=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await jb(e,t,n,a,s,o,u+1)},y.value}catch(w){return y={value:await o(w,f,y)},y.value}};try{let w=await m(e,b),x=w!=null?a(w):void 0;return s(x)?x:y?x??y.value:(y={value:await b()},y.value)}catch(w){return await o(w,f,y)}}function Ub(e,t,n,a,s){let o=Ob({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=a1(a.route,Xt(n.method)?"action":"loader",t,e,s);return{middleware:o,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function Kh(e,t,n,a,s,o,u,c,h=null,f){let m=!1,y=Ub(e,t,n,s,o);return{...s,_lazyPromises:y,shouldLoad:c,shouldRevalidateArgs:h,shouldCallHandler(b){return m=!0,h?typeof f=="boolean"?wo(s,{...h,defaultShouldRevalidate:f}):typeof b=="boolean"?wo(s,{...h,defaultShouldRevalidate:b}):wo(s,h):c},resolve(b){let{lazy:w,loader:x,middleware:T}=s.route,P=m||c||b&&!Xt(n.method)&&(w||x),L=T&&T.length>0&&!x&&!w;return P&&(Xt(n.method)||!L)?l1({request:n,unstable_pattern:a,match:s,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:b,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function os(e,t,n,a,s,o,u,c=null){return a.map(h=>h.route.id!==s.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Ub(e,t,n,h,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Kh(e,t,n,jo(a),h,o,u,!0,c))}async function o1(e,t,n,a,s,o){n.some(f=>f._lazyPromises?.middleware)&&await Promise.all(n.map(f=>f._lazyPromises?.middleware));let u={request:t,unstable_pattern:jo(n),params:n[0].params,context:s,matches:n},h=await e({...u,fetcherKey:a,runClientMiddleware:f=>{let m=u;return Ib(m,()=>f({...m,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(f=>[f._lazyPromises?.handler,f._lazyPromises?.route]))}catch{}return h}async function l1({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:a,lazyRoutePromise:s,handlerOverride:o,scopedContext:u}){let c,h,f=Xt(e.method),m=f?"action":"loader",y=b=>{let w,x=new Promise((L,D)=>w=D);h=()=>w(),e.signal.addEventListener("abort",h);let T=L=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${n.route.id}]`)):b({request:e,unstable_pattern:t,params:n.params,context:u},...L!==void 0?[L]:[]),P=(async()=>{try{return{type:"data",result:await(o?o(D=>T(D)):T())}}catch(L){return{type:"error",result:L}}})();return Promise.race([P,x])};try{let b=f?n.route.action:n.route.loader;if(a||s)if(b){let w,[x]=await Promise.all([y(b).catch(T=>{w=T}),a,s]);if(w!==void 0)throw w;c=x}else{await a;let w=f?n.route.action:n.route.loader;if(w)[c]=await Promise.all([y(w),s]);else if(m==="action"){let x=new URL(e.url),T=x.pathname+x.search;throw Nn(405,{method:e.method,pathname:T,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(b)c=await y(b);else{let w=new URL(e.url),x=w.pathname+w.search;throw Nn(404,{pathname:x})}}catch(b){return{type:"error",result:b}}finally{h&&e.signal.removeEventListener("abort",h)}return c}async function u1(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function c1(e){let{result:t,type:n}=e;if(Kf(t)){let a;try{a=await u1(t)}catch(s){return{type:"error",error:s}}return n==="error"?{type:"error",error:new Io(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return n==="error"?Jy(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:p1(t),statusCode:Ro(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ro(t)?t.status:void 0}:Jy(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function d1(e,t,n,a,s){let o=e.headers.get("Location");if(Qe(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!$f(o)){let u=a.slice(0,a.findIndex(c=>c.route.id===n)+1);o=Wh(new URL(t.url),u,s,o),e.headers.set("Location",o)}return e}function Gy(e,t,n,a){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if($f(e)){let o=e,u=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(s.includes(u.protocol))throw new Error("Invalid redirect location");let c=Un(u.pathname,n)!=null;if(u.origin===t.origin&&c)return u.pathname+u.search+u.hash}try{let o=a.createURL(e);if(s.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ji(e,t,n,a){let s=e.createURL(Bb(t)).toString(),o={signal:n};if(a&&Xt(a.formMethod)){let{formMethod:u,formEncType:c}=a;o.method=u.toUpperCase(),c==="application/json"?(o.headers=new Headers({"Content-Type":c}),o.body=JSON.stringify(a.json)):c==="text/plain"?o.body=a.text:c==="application/x-www-form-urlencoded"&&a.formData?o.body=qh(a.formData):o.body=a.formData}return new Request(s,o)}function qh(e){let t=new URLSearchParams;for(let[n,a]of e.entries())t.append(n,typeof a=="string"?a:a.name);return t}function Yy(e){let t=new FormData;for(let[n,a]of e.entries())t.append(n,a);return t}function h1(e,t,n,a=!1,s=!1){let o={},u=null,c,h=!1,f={},m=n&&xn(n[1])?n[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in t))return;let b=y.route.id,w=t[b];if(Qe(!ti(w),"Cannot handle redirect results in processLoaderData"),xn(w)){let x=w.error;if(m!==void 0&&(x=m,m=void 0),u=u||{},s)u[b]=x;else{let T=Ca(e,b);u[T.route.id]==null&&(u[T.route.id]=x)}a||(o[b]=Db),h||(h=!0,c=Ro(w.error)?w.error.status:500),w.headers&&(f[b]=w.headers)}else o[b]=w.data,w.statusCode&&w.statusCode!==200&&!h&&(c=w.statusCode),w.headers&&(f[b]=w.headers)}),m!==void 0&&n&&(u={[n[0]]:m},n[2]&&(o[n[2]]=void 0)),{loaderData:o,errors:u,statusCode:c||200,loaderHeaders:f}}function Zy(e,t,n,a,s,o){let{loaderData:u,errors:c}=h1(t,n,a);return s.filter(h=>!h.matches||h.matches.some(f=>f.shouldLoad)).forEach(h=>{let{key:f,match:m,controller:y}=h;if(y&&y.signal.aborted)return;let b=o[f];if(Qe(b,"Did not find corresponding fetcher result"),xn(b)){let w=Ca(e.matches,m?.route.id);c&&c[w.route.id]||(c={...c,[w.route.id]:b.error}),e.fetchers.delete(f)}else if(ti(b))Qe(!1,"Unhandled fetcher revalidation redirect");else{let w=Vr(b.data);e.fetchers.set(f,w)}}),{loaderData:u,errors:c}}function Qy(e,t,n,a){let s=Object.entries(t).filter(([,o])=>o!==Db).reduce((o,[u,c])=>(o[u]=c,o),{});for(let o of n){let u=o.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&o.route.loader&&(s[u]=e[u]),a&&a.hasOwnProperty(u))break}return s}function Xy(e){return e?xn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ca(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function ru(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nn(e,{pathname:t,routeId:n,method:a,type:s,message:o}={}){let u="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&n?c=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:s==="invalid-body"&&(c="Unable to encode submission body")):e===403?(u="Forbidden",c=`Route "${n}" does not match URL "${t}"`):e===404?(u="Not Found",c=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&n?c=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:a&&(c=`Invalid request method "${a.toUpperCase()}"`)),new Io(e||500,u,new Error(c),!0)}function au(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[a,s]=t[n];if(ti(s))return{key:a,result:s}}}function Bb(e){let t=typeof e=="string"?Wr(e):e;return br({...t,hash:""})}function f1(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function p1(e){return new Io(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function m1(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&g1(n))}function g1(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function y1(e){return Kf(e.result)&&Ab.has(e.result.status)}function xn(e){return e.type==="error"}function ti(e){return(e&&e.type)==="redirect"}function Jy(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Kf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function v1(e){return Ab.has(e)}function b1(e){return Kf(e)&&v1(e.status)&&e.headers.has("Location")}function _1(e){return ZP.has(e.toUpperCase())}function Xt(e){return GP.has(e.toUpperCase())}function qf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function yu(e,t){let n=typeof t=="string"?Wr(t).search:t.search;if(e[e.length-1].route.index&&qf(n||""))return e[e.length-1];let a=Pb(e);return a[a.length-1]}function ev(e){let{formMethod:t,formAction:n,formEncType:a,text:s,formData:o,json:u}=e;if(!(!t||!n||!a)){if(s!=null)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:a,formData:o,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:u,text:void 0}}}function ph(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function w1(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function co(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function k1(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Vr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function x1(e,t){try{let n=e.sessionStorage.getItem(Lb);if(n){let a=JSON.parse(n);for(let[s,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function S1(e,t){if(t.size>0){let n={};for(let[a,s]of t)n[a]=[...s];try{e.sessionStorage.setItem(Lb,JSON.stringify(n))}catch(a){Et(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function tv(){let e,t,n=new Promise((a,s)=>{e=async o=>{a(o);try{await n}catch{}},t=async o=>{s(o);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var pi=k.createContext(null);pi.displayName="DataRouter";var Uo=k.createContext(null);Uo.displayName="DataRouterState";var Fb=k.createContext(!1);function P1(){return k.useContext(Fb)}var Gf=k.createContext({isTransitioning:!1});Gf.displayName="ViewTransition";var Vb=k.createContext(new Map);Vb.displayName="Fetchers";var T1=k.createContext(null);T1.displayName="Await";var Bn=k.createContext(null);Bn.displayName="Navigation";var uc=k.createContext(null);uc.displayName="Location";var Kr=k.createContext({outlet:null,matches:[],isDataRoute:!1});Kr.displayName="Route";var Yf=k.createContext(null);Yf.displayName="RouteError";var zb="REACT_ROUTER_ERROR",C1="REDIRECT",E1="ROUTE_ERROR_RESPONSE";function R1(e){if(e.startsWith(`${zb}:${C1}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function A1(e){if(e.startsWith(`${zb}:${E1}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Io(t.status,t.statusText,t.data)}catch{}}function L1(e,{relative:t}={}){Qe(Bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=k.useContext(Bn),{hash:s,pathname:o,search:u}=Fo(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:rr([n,o])),a.createHref({pathname:c,search:u,hash:s})}function Bo(){return k.useContext(uc)!=null}function Fn(){return Qe(Bo(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(uc).location}var $b="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Hb(e){k.useContext(Bn).static||k.useLayoutEffect(e)}function Zf(){let{isDataRoute:e}=k.useContext(Kr);return e?H1():D1()}function D1(){Qe(Bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(pi),{basename:t,navigator:n}=k.useContext(Bn),{matches:a}=k.useContext(Kr),{pathname:s}=Fn(),o=JSON.stringify(Hf(a)),u=k.useRef(!1);return Hb(()=>{u.current=!0}),k.useCallback((h,f={})=>{if(Et(u.current,$b),!u.current)return;if(typeof h=="number"){n.go(h);return}let m=lc(h,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:rr([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,o,s,e])}k.createContext(null);function Fo(e,{relative:t}={}){let{matches:n}=k.useContext(Kr),{pathname:a}=Fn(),s=JSON.stringify(Hf(n));return k.useMemo(()=>lc(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function M1(e,t,n){Qe(Bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=k.useContext(Bn),{matches:s}=k.useContext(Kr),o=s[s.length-1],u=o?o.params:{},c=o?o.pathname:"/",h=o?o.pathnameBase:"/",f=o&&o.route;{let P=f&&f.path||"";Kb(c,!f||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${P}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let m=Fn(),y;y=m;let b=y.pathname||"/",w=b;if(h!=="/"){let P=h.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(P.length).join("/")}let x=Ta(e,{pathname:w});return Et(f||x!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Et(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),U1(x&&x.map(P=>Object.assign({},P,{params:Object.assign({},u,P.params),pathname:rr([h,a.encodeLocation?a.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:rr([h,a.encodeLocation?a.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),s,n)}function N1(){let e=$1(),t=Ro(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:s},n):null,u)}var O1=k.createElement(N1,null),Wb=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=A1(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(Kr.Provider,{value:this.props.routeContext},k.createElement(Yf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(I1,{error:e},t):t}};Wb.contextType=Fb;var mh=new WeakMap;function I1({children:e,error:t}){let{basename:n}=k.useContext(Bn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=R1(t.digest);if(a){let s=mh.get(t);if(s)throw s;let o=Cb(a.location,n);if(Tb&&!mh.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw mh.set(t,u),u}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function j1({routeContext:e,match:t,children:n}){let a=k.useContext(pi);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(Kr.Provider,{value:e},n)}function U1(e,t=[],n){let a=n?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a?.errors;if(o!=null){let m=s.findIndex(y=>y.route.id&&o?.[y.route.id]!==void 0);Qe(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,m+1))}let u=!1,c=-1;if(n&&a){u=a.renderFallback;for(let m=0;m<s.length;m++){let y=s[m];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(c=m),y.route.id){let{loaderData:b,errors:w}=a,x=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!w||w[y.route.id]===void 0);if(y.route.lazy||x){n.isStatic&&(u=!0),c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}}let h=n?.onError,f=a&&h?(m,y)=>{h(m,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:jo(a.matches),errorInfo:y})}:void 0;return s.reduceRight((m,y,b)=>{let w,x=!1,T=null,P=null;a&&(w=o&&y.route.id?o[y.route.id]:void 0,T=y.route.errorElement||O1,u&&(c<0&&b===0?(Kb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,P=null):c===b&&(x=!0,P=y.route.hydrateFallbackElement||null)));let L=t.concat(s.slice(0,b+1)),D=()=>{let M;return w?M=T:x?M=P:y.route.Component?M=k.createElement(y.route.Component,null):y.route.element?M=y.route.element:M=m,k.createElement(j1,{match:y,routeContext:{outlet:m,matches:L,isDataRoute:a!=null},children:M})};return a&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?k.createElement(Wb,{location:a.location,revalidation:a.revalidation,component:T,error:w,children:D(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:f}):D()},null)}function Qf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B1(e){let t=k.useContext(pi);return Qe(t,Qf(e)),t}function F1(e){let t=k.useContext(Uo);return Qe(t,Qf(e)),t}function V1(e){let t=k.useContext(Kr);return Qe(t,Qf(e)),t}function Xf(e){let t=V1(e),n=t.matches[t.matches.length-1];return Qe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function z1(){return Xf("useRouteId")}function $1(){let e=k.useContext(Yf),t=F1("useRouteError"),n=Xf("useRouteError");return e!==void 0?e:t.errors?.[n]}function H1(){let{router:e}=B1("useNavigate"),t=Xf("useNavigate"),n=k.useRef(!1);return Hb(()=>{n.current=!0}),k.useCallback(async(s,o={})=>{Et(n.current,$b),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var nv={};function Kb(e,t,n){!t&&!nv[e]&&(nv[e]=!0,Et(!1,n))}var rv={};function av(e,t){!e&&!rv[t]&&(rv[t]=!0,console.warn(t))}var W1="useOptimistic",iv=lP[W1],K1=()=>{};function q1(e){return iv?iv(e):[e,K1]}function G1(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Et(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:k.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Et(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Et(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Y1=["HydrateFallback","hydrateFallbackElement"],Z1=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function Q1({router:e,flushSync:t,onError:n,unstable_useTransitions:a}){a=P1()||a;let[o,u]=k.useState(e.state),[c,h]=q1(o),[f,m]=k.useState(),[y,b]=k.useState({isTransitioning:!1}),[w,x]=k.useState(),[T,P]=k.useState(),[L,D]=k.useState(),M=k.useRef(new Map),I=k.useCallback((S,{deletedFetchers:Z,newErrors:X,flushSync:_e,viewTransitionOpts:oe})=>{X&&n&&Object.values(X).forEach(fe=>n(fe,{location:S.location,params:S.matches[0]?.params??{},unstable_pattern:jo(S.matches)})),S.fetchers.forEach((fe,ce)=>{fe.data!==void 0&&M.current.set(ce,fe.data)}),Z.forEach(fe=>M.current.delete(fe)),av(_e===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Re=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(av(oe==null||Re,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!oe||!Re){t&&_e?t(()=>u(S)):a===!1?u(S):k.startTransition(()=>{a===!0&&h(fe=>sv(fe,S)),u(S)});return}if(t&&_e){t(()=>{T&&(w?.resolve(),T.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation})});let fe=e.window.document.startViewTransition(()=>{t(()=>u(S))});fe.finished.finally(()=>{t(()=>{x(void 0),P(void 0),m(void 0),b({isTransitioning:!1})})}),t(()=>P(fe));return}T?(w?.resolve(),T.skipTransition(),D({state:S,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation})):(m(S),b({isTransitioning:!0,flushSync:!1,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation}))},[e.window,t,T,w,a,h,n]);k.useLayoutEffect(()=>e.subscribe(I),[e,I]),k.useEffect(()=>{y.isTransitioning&&!y.flushSync&&x(new Z1)},[y]),k.useEffect(()=>{if(w&&f&&e.window){let S=f,Z=w.promise,X=e.window.document.startViewTransition(async()=>{a===!1?u(S):k.startTransition(()=>{a===!0&&h(_e=>sv(_e,S)),u(S)}),await Z});X.finished.finally(()=>{x(void 0),P(void 0),m(void 0),b({isTransitioning:!1})}),P(X)}},[f,w,e.window,a,h]),k.useEffect(()=>{w&&f&&c.location.key===f.location.key&&w.resolve()},[w,T,c.location,f]),k.useEffect(()=>{!y.isTransitioning&&L&&(m(L.state),b({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),D(void 0))},[y.isTransitioning,L]);let K=k.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:S=>e.navigate(S),push:(S,Z,X)=>e.navigate(S,{state:Z,preventScrollReset:X?.preventScrollReset}),replace:(S,Z,X)=>e.navigate(S,{replace:!0,state:Z,preventScrollReset:X?.preventScrollReset})}),[e]),G=e.basename||"/",W=k.useMemo(()=>({router:e,navigator:K,static:!1,basename:G,onError:n}),[e,K,G,n]);return k.createElement(k.Fragment,null,k.createElement(pi.Provider,{value:W},k.createElement(Uo.Provider,{value:c},k.createElement(Vb.Provider,{value:M.current},k.createElement(Gf.Provider,{value:y},k.createElement(eT,{basename:G,location:c.location,navigationType:c.historyAction,navigator:K,unstable_useTransitions:a},k.createElement(X1,{routes:e.routes,future:e.future,state:c,isStatic:!1,onError:n})))))),null)}function sv(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var X1=k.memo(J1);function J1({routes:e,future:t,state:n,isStatic:a,onError:s}){return M1(e,void 0,{state:n,isStatic:a,onError:s})}function eT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:u}){Qe(!Bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),h=k.useMemo(()=>({basename:c,navigator:s,static:o,unstable_useTransitions:u,future:{}}),[c,s,o,u]);typeof n=="string"&&(n=Wr(n));let{pathname:f="/",search:m="",hash:y="",state:b=null,key:w="default",unstable_mask:x}=n,T=k.useMemo(()=>{let P=Un(f,c);return P==null?null:{location:{pathname:P,search:m,hash:y,state:b,key:w,unstable_mask:x},navigationType:a}},[c,f,m,y,b,w,a,x]);return Et(T!=null,`<Router basename="${c}"> is not able to match the URL "${f}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:k.createElement(Bn.Provider,{value:h},k.createElement(uc.Provider,{children:t,value:T}))}var vu="get",bu="application/x-www-form-urlencoded";function cc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tT(e){return cc(e)&&e.tagName.toLowerCase()==="button"}function nT(e){return cc(e)&&e.tagName.toLowerCase()==="form"}function rT(e){return cc(e)&&e.tagName.toLowerCase()==="input"}function aT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iT(e,t){return e.button===0&&(!t||t==="_self")&&!aT(e)}function Gh(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function sT(e,t){let n=Gh(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var iu=null;function oT(){if(iu===null)try{new FormData(document.createElement("form"),0),iu=!1}catch{iu=!0}return iu}var lT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gh(e){return e!=null&&!lT.has(e)?(Et(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bu}"`),null):e}function uT(e,t){let n,a,s,o,u;if(nT(e)){let c=e.getAttribute("action");a=c?Un(c,t):null,n=e.getAttribute("method")||vu,s=gh(e.getAttribute("enctype"))||bu,o=new FormData(e)}else if(tT(e)||rT(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||c.getAttribute("action");if(a=h?Un(h,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||vu,s=gh(e.getAttribute("formenctype"))||gh(c.getAttribute("enctype"))||bu,o=new FormData(c,e),!oT()){let{name:f,type:m,value:y}=e;if(m==="image"){let b=f?`${f}.`:"";o.append(`${b}x`,"0"),o.append(`${b}y`,"0")}else f&&o.append(f,y)}}else{if(cc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vu,a=null,s=bu,u=e}return o&&s==="text/plain"&&(u=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cT(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Un(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${a}`,s}async function dT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function fT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let u=await dT(o,n);return u.links?u.links():[]}return[]}));return yT(a.flat(1).filter(hT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function ov(e,t,n,a,s,o){let u=(h,f)=>n[f]?h.route.id!==n[f].route.id:!0,c=(h,f)=>n[f].pathname!==h.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==h.params["*"];return o==="assets"?t.filter((h,f)=>u(h,f)||c(h,f)):o==="data"?t.filter((h,f)=>{let m=a.routes[h.route.id];if(!m||!m.hasLoader)return!1;if(u(h,f)||c(h,f))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function pT(e,t,{includeHydrateFallback:n}={}){return mT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function mT(e){return[...new Set(e)]}function gT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function yT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(gT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function qb(){let e=k.useContext(pi);return Jf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vT(){let e=k.useContext(Uo);return Jf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ep=k.createContext(void 0);ep.displayName="FrameworkContext";function Gb(){let e=k.useContext(ep);return Jf(e,"You must render this element inside a <HydratedRouter> element"),e}function bT(e,t){let n=k.useContext(ep),[a,s]=k.useState(!1),[o,u]=k.useState(!1),{onFocus:c,onBlur:h,onMouseEnter:f,onMouseLeave:m,onTouchStart:y}=t,b=k.useRef(null);k.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let T=L=>{L.forEach(D=>{u(D.isIntersecting)})},P=new IntersectionObserver(T,{threshold:.5});return b.current&&P.observe(b.current),()=>{P.disconnect()}}},[e]),k.useEffect(()=>{if(a){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[a]);let w=()=>{s(!0)},x=()=>{s(!1),u(!1)};return n?e!=="intent"?[o,b,{}]:[o,b,{onFocus:ho(c,w),onBlur:ho(h,x),onMouseEnter:ho(f,w),onMouseLeave:ho(m,x),onTouchStart:ho(y,w)}]:[!1,b,{}]}function ho(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _T({page:e,...t}){let{router:n}=qb(),a=k.useMemo(()=>Ta(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?k.createElement(kT,{page:e,matches:a,...t}):null}function wT(e){let{manifest:t,routeModules:n}=Gb(),[a,s]=k.useState([]);return k.useEffect(()=>{let o=!1;return fT(e,t,n).then(u=>{o||s(u)}),()=>{o=!0}},[e,t,n]),a}function kT({page:e,matches:t,...n}){let a=Fn(),{future:s,manifest:o,routeModules:u}=Gb(),{basename:c}=qb(),{loaderData:h,matches:f}=vT(),m=k.useMemo(()=>ov(e,t,f,o,a,"data"),[e,t,f,o,a]),y=k.useMemo(()=>ov(e,t,f,o,a,"assets"),[e,t,f,o,a]),b=k.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let T=new Set,P=!1;if(t.forEach(D=>{let M=o.routes[D.route.id];!M||!M.hasLoader||(!m.some(I=>I.route.id===D.route.id)&&D.route.id in h&&u[D.route.id]?.shouldRevalidate||M.hasClientLoader?P=!0:T.add(D.route.id))}),T.size===0)return[];let L=cT(e,c,s.unstable_trailingSlashAwareDataRequests,"data");return P&&T.size>0&&L.searchParams.set("_routes",t.filter(D=>T.has(D.route.id)).map(D=>D.route.id).join(",")),[L.pathname+L.search]},[c,s.unstable_trailingSlashAwareDataRequests,h,a,o,m,t,e,u]),w=k.useMemo(()=>pT(y,o),[y,o]),x=wT(y);return k.createElement(k.Fragment,null,b.map(T=>k.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...n})),w.map(T=>k.createElement("link",{key:T,rel:"modulepreload",href:T,...n})),x.map(({key:T,link:P})=>k.createElement("link",{key:T,nonce:n.nonce,...P,crossOrigin:P.crossOrigin??n.crossOrigin})))}function xT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var ST=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ST&&(window.__reactRouterVersion="7.13.1")}catch{}function PT(e,t){return e1({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:gP({window:t?.window}),hydrationData:TT(),routes:e,mapRouteProperties:G1,hydrationRouteProperties:Y1,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function TT(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:CT(e.errors)}),e}function CT(e){if(!e)return null;let t=Object.entries(e),n={};for(let[a,s]of t)if(s&&s.__type==="RouteErrorResponse")n[a]=new Io(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let u=new o(s.message);u.stack="",n[a]=u}catch{}}if(n[a]==null){let o=new Error(s.message);o.stack="",n[a]=o}}else n[a]=s;return n}var Yb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dc=k.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:u,unstable_mask:c,state:h,target:f,to:m,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:w,...x},T){let{basename:P,navigator:L,unstable_useTransitions:D}=k.useContext(Bn),M=typeof m=="string"&&Yb.test(m),I=Cb(m,P);m=I.to;let K=L1(m,{relative:s}),G=Fn(),W=null;if(c){let ce=lc(c,[],G.unstable_mask?G.unstable_mask.pathname:"/",!0);P!=="/"&&(ce.pathname=ce.pathname==="/"?P:rr([P,ce.pathname])),W=L.createHref(ce)}let[S,Z,X]=bT(a,x),_e=LT(m,{replace:u,unstable_mask:c,state:h,target:f,preventScrollReset:y,relative:s,viewTransition:b,unstable_defaultShouldRevalidate:w,unstable_useTransitions:D});function oe(ce){t&&t(ce),ce.defaultPrevented||_e(ce)}let Re=!(I.isExternal||o),fe=k.createElement("a",{...x,...X,href:(Re?W:void 0)||I.absoluteURL||K,onClick:Re?oe:t,ref:xT(T,Z),target:f,"data-discover":!M&&n==="render"?"true":void 0});return S&&!M?k.createElement(k.Fragment,null,fe,k.createElement(_T,{page:K})):fe});dc.displayName="Link";var ET=k.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:u,viewTransition:c,children:h,...f},m){let y=Fo(u,{relative:f.relative}),b=Fn(),w=k.useContext(Uo),{navigator:x,basename:T}=k.useContext(Bn),P=w!=null&&IT(y)&&c===!0,L=x.encodeLocation?x.encodeLocation(y).pathname:y.pathname,D=b.pathname,M=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(D=D.toLowerCase(),M=M?M.toLowerCase():null,L=L.toLowerCase()),M&&T&&(M=Un(M,T)||M);const I=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let K=D===L||!s&&D.startsWith(L)&&D.charAt(I)==="/",G=M!=null&&(M===L||!s&&M.startsWith(L)&&M.charAt(L.length)==="/"),W={isActive:K,isPending:G,isTransitioning:P},S=K?t:void 0,Z;typeof a=="function"?Z=a(W):Z=[a,K?"active":null,G?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let X=typeof o=="function"?o(W):o;return k.createElement(dc,{...f,"aria-current":S,className:Z,ref:m,style:X,to:u,viewTransition:c},typeof h=="function"?h(W):h)});ET.displayName="NavLink";var RT=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:u=vu,action:c,onSubmit:h,relative:f,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:b,...w},x)=>{let{unstable_useTransitions:T}=k.useContext(Bn),P=NT(),L=OT(c,{relative:f}),D=u.toLowerCase()==="get"?"get":"post",M=typeof c=="string"&&Yb.test(c),I=K=>{if(h&&h(K),K.defaultPrevented)return;K.preventDefault();let G=K.nativeEvent.submitter,W=G?.getAttribute("formmethod")||u,S=()=>P(G||K.currentTarget,{fetcherKey:t,method:W,navigate:n,replace:s,state:o,relative:f,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:b});T&&n!==!1?k.startTransition(()=>S()):S()};return k.createElement("form",{ref:x,method:D,action:L,onSubmit:a?h:I,...w,"data-discover":!M&&e==="render"?"true":void 0})});RT.displayName="Form";function AT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zb(e){let t=k.useContext(pi);return Qe(t,AT(e)),t}function LT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:h,unstable_useTransitions:f}={}){let m=Zf(),y=Fn(),b=Fo(e,{relative:u});return k.useCallback(w=>{if(iT(w,t)){w.preventDefault();let x=n!==void 0?n:br(y)===br(b),T=()=>m(e,{replace:x,unstable_mask:a,state:s,preventScrollReset:o,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:h});f?k.startTransition(()=>T()):T()}},[y,m,b,n,a,s,t,e,o,u,c,h,f])}function wj(e){Et(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=k.useRef(Gh(e)),n=k.useRef(!1),a=Fn(),s=k.useMemo(()=>sT(a.search,n.current?null:t.current),[a.search]),o=Zf(),u=k.useCallback((c,h)=>{const f=Gh(typeof c=="function"?c(new URLSearchParams(s)):c);n.current=!0,o("?"+f,h)},[o,s]);return[s,u]}var DT=0,MT=()=>`__${String(++DT)}__`;function NT(){let{router:e}=Zb("useSubmit"),{basename:t}=k.useContext(Bn),n=z1(),a=e.fetch,s=e.navigate;return k.useCallback(async(o,u={})=>{let{action:c,method:h,encType:f,formData:m,body:y}=uT(o,t);if(u.navigate===!1){let b=u.fetcherKey||MT();await a(b,n,u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:y,formMethod:u.method||h,formEncType:u.encType||f,flushSync:u.flushSync})}else await s(u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:y,formMethod:u.method||h,formEncType:u.encType||f,replace:u.replace,state:u.state,fromRouteId:n,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,s,t,n])}function OT(e,{relative:t}={}){let{basename:n}=k.useContext(Bn),a=k.useContext(Kr);Qe(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...Fo(e||".",{relative:t})},u=Fn();if(e==null){o.search=u.search;let c=new URLSearchParams(o.search),h=c.getAll("index");if(h.some(m=>m==="")){c.delete("index"),h.filter(y=>y).forEach(y=>c.append("index",y));let m=c.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:rr([n,o.pathname])),br(o)}function IT(e,{relative:t}={}){let n=k.useContext(Gf);Qe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Zb("useViewTransitionState"),s=Fo(e,{relative:t});if(!n.isTransitioning)return!1;let o=Un(n.currentLocation.pathname,a)||n.currentLocation.pathname,u=Un(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Ou(s.pathname,u)!=null||Ou(s.pathname,o)!=null}var jT=bb();function UT(e){return k.createElement(Q1,{flushSync:jT.flushSync,...e})}var it;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const u of s)o[u]=u;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),u={};for(const c of o)u[c]=s[c];return e.objectValues(u)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const u in s)Object.prototype.hasOwnProperty.call(s,u)&&o.push(u);return o},e.find=(s,o)=>{for(const u of s)if(o(u))return u},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function a(s,o=" | "){return s.map(u=>typeof u=="string"?`'${u}'`:u).join(o)}e.joinValues=a,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(it||(it={}));var lv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(lv||(lv={}));const ge=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pa=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return Number.isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},re=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Hr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},a={_errors:[]},s=o=>{for(const u of o.issues)if(u.code==="invalid_union")u.unionErrors.map(s);else if(u.code==="invalid_return_type")s(u.returnTypeError);else if(u.code==="invalid_arguments")s(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let c=a,h=0;for(;h<u.path.length;){const f=u.path[h];h===u.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(u))):c[f]=c[f]||{_errors:[]},c=c[f],h++}}};return s(this),a}static assert(t){if(!(t instanceof Hr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(t(s))}else a.push(t(s));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Hr.create=e=>new Hr(e);const Yh=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case re.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let BT=Yh;function FT(){return BT}const VT=e=>{const{data:t,path:n,errorMaps:a,issueData:s}=e,o=[...n,...s.path||[]],u={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let c="";const h=a.filter(f=>!!f).slice().reverse();for(const f of h)c=f(u,{data:t,defaultError:c}).message;return{...s,path:o,message:c}};function le(e,t){const n=FT(),a=VT({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Yh?void 0:Yh].filter(s=>!!s)});e.common.issues.push(a)}class cn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const s of n){if(s.status==="aborted")return Ve;s.status==="dirty"&&t.dirty(),a.push(s.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const s of n){const o=await s.key,u=await s.value;a.push({key:o,value:u})}return cn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const s of n){const{key:o,value:u}=s;if(o.status==="aborted"||u.status==="aborted")return Ve;o.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof u.value<"u"||s.alwaysSet)&&(a[o.value]=u.value)}return{status:t.value,value:a}}}const Ve=Object.freeze({status:"aborted"}),vo=e=>({status:"dirty",value:e}),Vn=e=>({status:"valid",value:e}),uv=e=>e.status==="aborted",cv=e=>e.status==="dirty",us=e=>e.status==="valid",Iu=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Te||(Te={}));class _r{constructor(t,n,a,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dv=(e,t)=>{if(us(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Hr(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:s}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(u,c)=>{const{message:h}=e;return u.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:h??a??c.defaultError}:u.code!=="invalid_type"?{message:c.defaultError}:{message:h??n??c.defaultError}},description:s}}class Je{get description(){return this._def.description}_getType(t){return Pa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Pa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cn,ctx:{common:t.parent.common,data:t.data,parsedType:Pa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Iu(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pa(t)},s=this._parseSync({data:t,path:a.path,parent:a});return dv(a,s)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pa(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return us(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>us(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pa(t)},s=this._parse({data:t,path:a.path,parent:a}),o=await(Iu(s)?s:Promise.resolve(s));return dv(a,o)}refine(t,n){const a=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const u=t(s),c=()=>o.addIssue({code:re.custom,...a(s)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(c(),!1)):u?!0:(c(),!1)})}refinement(t,n){return this._refinement((a,s)=>t(a)?!0:(s.addIssue(typeof n=="function"?n(a,s):n),!1))}_refinement(t){return new di({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return $r.create(this,this._def)}nullable(){return hi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return yr.create(this)}promise(){return zu.create(this,this._def)}or(t){return Uu.create([this,t],this._def)}and(t){return Bu.create(this,t,this._def)}transform(t){return new di({...Ke(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new $u({...Ke(this._def),innerType:this,defaultValue:n,typeName:ze.ZodDefault})}brand(){return new e_({typeName:ze.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Hu({...Ke(this._def),innerType:this,catchValue:n,typeName:ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return np.create(this,t)}readonly(){return Wu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const zT=/^c[^\s-]{8,}$/i,$T=/^[0-9a-z]+$/,HT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,WT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,KT=/^[a-z0-9_-]{21}$/i,qT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,GT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,YT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ZT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yh;const QT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,XT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,JT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,eC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Qb="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rC=new RegExp(`^${Qb}$`);function Xb(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function aC(e){return new RegExp(`^${Xb(e)}$`)}function iC(e){let t=`${Qb}T${Xb(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function sC(e,t){return!!((t==="v4"||!t)&&QT.test(e)||(t==="v6"||!t)&&JT.test(e))}function oC(e,t){if(!qT.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(a));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function lC(e,t){return!!((t==="v4"||!t)&&XT.test(e)||(t==="v6"||!t)&&eC.test(e))}class gr extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const o=this._getOrReturnCtx(t);return le(o,{code:re.invalid_type,expected:ge.string,received:o.parsedType}),Ve}const a=new cn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),le(s,{code:re.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),le(s,{code:re.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const u=t.data.length>o.value,c=t.data.length<o.value;(u||c)&&(s=this._getOrReturnCtx(t,s),u?le(s,{code:re.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&le(s,{code:re.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")YT.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"email",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")yh||(yh=new RegExp(ZT,"u")),yh.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"emoji",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")WT.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"uuid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")KT.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"nanoid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")zT.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"cuid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")$T.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"cuid2",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")HT.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"ulid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),le(s,{validation:"url",code:re.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"regex",code:re.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),le(s,{code:re.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),le(s,{code:re.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),le(s,{code:re.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?iC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{code:re.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{code:re.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?aC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{code:re.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?GT.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"duration",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?sC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"ip",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?oC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"jwt",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?lC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"cidr",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"base64",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?nC.test(t.data)||(s=this._getOrReturnCtx(t,s),le(s,{validation:"base64url",code:re.invalid_string,message:o.message}),a.dirty()):it.assertNever(o);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(s=>t.test(s),{validation:n,code:re.invalid_string,...Te.errToObj(a)})}_addCheck(t){return new gr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Te.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Te.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Te.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Te.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Te.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new gr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}gr.create=e=>new gr({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...Ke(e)});function uC(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=n>a?n:a,o=Number.parseInt(e.toFixed(s).replace(".","")),u=Number.parseInt(t.toFixed(s).replace(".",""));return o%u/10**s}class oi extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const o=this._getOrReturnCtx(t);return le(o,{code:re.invalid_type,expected:ge.number,received:o.parsedType}),Ve}let a;const s=new cn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),le(a,{code:re.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(a=this._getOrReturnCtx(t,a),le(a,{code:re.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(a=this._getOrReturnCtx(t,a),le(a,{code:re.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?uC(t.data,o.value)!==0&&(a=this._getOrReturnCtx(t,a),le(a,{code:re.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),le(a,{code:re.not_finite,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,a,s){return new oi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Te.toString(s)}]})}_addCheck(t){return new oi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}oi.create=e=>new oi({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...Ke(e)});class li extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ge.bigint)return this._getInvalidInput(t);let a;const s=new cn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(a=this._getOrReturnCtx(t,a),le(a,{code:re.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(a=this._getOrReturnCtx(t,a),le(a,{code:re.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),le(a,{code:re.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return le(n,{code:re.invalid_type,expected:ge.bigint,received:n.parsedType}),Ve}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,a,s){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Te.toString(s)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}li.create=e=>new li({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...Ke(e)});class ju extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const a=this._getOrReturnCtx(t);return le(a,{code:re.invalid_type,expected:ge.boolean,received:a.parsedType}),Ve}return Vn(t.data)}}ju.create=e=>new ju({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...Ke(e)});class cs extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const o=this._getOrReturnCtx(t);return le(o,{code:re.invalid_type,expected:ge.date,received:o.parsedType}),Ve}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return le(o,{code:re.invalid_date}),Ve}const a=new cn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),le(s,{code:re.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),le(s,{code:re.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):it.assertNever(o);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new cs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}cs.create=e=>new cs({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...Ke(e)});class hv extends Je{_parse(t){if(this._getType(t)!==ge.symbol){const a=this._getOrReturnCtx(t);return le(a,{code:re.invalid_type,expected:ge.symbol,received:a.parsedType}),Ve}return Vn(t.data)}}hv.create=e=>new hv({typeName:ze.ZodSymbol,...Ke(e)});class Zh extends Je{_parse(t){if(this._getType(t)!==ge.undefined){const a=this._getOrReturnCtx(t);return le(a,{code:re.invalid_type,expected:ge.undefined,received:a.parsedType}),Ve}return Vn(t.data)}}Zh.create=e=>new Zh({typeName:ze.ZodUndefined,...Ke(e)});class Qh extends Je{_parse(t){if(this._getType(t)!==ge.null){const a=this._getOrReturnCtx(t);return le(a,{code:re.invalid_type,expected:ge.null,received:a.parsedType}),Ve}return Vn(t.data)}}Qh.create=e=>new Qh({typeName:ze.ZodNull,...Ke(e)});class fv extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return Vn(t.data)}}fv.create=e=>new fv({typeName:ze.ZodAny,...Ke(e)});class Xh extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Vn(t.data)}}Xh.create=e=>new Xh({typeName:ze.ZodUnknown,...Ke(e)});class Da extends Je{_parse(t){const n=this._getOrReturnCtx(t);return le(n,{code:re.invalid_type,expected:ge.never,received:n.parsedType}),Ve}}Da.create=e=>new Da({typeName:ze.ZodNever,...Ke(e)});class pv extends Je{_parse(t){if(this._getType(t)!==ge.undefined){const a=this._getOrReturnCtx(t);return le(a,{code:re.invalid_type,expected:ge.void,received:a.parsedType}),Ve}return Vn(t.data)}}pv.create=e=>new pv({typeName:ze.ZodVoid,...Ke(e)});class yr extends Je{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),s=this._def;if(n.parsedType!==ge.array)return le(n,{code:re.invalid_type,expected:ge.array,received:n.parsedType}),Ve;if(s.exactLength!==null){const u=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(u||c)&&(le(n,{code:u?re.too_big:re.too_small,minimum:c?s.exactLength.value:void 0,maximum:u?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(le(n,{code:re.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(le(n,{code:re.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,c)=>s.type._parseAsync(new _r(n,u,n.path,c)))).then(u=>cn.mergeArray(a,u));const o=[...n.data].map((u,c)=>s.type._parseSync(new _r(n,u,n.path,c)));return cn.mergeArray(a,o)}get element(){return this._def.type}min(t,n){return new yr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new yr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new yr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}yr.create=(e,t)=>new yr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...Ke(t)});function es(e){if(e instanceof At){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=$r.create(es(a))}return new At({...e._def,shape:()=>t})}else return e instanceof yr?new yr({...e._def,type:es(e.element)}):e instanceof $r?$r.create(es(e.unwrap())):e instanceof hi?hi.create(es(e.unwrap())):e instanceof ui?ui.create(e.items.map(t=>es(t))):e}class At extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=it.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ge.object){const f=this._getOrReturnCtx(t);return le(f,{code:re.invalid_type,expected:ge.object,received:f.parsedType}),Ve}const{status:a,ctx:s}=this._processInputParams(t),{shape:o,keys:u}=this._getCached(),c=[];if(!(this._def.catchall instanceof Da&&this._def.unknownKeys==="strip"))for(const f in s.data)u.includes(f)||c.push(f);const h=[];for(const f of u){const m=o[f],y=s.data[f];h.push({key:{status:"valid",value:f},value:m._parse(new _r(s,y,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Da){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of c)h.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(f==="strict")c.length>0&&(le(s,{code:re.unrecognized_keys,keys:c}),a.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of c){const y=s.data[m];h.push({key:{status:"valid",value:m},value:f._parse(new _r(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of h){const y=await m.key,b=await m.value;f.push({key:y,value:b,alwaysSet:m.alwaysSet})}return f}).then(f=>cn.mergeObjectSync(a,f)):cn.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const s=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Te.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};for(const a of it.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new At({...this._def,shape:()=>n})}omit(t){const n={};for(const a of it.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new At({...this._def,shape:()=>n})}deepPartial(){return es(this)}partial(t){const n={};for(const a of it.objectKeys(this.shape)){const s=this.shape[a];t&&!t[a]?n[a]=s:n[a]=s.optional()}return new At({...this._def,shape:()=>n})}required(t){const n={};for(const a of it.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof $r;)o=o._def.innerType;n[a]=o}return new At({...this._def,shape:()=>n})}keyof(){return Jb(it.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:Da.create(),typeName:ze.ZodObject,...Ke(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:Da.create(),typeName:ze.ZodObject,...Ke(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:Da.create(),typeName:ze.ZodObject,...Ke(t)});class Uu extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function s(o){for(const c of o)if(c.result.status==="valid")return c.result;for(const c of o)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const u=o.map(c=>new Hr(c.ctx.common.issues));return le(n,{code:re.invalid_union,unionErrors:u}),Ve}if(n.common.async)return Promise.all(a.map(async o=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(s);{let o;const u=[];for(const h of a){const f={...n,common:{...n.common,issues:[]},parent:null},m=h._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!o&&(o={result:m,ctx:f}),f.common.issues.length&&u.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const c=u.map(h=>new Hr(h));return le(n,{code:re.invalid_union,unionErrors:c}),Ve}}get options(){return this._def.options}}Uu.create=(e,t)=>new Uu({options:e,typeName:ze.ZodUnion,...Ke(t)});const zr=e=>e instanceof ef?zr(e.schema):e instanceof di?zr(e.innerType()):e instanceof Vu?[e.value]:e instanceof ci?e.options:e instanceof tf?it.objectValues(e.enum):e instanceof $u?zr(e._def.innerType):e instanceof Zh?[void 0]:e instanceof Qh?[null]:e instanceof $r?[void 0,...zr(e.unwrap())]:e instanceof hi?[null,...zr(e.unwrap())]:e instanceof e_||e instanceof Wu?zr(e.unwrap()):e instanceof Hu?zr(e._def.innerType):[];class tp extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return le(n,{code:re.invalid_type,expected:ge.object,received:n.parsedType}),Ve;const a=this.discriminator,s=n.data[a],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(le(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const s=new Map;for(const o of n){const u=zr(o.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const c of u){if(s.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);s.set(c,o)}}return new tp({typeName:ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ke(a)})}}function Jh(e,t){const n=Pa(e),a=Pa(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&a===ge.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(c=>s.indexOf(c)!==-1),u={...e,...t};for(const c of o){const h=Jh(e[c],t[c]);if(!h.valid)return{valid:!1};u[c]=h.data}return{valid:!0,data:u}}else if(n===ge.array&&a===ge.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const u=e[o],c=t[o],h=Jh(u,c);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return n===ge.date&&a===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Bu extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),s=(o,u)=>{if(uv(o)||uv(u))return Ve;const c=Jh(o.value,u.value);return c.valid?((cv(o)||cv(u))&&n.dirty(),{status:n.value,value:c.data}):(le(a,{code:re.invalid_intersection_types}),Ve)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,u])=>s(o,u)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Bu.create=(e,t,n)=>new Bu({left:e,right:t,typeName:ze.ZodIntersection,...Ke(n)});class ui extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.array)return le(a,{code:re.invalid_type,expected:ge.array,received:a.parsedType}),Ve;if(a.data.length<this._def.items.length)return le(a,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&a.data.length>this._def.items.length&&(le(a,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...a.data].map((u,c)=>{const h=this._def.items[c]||this._def.rest;return h?h._parse(new _r(a,u,a.path,c)):null}).filter(u=>!!u);return a.common.async?Promise.all(o).then(u=>cn.mergeArray(n,u)):cn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ui({...this._def,rest:t})}}ui.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ui({items:e,typeName:ze.ZodTuple,rest:null,...Ke(t)})};class Fu extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.object)return le(a,{code:re.invalid_type,expected:ge.object,received:a.parsedType}),Ve;const s=[],o=this._def.keyType,u=this._def.valueType;for(const c in a.data)s.push({key:o._parse(new _r(a,c,a.path,c)),value:u._parse(new _r(a,a.data[c],a.path,c)),alwaysSet:c in a.data});return a.common.async?cn.mergeObjectAsync(n,s):cn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof Je?new Fu({keyType:t,valueType:n,typeName:ze.ZodRecord,...Ke(a)}):new Fu({keyType:gr.create(),valueType:t,typeName:ze.ZodRecord,...Ke(n)})}}class mv extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.map)return le(a,{code:re.invalid_type,expected:ge.map,received:a.parsedType}),Ve;const s=this._def.keyType,o=this._def.valueType,u=[...a.data.entries()].map(([c,h],f)=>({key:s._parse(new _r(a,c,a.path,[f,"key"])),value:o._parse(new _r(a,h,a.path,[f,"value"]))}));if(a.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const h of u){const f=await h.key,m=await h.value;if(f.status==="aborted"||m.status==="aborted")return Ve;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(f.value,m.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const h of u){const f=h.key,m=h.value;if(f.status==="aborted"||m.status==="aborted")return Ve;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(f.value,m.value)}return{status:n.value,value:c}}}}mv.create=(e,t,n)=>new mv({valueType:t,keyType:e,typeName:ze.ZodMap,...Ke(n)});class Ao extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.set)return le(a,{code:re.invalid_type,expected:ge.set,received:a.parsedType}),Ve;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(le(a,{code:re.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(le(a,{code:re.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function u(h){const f=new Set;for(const m of h){if(m.status==="aborted")return Ve;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const c=[...a.data.values()].map((h,f)=>o._parse(new _r(a,h,a.path,f)));return a.common.async?Promise.all(c).then(h=>u(h)):u(c)}min(t,n){return new Ao({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new Ao({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ao.create=(e,t)=>new Ao({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...Ke(t)});class ef extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ef.create=(e,t)=>new ef({getter:e,typeName:ze.ZodLazy,...Ke(t)});class Vu extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return le(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}Vu.create=(e,t)=>new Vu({value:e,typeName:ze.ZodLiteral,...Ke(t)});function Jb(e,t){return new ci({values:e,typeName:ze.ZodEnum,...Ke(t)})}class ci extends Je{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return le(n,{expected:it.joinValues(a),received:n.parsedType,code:re.invalid_type}),Ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return le(n,{received:n.data,code:re.invalid_enum_value,options:a}),Ve}return Vn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ci.create(t,{...this._def,...n})}exclude(t,n=this._def){return ci.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}ci.create=Jb;class tf extends Je{_parse(t){const n=it.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==ge.string&&a.parsedType!==ge.number){const s=it.objectValues(n);return le(a,{expected:it.joinValues(s),received:a.parsedType,code:re.invalid_type}),Ve}if(this._cache||(this._cache=new Set(it.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=it.objectValues(n);return le(a,{received:a.data,code:re.invalid_enum_value,options:s}),Ve}return Vn(t.data)}get enum(){return this._def.values}}tf.create=(e,t)=>new tf({values:e,typeName:ze.ZodNativeEnum,...Ke(t)});class zu extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return le(n,{code:re.invalid_type,expected:ge.promise,received:n.parsedType}),Ve;const a=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return Vn(a.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zu.create=(e,t)=>new zu({type:e,typeName:ze.ZodPromise,...Ke(t)});class di extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:u=>{le(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const u=s.transform(a.data,o);if(a.common.async)return Promise.resolve(u).then(async c=>{if(n.value==="aborted")return Ve;const h=await this._def.schema._parseAsync({data:c,path:a.path,parent:a});return h.status==="aborted"?Ve:h.status==="dirty"||n.value==="dirty"?vo(h.value):h});{if(n.value==="aborted")return Ve;const c=this._def.schema._parseSync({data:u,path:a.path,parent:a});return c.status==="aborted"?Ve:c.status==="dirty"||n.value==="dirty"?vo(c.value):c}}if(s.type==="refinement"){const u=c=>{const h=s.refinement(c,o);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(a.common.async===!1){const c=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return c.status==="aborted"?Ve:(c.status==="dirty"&&n.dirty(),u(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(c=>c.status==="aborted"?Ve:(c.status==="dirty"&&n.dirty(),u(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!us(u))return Ve;const c=s.transform(u.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>us(u)?Promise.resolve(s.transform(u.value,o)).then(c=>({status:n.value,value:c})):Ve);it.assertNever(s)}}di.create=(e,t,n)=>new di({schema:e,typeName:ze.ZodEffects,effect:t,...Ke(n)});di.createWithPreprocess=(e,t,n)=>new di({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...Ke(n)});class $r extends Je{_parse(t){return this._getType(t)===ge.undefined?Vn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$r.create=(e,t)=>new $r({innerType:e,typeName:ze.ZodOptional,...Ke(t)});class hi extends Je{_parse(t){return this._getType(t)===ge.null?Vn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}hi.create=(e,t)=>new hi({innerType:e,typeName:ze.ZodNullable,...Ke(t)});class $u extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===ge.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}$u.create=(e,t)=>new $u({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class Hu extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Iu(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Hr(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Hr(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Hu.create=(e,t)=>new Hu({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class gv extends Je{_parse(t){if(this._getType(t)!==ge.nan){const a=this._getOrReturnCtx(t);return le(a,{code:re.invalid_type,expected:ge.nan,received:a.parsedType}),Ve}return{status:"valid",value:t.data}}}gv.create=e=>new gv({typeName:ze.ZodNaN,...Ke(e)});class e_ extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class np extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Ve:o.status==="dirty"?(n.dirty(),vo(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?Ve:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(t,n){return new np({in:t,out:n,typeName:ze.ZodPipeline})}}class Wu extends Je{_parse(t){const n=this._def.innerType._parse(t),a=s=>(us(s)&&(s.value=Object.freeze(s.value)),s);return Iu(n)?n.then(s=>a(s)):a(n)}unwrap(){return this._def.innerType}}Wu.create=(e,t)=>new Wu({innerType:e,typeName:ze.ZodReadonly,...Ke(t)});var ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ze||(ze={}));const v=gr.create,Q=oi.create;li.create;const Be=ju.create,rp=cs.create,Jt=Xh.create;Da.create;const ie=yr.create,C=At.create,zn=Uu.create,t_=tp.create;Bu.create;ui.create;const _t=Fu.create,Ye=Vu.create,nt=ci.create;zu.create;$r.create;hi.create;const nf={string:(e=>gr.create({...e,coerce:!0})),number:(e=>oi.create({...e,coerce:!0})),boolean:(e=>ju.create({...e,coerce:!0})),bigint:(e=>li.create({...e,coerce:!0})),date:(e=>cs.create({...e,coerce:!0}))};var hr;(function(e){e.STRING="string",e.DATE="date",e.DATETIME="datetime",e.INTEGER="integer",e.FLOAT="float",e.BOOLEAN="boolean",e.UUID="uuid",e.JSON="json"})(hr||(hr={}));const cC=nt(["CASCADE","RESTRICT","NO ACTION"]),dC=nt(["CASCADE","SET NULL","SET DEFAULT","RESTRICT","NO ACTION"]),hC=nt([hr.STRING,hr.DATE,hr.DATETIME,hr.INTEGER,hr.FLOAT,hr.BOOLEAN,hr.UUID,hr.JSON]),n_=C({referenceTable:v().min(1,"Target table cannot be empty"),referenceColumn:v().min(1,"Target column cannot be empty"),onDelete:dC,onUpdate:cC}),r_=C({columnName:v().min(1,"Column name cannot be empty").max(64,"Column name must be less than 64 characters"),type:zn([hC,v()]),defaultValue:v().optional(),isPrimaryKey:Be().optional(),isNullable:Be(),isUnique:Be(),foreignKey:n_.optional()}),a_=C({tableName:v().min(1,"Table name cannot be empty").max(64,"Table name must be less than 64 characters"),columns:ie(r_).min(1,"At least one column is required"),recordCount:Q().optional(),createdAt:v().optional(),updatedAt:v().optional()}),fC=C({functionName:v(),functionDef:v(),kind:v()}),pC=C({tableName:v(),indexName:v(),indexDef:v(),isUnique:Be().nullable(),isPrimary:Be().nullable()}),mC=C({tableName:v(),policyName:v(),cmd:v(),roles:ie(v()),qual:v().nullable(),withCheck:v().nullable()}),gC=C({tableName:v(),triggerName:v(),actionTiming:v(),eventManipulation:v(),actionOrientation:v(),actionCondition:v().nullable(),actionStatement:v()});a_.pick({tableName:!0,columns:!0}).extend({rlsEnabled:Be().default(!0)});a_.pick({tableName:!0,columns:!0}).extend({message:v(),autoFields:ie(v()),nextActions:v()});C({addColumns:ie(r_.omit({foreignKey:!0})).optional(),dropColumns:ie(v()).optional(),updateColumns:ie(C({columnName:v(),defaultValue:v().optional(),newColumnName:v().min(1,"New column name cannot be empty").max(64,"New column name must be less than 64 characters").optional()})).optional(),addForeignKeys:ie(C({columnName:v().min(1,"Column name is required for adding foreign key"),foreignKey:n_})).optional(),dropForeignKeys:ie(v()).optional(),renameTable:C({newTableName:v().min(1,"New table name cannot be empty").max(64,"New table name must be less than 64 characters")}).optional()});C({message:v(),tableName:v(),operations:ie(v())});C({message:v(),tableName:v(),nextActions:v()});C({query:v().min(1,"Query is required"),params:ie(Jt()).optional()});C({rows:ie(_t(v(),Jt())),rowCount:Q().nullable(),fields:ie(C({name:v(),dataTypeID:Q()})).optional()});C({tables:ie(v()).optional(),format:nt(["sql","json"]).default("sql"),includeData:Be().default(!0),includeFunctions:Be().default(!1),includeSequences:Be().default(!1),includeViews:Be().default(!1),rowLimit:Q().int().positive().max(1e4).default(1e3)});const yC=C({timestamp:v(),tables:_t(v(),C({schema:ie(C({columnName:v(),dataType:v(),characterMaximumLength:Q().nullable(),isNullable:v(),columnDefault:v().nullable()})),indexes:ie(C({indexname:v(),indexdef:v(),isUnique:Be().nullable(),isPrimary:Be().nullable()})),foreignKeys:ie(C({constraintName:v(),columnName:v(),foreignTableName:v(),foreignColumnName:v(),deleteRule:v().nullable(),updateRule:v().nullable()})),rlsEnabled:Be().optional(),policies:ie(C({policyname:v(),cmd:v(),roles:ie(v()),qual:v().nullable(),withCheck:v().nullable()})),triggers:ie(C({triggerName:v(),actionTiming:v(),eventManipulation:v(),actionOrientation:v(),actionCondition:v().nullable(),actionStatement:v(),newTable:v().nullable(),oldTable:v().nullable()})),rows:ie(_t(v(),Jt())).optional(),recordCount:Q().optional()})),functions:ie(C({functionName:v(),functionDef:v(),kind:v()})),sequences:ie(C({sequenceName:v(),startValue:v(),increment:v(),minValue:v().nullable(),maxValue:v().nullable(),cycle:v()})),views:ie(C({viewName:v(),definition:v()}))});C({format:nt(["sql","json"]),data:zn([v(),yC]),timestamp:v()});C({truncate:zn([Be(),v().transform(e=>{if(e==="true")return!0;if(e==="false")return!1;throw new Error("Invalid boolean string")})]).default(!1)});C({success:Be(),message:v(),filename:v(),tables:ie(v()),rowsImported:Q(),fileSize:Q()});C({table:v().min(1,"Table name is required"),upsertKey:v().optional()});C({success:Be(),message:v(),table:v(),rowsAffected:Q(),totalRecords:Q(),filename:v()});C({functions:ie(fC)});C({indexes:ie(pC)});C({policies:ie(mC)});C({triggers:ie(gC)});const vC=C({id:v(),key:v(),isActive:Be(),isReserved:Be(),lastUsedAt:v().nullable(),expiresAt:v().nullable(),createdAt:v(),updatedAt:v()});C({secrets:ie(vC)});C({key:v(),value:v()});C({key:v().regex(/^[A-Z0-9_]+$/,"Use uppercase letters, numbers, and underscores only"),value:v().min(1,"Value is required")});C({success:Ye(!0),message:v(),id:v()});C({success:Ye(!0),message:v()});C({success:Ye(!0),message:v()});const bC=C({key:v(),bucket:v(),size:Q(),mimeType:v().optional(),uploadedAt:v(),url:v()}),_C=C({name:v(),public:Be(),createdAt:v()});C({id:v().uuid(),maxFileSizeMb:Q().int().positive(),createdAt:v(),updatedAt:v()});C({bucketName:v().min(1,"Bucket name cannot be empty"),isPublic:Be().default(!0)});C({isPublic:Be()});C({objects:ie(bC),pagination:C({offset:Q(),limit:Q(),total:Q()})});C({filename:v().min(1,"Filename cannot be empty"),contentType:v().optional(),size:Q().optional()});C({method:nt(["presigned","direct"]),uploadUrl:v(),fields:_t(v()).optional(),key:v(),confirmRequired:Be(),confirmUrl:v().optional(),expiresAt:rp().optional()});C({expiresIn:Q().optional().default(3600)});C({method:nt(["presigned","direct"]),url:v(),expiresAt:rp().optional(),headers:_t(v()).optional()});C({size:Q(),contentType:v().optional(),etag:v().optional()});C({maxFileSizeMb:Q().int().min(1,"Must be at least 1 MB").max(200,"Must be at most 200 MB")});const hc=v().uuid("Invalid user ID format"),wr=v().email("Invalid email format").toLowerCase().trim(),ap=v(),wC=v().min(1,"Name is required").max(100,"Name must be less than 100 characters").trim(),kC=nt(["anon","authenticated","project_admin"]),yv=nt(["code","link"]),i_=C({name:v().optional(),avatar_url:v().url().optional()}).passthrough(),ys=C({id:hc,email:wr,emailVerified:Be(),providers:ie(v()).optional(),createdAt:v(),updatedAt:v(),profile:i_.nullable(),metadata:_t(Jt()).nullable()}),fc=nt(["google","github","discord","linkedin","facebook","instagram","tiktok","apple","x","spotify","microsoft"]);C({provider:fc,redirectUri:v().url().optional()});const ip=C({id:v().uuid(),provider:fc,clientId:v().optional(),scopes:ie(v()).optional(),redirectUri:v().optional(),useSharedKey:Be(),createdAt:v(),updatedAt:v()}),xC=/^(?:(?:https?:\/\/)(?:(?:\*\.)?[^\s/:?#]+|\[[0-9A-Fa-f:.]+\])(?::\d+)?(?:\/[^\s]*)?|(?!(?:https?|javascript|data|file|vbscript):)[a-zA-Z][a-zA-Z0-9+.-]*:(?:\/\/[^\s/]+(?:\/[^\s]*)?|\/[^\s]*))$/i,s_=C({id:v().uuid(),requireEmailVerification:Be(),passwordMinLength:Q().min(4).max(128),requireNumber:Be(),requireLowercase:Be(),requireUppercase:Be(),requireSpecialChar:Be(),verifyEmailMethod:yv,resetPasswordMethod:yv,allowedRedirectUrls:ie(v().regex(xC,{message:"Invalid URL or wildcard URL"})).optional().nullable(),createdAt:v(),updatedAt:v()});C({sub:hc,email:wr,role:kC,iat:Q().optional(),exp:Q().optional()});const o_=v().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Key must contain only lowercase letters, numbers, hyphens, and underscores"),sp=C({id:v().uuid(),key:o_,name:v().min(1),discoveryEndpoint:v().url(),clientId:v().min(1),createdAt:v(),updatedAt:v()}),SC=C({limit:v().optional(),offset:v().optional()});C({email:wr,password:ap,name:wC.optional(),redirectTo:v().url().optional()});C({email:wr,password:ap});C({refreshToken:v().min(1,"refreshToken is required")});C({code:v()});SC.extend({search:v().optional()}).optional();C({userIds:ie(hc).min(1,"At least one user ID is required")});C({profile:_t(Jt())});C({email:wr,redirectTo:v().url().optional()});C({email:wr,otp:v().regex(/^\d{6}$/,"OTP code must be a 6-digit numeric code")});C({email:wr,redirectTo:v().url().optional()});C({email:wr,code:v().regex(/^\d{6}$/,"Reset password code must be a 6-digit numeric code")});C({newPassword:ap,otp:v().min(1,"OTP/token is required")});C({user:ys.optional(),accessToken:v().nullable(),requireEmailVerification:Be().optional(),csrfToken:v().nullable().optional(),refreshToken:v().optional()});C({user:ys,accessToken:v(),csrfToken:v().nullable().optional(),refreshToken:v().optional()});C({user:ys,accessToken:v(),csrfToken:v().nullable().optional(),refreshToken:v().optional()});C({accessToken:v(),user:ys,csrfToken:v().optional(),refreshToken:v().optional()});C({token:v(),expiresAt:v().datetime()});C({message:v()});C({user:ys});C({id:hc,profile:i_.nullable()});C({data:ie(ys),pagination:C({offset:Q(),limit:Q(),total:Q()})});C({message:v(),deletedCount:Q().int().nonnegative()});C({authUrl:v().url()});ip.omit({id:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().optional()});ip.omit({id:!0,provider:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().optional()}).partial();const l_=/^[A-Za-z0-9._~-]+$/;C({redirect_uri:v().url().optional(),code_challenge:v().min(43,"Code challenge must be at least 43 characters").max(128,"Code challenge must be at most 128 characters").regex(l_,"Code challenge must be base64url encoded")});C({code:v().min(1,"Exchange code is required"),code_verifier:v().min(43,"Code verifier must be at least 43 characters").max(128,"Code verifier must be at most 128 characters").regex(l_,"Code verifier must be base64url encoded")});C({data:ie(ip),count:Q()});s_.omit({id:!0,createdAt:!0,updatedAt:!0}).partial();const PC=C({oAuthProviders:ie(fc),customOAuthProviders:ie(o_),...s_.omit({id:!0,updatedAt:!0,createdAt:!0,allowedRedirectUrls:!0}).shape});C({error:v(),message:v(),statusCode:Q().int(),nextActions:v().optional()});sp.omit({id:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().min(1,"Client secret is required")});sp.omit({id:!0,key:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().min(1).optional()}).partial();C({data:ie(sp),count:Q()});const u_=nt(["system","user"]),c_=C({id:v().uuid(),pattern:v().min(1),description:v().nullable(),webhookUrls:ie(v().url()).nullable(),enabled:Be(),createdAt:v().datetime(),updatedAt:v().datetime()}),TC=C({id:v().uuid(),eventName:v().min(1),channelId:v().uuid().nullable(),channelName:v().min(1),payload:_t(v(),Jt()),senderType:u_,senderId:v().uuid().nullable(),wsAudienceCount:Q().int().min(0),whAudienceCount:Q().int().min(0),whDeliveredCount:Q().int().min(0),createdAt:v().datetime()}),CC=C({retentionDays:Q().int().positive().nullable()});C({channel:v().min(1)});C({channel:v().min(1)});C({channel:v().min(1),event:v().min(1),payload:_t(v(),Jt())});t_("ok",[C({ok:Ye(!0),channel:v().min(1)}),C({ok:Ye(!1),channel:v().min(1),error:C({code:v().min(1),message:v().min(1)})})]);C({channel:v().optional(),code:v().min(1),message:v().min(1)});C({messageId:v().uuid(),channel:v().min(1),eventName:v().min(1),payload:_t(v(),Jt())});const EC=C({channel:v().optional(),messageId:v().uuid(),senderType:u_,senderId:v().uuid().optional(),timestamp:v().datetime()});C({meta:EC}).passthrough();C({pattern:v().min(1,"Channel pattern is required"),description:v().optional(),webhookUrls:ie(v().url()).optional(),enabled:Be().optional().default(!0)});C({pattern:v().min(1).optional(),description:v().optional(),webhookUrls:ie(v().url()).optional(),enabled:Be().optional()});ie(c_);C({message:v()});C({channelId:v().uuid().optional(),eventName:v().optional(),limit:nf.number().int().min(1).max(1e3).optional().default(100),offset:nf.number().int().min(0).optional().default(0)});ie(TC);C({channelId:v().uuid().optional(),since:nf.date().optional()});C({totalMessages:Q().int().min(0),whDeliveryRate:Q().min(0).max(1),topEvents:ie(C({eventName:v(),count:Q().int().min(0)})),retentionDays:CC.shape.retentionDays});const vv=C({policyName:v(),tableName:v(),command:v(),roles:ie(v()),using:v().nullable(),withCheck:v().nullable()}),RC=C({subscribe:C({policies:ie(vv)}),publish:C({policies:ie(vv)})}),AC=PC,LC=C({tables:ie(C({tableName:v(),recordCount:Q()})),totalSizeInGB:Q(),hint:v().optional()}),DC=_C.extend({objectCount:Q().optional()}),MC=C({buckets:ie(DC),totalSizeInGB:Q()}),NC=C({slug:v(),name:v(),description:v().nullable(),status:v()}),OC=C({models:ie(C({inputModality:ie(v()),outputModality:ie(v()),modelId:v()}))}),IC=C({channels:ie(c_),permissions:RC});C({auth:AC,database:LC,storage:MC,aiIntegration:OC.optional(),functions:ie(NC),realtime:IC.optional(),version:v().optional()});const jC=C({host:v(),port:Q(),database:v(),user:v(),password:v(),sslmode:v()});C({connectionURL:v(),parameters:jC});C({databasePassword:v()});C({apiKey:v()});C({projectId:v().nullable()});const ds=nt(["text","image","audio"]),UC=C({inputModality:ie(ds).min(1),outputModality:ie(ds).min(1),provider:v(),modelId:v(),systemPrompt:v().optional()}),d_=UC.extend({id:v().uuid()});d_.extend({usageStats:C({totalInputTokens:Q(),totalOutputTokens:Q(),totalTokens:Q(),totalImageCount:Q(),totalRequests:Q()}).optional()});const BC=C({configId:v().uuid(),inputTokens:Q().int().optional(),outputTokens:Q().int().optional(),imageCount:Q().int().optional(),imageResolution:v().optional()}),FC=BC.extend({id:v().uuid(),createdAt:rp(),modelId:v().nullable().optional(),model:v().nullable(),provider:v().nullable(),inputModality:ie(ds).nullable(),outputModality:ie(ds).nullable()});C({totalInputTokens:Q(),totalOutputTokens:Q(),totalTokens:Q(),totalImageCount:Q(),totalRequests:Q()});const VC=C({type:Ye("text"),text:v()}),zC=C({type:Ye("image_url"),image_url:C({url:v(),detail:nt(["auto","low","high"]).optional()})}),$C=C({type:Ye("input_audio"),input_audio:C({data:v(),format:nt(["wav","mp3","aiff","aac","ogg","flac","m4a"])})}),HC=C({type:Ye("file"),file:C({filename:v(),file_data:v()})}),WC=zn([VC,zC,$C,HC]),KC=C({name:v(),description:v().optional(),parameters:_t(Jt()).optional()}),qC=C({type:Ye("function"),function:KC}),GC=zn([nt(["auto","none","required"]),C({type:Ye("function"),function:C({name:v()})})]),h_=C({id:v(),type:Ye("function"),function:C({name:v(),arguments:v()})}),YC=C({role:nt(["user","assistant","system","tool"]),content:zn([v(),ie(WC)]).nullable(),images:ie(C({url:v()})).optional(),tool_calls:ie(h_).optional(),tool_call_id:v().optional()}),ZC=C({enabled:Be(),engine:nt(["native","exa"]).optional(),maxResults:Q().min(1).max(10).optional(),searchPrompt:v().optional()}),QC=C({enabled:Be(),pdf:C({engine:nt(["pdf-text","mistral-ocr","native"]).optional()}).optional()});C({model:v(),messages:ie(YC),temperature:Q().min(0).max(2).optional(),maxTokens:Q().positive().optional(),topP:Q().min(0).max(1).optional(),stream:Be().optional(),webSearch:ZC.optional(),fileParser:QC.optional(),thinking:Be().optional(),tools:ie(qC).optional(),toolChoice:GC.optional(),parallelToolCalls:Be().optional()});const XC=C({type:Ye("url_citation"),urlCitation:C({url:v(),title:v().optional(),content:v().optional(),startIndex:Q().optional(),endIndex:Q().optional()})}),JC=C({type:Ye("file"),file:C({filename:v(),parsedContent:v().optional(),metadata:_t(Jt()).optional()})}),eE=zn([XC,JC]);C({text:v(),tool_calls:ie(h_).optional(),annotations:ie(eE).optional(),metadata:C({model:v(),usage:C({promptTokens:Q().optional(),completionTokens:Q().optional(),totalTokens:Q().optional()}).optional()}).optional()});C({model:v(),input:zn([v(),ie(v())]),encoding_format:nt(["float","base64"]).optional(),dimensions:Q().int().min(0).optional()});const tE=C({object:Ye("embedding"),embedding:zn([ie(Q()),v()]),index:Q()});C({object:Ye("list"),data:ie(tE),metadata:C({model:v(),usage:C({promptTokens:Q().optional(),totalTokens:Q().optional()}).optional()}).optional()});C({model:v(),prompt:v(),images:ie(C({url:v()})).optional()});C({text:v().optional(),images:ie(C({type:Ye("imageUrl"),imageUrl:v()})),metadata:C({model:v(),usage:C({promptTokens:Q().optional(),completionTokens:Q().optional(),totalTokens:Q().optional()}).optional()}).optional()});C({id:v(),inputModality:ie(ds).min(1),outputModality:ie(ds).min(1),provider:v(),modelId:v(),inputPrice:Q().min(0).optional(),outputPrice:Q().min(0).optional()});d_.omit({id:!0});C({systemPrompt:v().nullable()});C({records:ie(FC),total:Q()});C({startDate:v().datetime().optional(),endDate:v().datetime().optional(),limit:v().regex(/^\d+$/).default("50"),offset:v().regex(/^\d+$/).default("0")});C({configId:v().uuid().optional(),startDate:v().datetime().optional(),endDate:v().datetime().optional()});const nE=nt(["byok","cloud","env","unconfigured"]);C({keySource:nE,hasByokKey:Be(),maskedKey:v().optional()});C({apiKey:v().min(1,"API key is required")});const f_=C({id:v(),actor:v(),action:v(),module:v(),details:_t(Jt()).nullable(),ipAddress:v().nullable(),createdAt:v(),updatedAt:v()});C({id:v(),name:v(),token:v()});const rE=C({id:v(),eventMessage:v(),timestamp:v(),body:_t(v(),Jt()),source:v().optional()});C({source:v(),count:Q(),lastActivity:v()});const aE=C({level:v(),message:v()});C({deploymentId:v(),status:nt(["pending","success","failed"]),logs:ie(aE),createdAt:v()});C({limit:Q().default(100),offset:Q().default(0),actor:v().optional(),action:v().optional(),module:v().optional(),startDate:v().optional(),endDate:v().optional()});C({data:ie(f_),pagination:C({limit:Q(),offset:Q(),total:Q()})});C({days:Q().default(7)});C({totalLogs:Q(),uniqueActors:Q(),uniqueModules:Q(),actionsByModule:_t(Q()),recentActivity:ie(f_)});C({daysToKeep:Q().default(90)});C({message:v(),deleted:Q()});C({logs:ie(rE),total:Q()});const p_=C({id:v(),slug:v(),name:v(),description:v().nullable(),code:v(),status:nt(["draft","active","error"]),createdAt:v(),updatedAt:v(),deployedAt:v().nullable()});C({name:v().min(1,"Name is required"),slug:v().regex(/^[a-zA-Z0-9_-]+$/,"Invalid slug format - must be alphanumeric with hyphens or underscores only").optional(),code:v().min(1),description:v().optional(),status:nt(["draft","active"]).optional().default("active")});C({name:v().optional(),code:v().optional(),description:v().optional(),status:nt(["draft","active"]).optional()});C({functions:ie(p_),runtime:C({status:nt(["running","unavailable"])}),deploymentUrl:v().nullable().optional()});const iE=C({id:v(),status:nt(["success","failed"]),url:v().nullable(),buildLogs:ie(v()).optional()});C({success:Be(),function:p_,deployment:iE.nullable().optional()});const sE=C({type:Ye("APP_ROUTE_CHANGE"),path:v()}),oE=C({type:Ye("AUTH_SUCCESS")}),lE=C({type:Ye("AUTH_ERROR"),message:v()}),uE=C({type:Ye("MCP_CONNECTION_STATUS"),connected:Be(),toolName:v(),timestamp:zn([Q(),v()])}),cE=C({type:Ye("SHOW_ONBOARDING_OVERLAY")}),dE=C({type:Ye("SHOW_SETTINGS_OVERLAY")}),hE=C({type:Ye("ONBOARDING_SUCCESS")}),fE=C({type:Ye("NAVIGATE_TO_USAGE")}),pE=C({type:Ye("SHOW_CONTACT_MODAL")}),mE=C({type:Ye("SHOW_CONNECT_OVERLAY")}),gE=C({type:Ye("SHOW_PLAN_MODAL")}),yE=C({type:Ye("AUTHORIZATION_CODE"),code:v()}),vE=C({type:Ye("ROUTE_CHANGE"),path:v()}),bE=C({type:Ye("REQUEST_PROJECT_INFO")}),_E=C({type:Ye("PROJECT_INFO"),name:v(),instanceType:v(),region:v(),latestVersion:v().optional()}),wE=C({type:Ye("REQUEST_INSTANCE_INFO")}),kE=C({type:Ye("INSTANCE_INFO"),currentInstanceType:v(),planName:v(),computeCredits:Q(),currentOrgComputeCost:Q(),instanceTypes:ie(C({id:v(),name:v(),cpu:v(),ram:v(),pricePerHour:Q(),pricePerMonth:Q()})),projects:ie(C({name:v(),instanceType:v(),monthlyCost:Q(),isCurrent:Be(),status:v()}))}),xE=C({type:Ye("REQUEST_INSTANCE_TYPE_CHANGE"),instanceType:v()}),SE=C({type:Ye("INSTANCE_TYPE_CHANGE_RESULT"),success:Be(),instanceType:v().optional(),error:v().optional()});t_("type",[sE,oE,lE,uE,cE,dE,hE,fE,pE,mE,gE,yE,vE,bE,_E,wE,kE,xE,SE]);nt(["db","storage","functions","auth","ai","realtime"]).describe(`
|
|
13
|
+
SDK feature categories:
|
|
14
|
+
|
|
15
|
+
- "db" - Database operations
|
|
16
|
+
- "storage" - File storage
|
|
17
|
+
- "functions" - Edge functions
|
|
18
|
+
- "auth" - User authentication
|
|
19
|
+
- "ai" - AI features
|
|
20
|
+
- "realtime" - Real-time WebSockets
|
|
21
|
+
`);nt(["typescript","swift","kotlin","rest-api"]).describe(`
|
|
22
|
+
SDK languages:
|
|
23
|
+
|
|
24
|
+
- "typescript" - JavaScript/TypeScript SDK
|
|
25
|
+
- "swift" - Swift SDK
|
|
26
|
+
- "kotlin" - Kotlin SDK
|
|
27
|
+
- "rest-api" - REST API
|
|
28
|
+
`);nt(["instructions","auth-sdk","db-sdk","storage-sdk","functions-sdk","ai-integration-sdk","real-time","deployment"]).describe(`
|
|
29
|
+
Documentation type:
|
|
30
|
+
"instructions" (essential backend setup - use FIRST),
|
|
31
|
+
"db-sdk" (database operations),
|
|
32
|
+
"storage-sdk" (file storage),
|
|
33
|
+
"functions-sdk" (edge functions),
|
|
34
|
+
"auth-sdk" (direct SDK methods for custom auth flows),
|
|
35
|
+
"ai-integration-sdk" (AI features),
|
|
36
|
+
"real-time" (real-time pub/sub through WebSockets),
|
|
37
|
+
"deployment" (deploy frontend applications via MCP tool)
|
|
38
|
+
`);const vh=zn([wr,ie(wr).min(1,"At least one email is required").max(50,"Maximum 50 recipients allowed")]);C({to:vh,subject:v().trim().min(1,"Subject is required").max(500,"Subject too long"),html:v().trim().min(1,"HTML content is required"),cc:vh.optional(),bcc:vh.optional(),from:v().trim().max(100,"From name too long").optional(),replyTo:v().email("Reply-To must be a valid email").optional()});C({});const PE=nt(["WAITING","UPLOADING","QUEUED","BUILDING","READY","ERROR","CANCELED"]),TE=C({id:v().uuid(),providerDeploymentId:v().nullable(),provider:v(),status:PE,url:v().nullable(),metadata:_t(Jt()).nullable(),createdAt:v().datetime(),updatedAt:v().datetime()}),CE=C({buildCommand:v().nullable().optional(),outputDirectory:v().nullable().optional(),installCommand:v().nullable().optional(),devCommand:v().nullable().optional(),rootDirectory:v().nullable().optional()}),EE=C({key:v(),value:v()});C({id:v().uuid(),uploadUrl:v().url(),uploadFields:_t(v())});C({projectSettings:CE.optional(),envVars:ie(EE).optional(),meta:_t(v()).optional()});C({data:ie(TE),pagination:C({limit:Q(),offset:Q(),total:Q()})});const RE=C({id:v(),key:v(),type:nt(["plain","encrypted","secret","sensitive","system"]),updatedAt:Q().optional()}),AE=C({id:v(),key:v(),value:v(),type:nt(["plain","encrypted","secret","sensitive","system"]),updatedAt:Q().optional()});C({envVars:ie(RE)});C({envVar:AE});const LE=C({key:v().trim().min(1,"key is required"),value:v()});C({envVars:ie(LE).min(1)}).superRefine(({envVars:e},t)=>{const n=new Map;e.forEach((a,s)=>{if(n.get(a.key)!==void 0){t.addIssue({code:re.custom,message:"duplicate environment variable key",path:["envVars",s,"key"]});return}n.set(a.key,s)})});C({success:Ye(!0),message:v()});C({success:Ye(!0),message:v(),count:Q().int().positive()});C({success:Ye(!0),message:v()});C({slug:v().trim().min(3,"slug must be at least 3 characters").max(63,"slug must be at most 63 characters").regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"slug must be lowercase alphanumeric with hyphens, not starting or ending with hyphen").nullable()});C({success:Be(),slug:v().nullable(),domain:v().nullable()});C({currentDeploymentId:v().uuid().nullable(),defaultDomainUrl:v().nullable(),customDomainUrl:v().nullable()});const DE=C({type:v(),domain:v(),value:v()}),ME=C({domain:v(),apexDomain:v(),verified:Be(),misconfigured:Be(),verification:ie(DE),cnameTarget:v().nullable(),aRecordValue:v().nullable()});C({domain:v().trim().min(1,"Domain is required").regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i,"Invalid domain format (e.g. myapp.com or www.myapp.com)").refine(e=>!e.toLowerCase().endsWith(".insforge.site"),{message:"Domains ending with .insforge.site are reserved by InsForge"})});C({domains:ie(ME)});const NE=C({id:v().uuid(),name:v(),cronSchedule:v(),functionUrl:v().url(),httpMethod:nt(["GET","POST","PUT","PATCH","DELETE"]),headers:_t(v()).nullable(),body:zn([v(),_t(Jt())]).nullable(),cronJobId:v().nullable(),lastExecutedAt:v().datetime().nullable(),isActive:Be().default(!0),nextRun:v().datetime().nullable(),createdAt:v().datetime(),updatedAt:v().datetime()}),OE=C({id:v().uuid(),scheduleId:v().uuid(),executedAt:v().datetime(),statusCode:Q().int(),success:Be(),durationMs:Q().int(),message:v().nullable()}),m_=v().refine(e=>{const t=e.split(" ");return t.length===5||t.length===6},{message:'Invalid cron schedule format. Use 5 or 6 parts (e.g., "* * * * *").'});C({name:v().min(3,"Schedule name must be at least 3 characters long"),cronSchedule:m_,functionUrl:v().url("The function URL must be a valid URL."),httpMethod:nt(["GET","POST","PUT","PATCH","DELETE"]),headers:_t(v()).optional().describe("Header values can reference secrets using ${{secrets.KEY_NAME}} syntax."),body:_t(Jt()).optional().describe("The JSON body to send with the request.")});C({name:v().min(3,"Schedule name must be at least 3 characters long").optional(),cronSchedule:m_.optional(),functionUrl:v().url("The function URL must be a valid URL.").optional(),httpMethod:nt(["GET","POST","PUT","PATCH","DELETE"]).optional(),headers:_t(v()).optional().describe("Header values can reference secrets using ${{secrets.KEY_NAME}} syntax."),body:_t(Jt()).optional().describe("The JSON body to send with the request."),isActive:Be().optional().describe("Enable or disable the schedule.")});ie(NE);const IE=OE;C({logs:ie(IE),totalCount:Q().int().nonnegative(),limit:Q().int().positive(),offset:Q().int().nonnegative()});C({id:v().uuid(),cronJobId:v(),message:v()});C({id:v().uuid(),cronJobId:v().optional(),message:v()});C({message:v()});var zt={},Gi={},Yi={},Zi={},Qi={},Xi={},jE=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},hs=jE();const UE=hs.fetch,BE=hs.fetch.bind(hs),FE=hs.Headers,VE=hs.Request,zE=hs.Response,$E=Object.freeze(Object.defineProperty({__proto__:null,Headers:FE,Request:VE,Response:zE,default:BE,fetch:UE},Symbol.toStringTag,{value:"Module"})),HE=aP($E);var su={},bv;function g_(){if(bv)return su;bv=1,Object.defineProperty(su,"__esModule",{value:!0});class e extends Error{constructor(n){super(n.message),this.name="PostgrestError",this.details=n.details,this.hint=n.hint,this.code=n.code}}return su.default=e,su}var _v;function y_(){if(_v)return Xi;_v=1;var e=Xi&&Xi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Xi,"__esModule",{value:!0});const t=e(HE),n=e(g_());class a{constructor(o){var u,c;this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=new Headers(o.headers),this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=(u=o.shouldThrowOnError)!==null&&u!==void 0?u:!1,this.signal=o.signal,this.isMaybeSingle=(c=o.isMaybeSingle)!==null&&c!==void 0?c:!1,o.fetch?this.fetch=o.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,u){return this.headers=new Headers(this.headers),this.headers.set(o,u),this}then(o,u){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");const c=this.fetch;let h=c(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async f=>{var m,y,b,w;let x=null,T=null,P=null,L=f.status,D=f.statusText;if(f.ok){if(this.method!=="HEAD"){const G=await f.text();G===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((m=this.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?T=G:T=JSON.parse(G))}const I=(y=this.headers.get("Prefer"))===null||y===void 0?void 0:y.match(/count=(exact|planned|estimated)/),K=(b=f.headers.get("content-range"))===null||b===void 0?void 0:b.split("/");I&&K&&K.length>1&&(P=parseInt(K[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(T)&&(T.length>1?(x={code:"PGRST116",details:`Results contain ${T.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},T=null,P=null,L=406,D="Not Acceptable"):T.length===1?T=T[0]:T=null)}else{const I=await f.text();try{x=JSON.parse(I),Array.isArray(x)&&f.status===404&&(T=[],x=null,L=200,D="OK")}catch{f.status===404&&I===""?(L=204,D="No Content"):x={message:I}}if(x&&this.isMaybeSingle&&(!((w=x?.details)===null||w===void 0)&&w.includes("0 rows"))&&(x=null,L=200,D="OK"),x&&this.shouldThrowOnError)throw new n.default(x)}return{error:x,data:T,count:P,status:L,statusText:D}});return this.shouldThrowOnError||(h=h.catch(f=>{var m,y,b;return{error:{message:`${(m=f?.name)!==null&&m!==void 0?m:"FetchError"}: ${f?.message}`,details:`${(y=f?.stack)!==null&&y!==void 0?y:""}`,hint:"",code:`${(b=f?.code)!==null&&b!==void 0?b:""}`},data:null,count:null,status:0,statusText:""}})),h.then(o,u)}returns(){return this}overrideTypes(){return this}}return Xi.default=a,Xi}var wv;function v_(){if(wv)return Qi;wv=1;var e=Qi&&Qi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Qi,"__esModule",{value:!0});const t=e(y_());class n extends t.default{select(s){let o=!1;const u=(s??"*").split("").map(c=>/\s/.test(c)&&!o?"":(c==='"'&&(o=!o),c)).join("");return this.url.searchParams.set("select",u),this.headers.append("Prefer","return=representation"),this}order(s,{ascending:o=!0,nullsFirst:u,foreignTable:c,referencedTable:h=c}={}){const f=h?`${h}.order`:"order",m=this.url.searchParams.get(f);return this.url.searchParams.set(f,`${m?`${m},`:""}${s}.${o?"asc":"desc"}${u===void 0?"":u?".nullsfirst":".nullslast"}`),this}limit(s,{foreignTable:o,referencedTable:u=o}={}){const c=typeof u>"u"?"limit":`${u}.limit`;return this.url.searchParams.set(c,`${s}`),this}range(s,o,{foreignTable:u,referencedTable:c=u}={}){const h=typeof c>"u"?"offset":`${c}.offset`,f=typeof c>"u"?"limit":`${c}.limit`;return this.url.searchParams.set(h,`${s}`),this.url.searchParams.set(f,`${o-s+1}`),this}abortSignal(s){return this.signal=s,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),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:s=!1,verbose:o=!1,settings:u=!1,buffers:c=!1,wal:h=!1,format:f="text"}={}){var m;const y=[s?"analyze":null,o?"verbose":null,u?"settings":null,c?"buffers":null,h?"wal":null].filter(Boolean).join("|"),b=(m=this.headers.get("Accept"))!==null&&m!==void 0?m:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${f}; for="${b}"; options=${y};`),f==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(s){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${s}`),this}}return Qi.default=n,Qi}var kv;function op(){if(kv)return Zi;kv=1;var e=Zi&&Zi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Zi,"__esModule",{value:!0});const t=e(v_());class n extends t.default{eq(s,o){return this.url.searchParams.append(s,`eq.${o}`),this}neq(s,o){return this.url.searchParams.append(s,`neq.${o}`),this}gt(s,o){return this.url.searchParams.append(s,`gt.${o}`),this}gte(s,o){return this.url.searchParams.append(s,`gte.${o}`),this}lt(s,o){return this.url.searchParams.append(s,`lt.${o}`),this}lte(s,o){return this.url.searchParams.append(s,`lte.${o}`),this}like(s,o){return this.url.searchParams.append(s,`like.${o}`),this}likeAllOf(s,o){return this.url.searchParams.append(s,`like(all).{${o.join(",")}}`),this}likeAnyOf(s,o){return this.url.searchParams.append(s,`like(any).{${o.join(",")}}`),this}ilike(s,o){return this.url.searchParams.append(s,`ilike.${o}`),this}ilikeAllOf(s,o){return this.url.searchParams.append(s,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(s,o){return this.url.searchParams.append(s,`ilike(any).{${o.join(",")}}`),this}is(s,o){return this.url.searchParams.append(s,`is.${o}`),this}in(s,o){const u=Array.from(new Set(o)).map(c=>typeof c=="string"&&new RegExp("[,()]").test(c)?`"${c}"`:`${c}`).join(",");return this.url.searchParams.append(s,`in.(${u})`),this}contains(s,o){return typeof o=="string"?this.url.searchParams.append(s,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(s,`cs.{${o.join(",")}}`):this.url.searchParams.append(s,`cs.${JSON.stringify(o)}`),this}containedBy(s,o){return typeof o=="string"?this.url.searchParams.append(s,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(s,`cd.{${o.join(",")}}`):this.url.searchParams.append(s,`cd.${JSON.stringify(o)}`),this}rangeGt(s,o){return this.url.searchParams.append(s,`sr.${o}`),this}rangeGte(s,o){return this.url.searchParams.append(s,`nxl.${o}`),this}rangeLt(s,o){return this.url.searchParams.append(s,`sl.${o}`),this}rangeLte(s,o){return this.url.searchParams.append(s,`nxr.${o}`),this}rangeAdjacent(s,o){return this.url.searchParams.append(s,`adj.${o}`),this}overlaps(s,o){return typeof o=="string"?this.url.searchParams.append(s,`ov.${o}`):this.url.searchParams.append(s,`ov.{${o.join(",")}}`),this}textSearch(s,o,{config:u,type:c}={}){let h="";c==="plain"?h="pl":c==="phrase"?h="ph":c==="websearch"&&(h="w");const f=u===void 0?"":`(${u})`;return this.url.searchParams.append(s,`${h}fts${f}.${o}`),this}match(s){return Object.entries(s).forEach(([o,u])=>{this.url.searchParams.append(o,`eq.${u}`)}),this}not(s,o,u){return this.url.searchParams.append(s,`not.${o}.${u}`),this}or(s,{foreignTable:o,referencedTable:u=o}={}){const c=u?`${u}.or`:"or";return this.url.searchParams.append(c,`(${s})`),this}filter(s,o,u){return this.url.searchParams.append(s,`${o}.${u}`),this}}return Zi.default=n,Zi}var xv;function b_(){if(xv)return Yi;xv=1;var e=Yi&&Yi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Yi,"__esModule",{value:!0});const t=e(op());class n{constructor(s,{headers:o={},schema:u,fetch:c}){this.url=s,this.headers=new Headers(o),this.schema=u,this.fetch=c}select(s,{head:o=!1,count:u}={}){const c=o?"HEAD":"GET";let h=!1;const f=(s??"*").split("").map(m=>/\s/.test(m)&&!h?"":(m==='"'&&(h=!h),m)).join("");return this.url.searchParams.set("select",f),u&&this.headers.append("Prefer",`count=${u}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(s,{count:o,defaultToNull:u=!0}={}){var c;const h="POST";if(o&&this.headers.append("Prefer",`count=${o}`),u||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const f=s.reduce((m,y)=>m.concat(Object.keys(y)),[]);if(f.length>0){const m=[...new Set(f)].map(y=>`"${y}"`);this.url.searchParams.set("columns",m.join(","))}}return new t.default({method:h,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}upsert(s,{onConflict:o,ignoreDuplicates:u=!1,count:c,defaultToNull:h=!0}={}){var f;const m="POST";if(this.headers.append("Prefer",`resolution=${u?"ignore":"merge"}-duplicates`),o!==void 0&&this.url.searchParams.set("on_conflict",o),c&&this.headers.append("Prefer",`count=${c}`),h||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const y=s.reduce((b,w)=>b.concat(Object.keys(w)),[]);if(y.length>0){const b=[...new Set(y)].map(w=>`"${w}"`);this.url.searchParams.set("columns",b.join(","))}}return new t.default({method:m,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(f=this.fetch)!==null&&f!==void 0?f:fetch})}update(s,{count:o}={}){var u;const c="PATCH";return o&&this.headers.append("Prefer",`count=${o}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}delete({count:s}={}){var o;const u="DELETE";return s&&this.headers.append("Prefer",`count=${s}`),new t.default({method:u,url:this.url,headers:this.headers,schema:this.schema,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}}return Yi.default=n,Yi}var Sv;function WE(){if(Sv)return Gi;Sv=1;var e=Gi&&Gi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Gi,"__esModule",{value:!0});const t=e(b_()),n=e(op());class a{constructor(o,{headers:u={},schema:c,fetch:h}={}){this.url=o,this.headers=new Headers(u),this.schemaName=c,this.fetch=h}from(o){const u=new URL(`${this.url}/${o}`);return new t.default(u,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(o){return new a(this.url,{headers:this.headers,schema:o,fetch:this.fetch})}rpc(o,u={},{head:c=!1,get:h=!1,count:f}={}){var m;let y;const b=new URL(`${this.url}/rpc/${o}`);let w;c||h?(y=c?"HEAD":"GET",Object.entries(u).filter(([T,P])=>P!==void 0).map(([T,P])=>[T,Array.isArray(P)?`{${P.join(",")}}`:`${P}`]).forEach(([T,P])=>{b.searchParams.append(T,P)})):(y="POST",w=u);const x=new Headers(this.headers);return f&&x.set("Prefer",`count=${f}`),new n.default({method:y,url:b,headers:x,schema:this.schemaName,body:w,fetch:(m=this.fetch)!==null&&m!==void 0?m:fetch})}}return Gi.default=a,Gi}var Pv;function KE(){if(Pv)return zt;Pv=1;var e=zt&&zt.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.PostgrestError=zt.PostgrestBuilder=zt.PostgrestTransformBuilder=zt.PostgrestFilterBuilder=zt.PostgrestQueryBuilder=zt.PostgrestClient=void 0;const t=e(WE());zt.PostgrestClient=t.default;const n=e(b_());zt.PostgrestQueryBuilder=n.default;const a=e(op());zt.PostgrestFilterBuilder=a.default;const s=e(v_());zt.PostgrestTransformBuilder=s.default;const o=e(y_());zt.PostgrestBuilder=o.default;const u=e(g_());return zt.PostgrestError=u.default,zt.default={PostgrestClient:t.default,PostgrestQueryBuilder:n.default,PostgrestFilterBuilder:a.default,PostgrestTransformBuilder:s.default,PostgrestBuilder:o.default,PostgrestError:u.default},zt}var qE=KE();const GE=vb(qE),{PostgrestClient:YE,PostgrestQueryBuilder:kj,PostgrestFilterBuilder:xj,PostgrestTransformBuilder:Sj,PostgrestBuilder:Pj,PostgrestError:Tj}=GE,kr=Object.create(null);kr.open="0";kr.close="1";kr.ping="2";kr.pong="3";kr.message="4";kr.upgrade="5";kr.noop="6";const _u=Object.create(null);Object.keys(kr).forEach(e=>{_u[kr[e]]=e});const rf={type:"error",data:"parser error"},__=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",w_=typeof ArrayBuffer=="function",k_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lp=({type:e,data:t},n,a)=>__&&t instanceof Blob?n?a(t):Tv(t,a):w_&&(t instanceof ArrayBuffer||k_(t))?n?a(t):Tv(new Blob([t]),a):a(kr[e]+(t||"")),Tv=(e,t)=>{const n=new FileReader;return n.onload=function(){const a=n.result.split(",")[1];t("b"+(a||""))},n.readAsDataURL(e)};function Cv(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let bh;function ZE(e,t){if(__&&e.data instanceof Blob)return e.data.arrayBuffer().then(Cv).then(t);if(w_&&(e.data instanceof ArrayBuffer||k_(e.data)))return t(Cv(e.data));lp(e,!1,n=>{bh||(bh=new TextEncoder),t(bh.encode(n))})}const Ev="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Ev.length;e++)bo[Ev.charCodeAt(e)]=e;const QE=e=>{let t=e.length*.75,n=e.length,a,s=0,o,u,c,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),m=new Uint8Array(f);for(a=0;a<n;a+=4)o=bo[e.charCodeAt(a)],u=bo[e.charCodeAt(a+1)],c=bo[e.charCodeAt(a+2)],h=bo[e.charCodeAt(a+3)],m[s++]=o<<2|u>>4,m[s++]=(u&15)<<4|c>>2,m[s++]=(c&3)<<6|h&63;return f},XE=typeof ArrayBuffer=="function",up=(e,t)=>{if(typeof e!="string")return{type:"message",data:x_(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:JE(e.substring(1),t)}:_u[n]?e.length>1?{type:_u[n],data:e.substring(1)}:{type:_u[n]}:rf},JE=(e,t)=>{if(XE){const n=QE(e);return x_(n,t)}else return{base64:!0,data:e}},x_=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,S_="",eR=(e,t)=>{const n=e.length,a=new Array(n);let s=0;e.forEach((o,u)=>{lp(o,!1,c=>{a[u]=c,++s===n&&t(a.join(S_))})})},tR=(e,t)=>{const n=e.split(S_),a=[];for(let s=0;s<n.length;s++){const o=up(n[s],t);if(a.push(o),o.type==="error")break}return a};function nR(){return new TransformStream({transform(e,t){ZE(e,n=>{const a=n.length;let s;if(a<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,a);else if(a<65536){s=new Uint8Array(3);const o=new DataView(s.buffer);o.setUint8(0,126),o.setUint16(1,a)}else{s=new Uint8Array(9);const o=new DataView(s.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let _h;function ou(e){return e.reduce((t,n)=>t+n.length,0)}function lu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let a=0;for(let s=0;s<t;s++)n[s]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),n}function rR(e,t){_h||(_h=new TextDecoder);const n=[];let a=0,s=-1,o=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(a===0){if(ou(n)<1)break;const h=lu(n,1);o=(h[0]&128)===128,s=h[0]&127,s<126?a=3:s===126?a=1:a=2}else if(a===1){if(ou(n)<2)break;const h=lu(n,2);s=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),a=3}else if(a===2){if(ou(n)<8)break;const h=lu(n,8),f=new DataView(h.buffer,h.byteOffset,h.length),m=f.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(rf);break}s=m*Math.pow(2,32)+f.getUint32(4),a=3}else{if(ou(n)<s)break;const h=lu(n,s);c.enqueue(up(o?h:_h.decode(h),t)),a=0}if(s===0||s>e){c.enqueue(rf);break}}}})}const P_=4;function Dt(e){if(e)return aR(e)}function aR(e){for(var t in Dt.prototype)e[t]=Dt.prototype[t];return e}Dt.prototype.on=Dt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Dt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,s=0;s<n.length;s++)if(a=n[s],a===t||a.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Dt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(n){n=n.slice(0);for(var a=0,s=n.length;a<s;++a)n[a].apply(this,t)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Dt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const pc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),iR="arraybuffer";function T_(e,...t){return t.reduce((n,a)=>(e.hasOwnProperty(a)&&(n[a]=e[a]),n),{})}const sR=On.setTimeout,oR=On.clearTimeout;function mc(e,t){t.useNativeTimers?(e.setTimeoutFn=sR.bind(On),e.clearTimeoutFn=oR.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const lR=1.33;function uR(e){return typeof e=="string"?cR(e):Math.ceil((e.byteLength||e.size)*lR)}function cR(e){let t=0,n=0;for(let a=0,s=e.length;a<s;a++)t=e.charCodeAt(a),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(a++,n+=4);return n}function C_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function dR(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function hR(e){let t={},n=e.split("&");for(let a=0,s=n.length;a<s;a++){let o=n[a].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class fR extends Error{constructor(t,n,a){super(t),this.description=n,this.context=a,this.type="TransportError"}}class cp extends Dt{constructor(t){super(),this.writable=!1,mc(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,a){return super.emitReserved("error",new fR(t,n,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=up(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=dR(t);return n.length?"?"+n:""}}class pR extends cp{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||n()})),this.writable||(a++,this.once("drain",function(){--a||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};tR(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,eR(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=C_()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let E_=!1;try{E_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const mR=E_;function gR(){}class yR extends pR{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let a=location.port;a||(a=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,n){const a=this.request({method:"POST",data:t});a.on("success",n),a.on("error",(s,o)=>{this.onError("xhr post error",s,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,a)=>{this.onError("xhr poll error",n,a)}),this.pollXhr=t}}let ls=class wu extends Dt{constructor(t,n,a){super(),this.createRequest=t,mc(this,a),this._opts=a,this._method=a.method||"GET",this._uri=n,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;const n=T_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(n);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&a.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var s;a.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=wu.requestsCount++,wu.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=gR,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wu.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ls.requestsCount=0;ls.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Rv);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Rv,!1)}}function Rv(){for(let e in ls.requests)ls.requests.hasOwnProperty(e)&&ls.requests[e].abort()}const vR=(function(){const e=R_({xdomain:!1});return e&&e.responseType!==null})();class bR extends yR{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=vR&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ls(R_,this.uri(),t)}}function R_(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||mR))return new XMLHttpRequest}catch{}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const A_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class _R extends cp{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,a=A_?{}:T_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,a)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const a=t[n],s=n===t.length-1;lp(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}s&&pc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=C_()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const wh=On.WebSocket||On.MozWebSocket;class wR extends _R{createSocket(t,n,a){return A_?new wh(t,n,a):n?new wh(t,n):new wh(t)}doWrite(t,n){this.ws.send(n)}}class kR extends cp{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=rR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(n).getReader(),s=nR();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const o=()=>{a.read().then(({done:c,value:h})=>{c||(this.onPacket(h),o())}).catch(c=>{})};o();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const a=t[n],s=n===t.length-1;this._writer.write(a).then(()=>{s&&pc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const xR={websocket:wR,webtransport:kR,polling:bR},SR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function af(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),a=e.indexOf("]");n!=-1&&a!=-1&&(e=e.substring(0,n)+e.substring(n,a).replace(/:/g,";")+e.substring(a,e.length));let s=SR.exec(e||""),o={},u=14;for(;u--;)o[PR[u]]=s[u]||"";return n!=-1&&a!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=TR(o,o.path),o.queryKey=CR(o,o.query),o}function TR(e,t){const n=/\/{2,9}/g,a=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function CR(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,s,o){s&&(n[s]=o)}),n}const sf=typeof addEventListener=="function"&&typeof removeEventListener=="function",ku=[];sf&&addEventListener("offline",()=>{ku.forEach(e=>e())},!1);class La extends Dt{constructor(t,n){if(super(),this.binaryType=iR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const a=af(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=af(n.host).host);mc(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(a=>{const s=a.prototype.name;this.transports.push(s),this._transportsByName[s]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=hR(this.opts.query)),sf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ku.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=P_,n.transport=t,this.id&&(n.sid=this.id);const a=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&La.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",La.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let a=0;a<this.writeBuffer.length;a++){const s=this.writeBuffer[a].data;if(s&&(n+=uR(s)),a>0&&n>this._maxPayload)return this.writeBuffer.slice(0,a);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,pc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,a){return this._sendPacket("message",t,n,a),this}send(t,n,a){return this._sendPacket("message",t,n,a),this}_sendPacket(t,n,a,s){if(typeof n=="function"&&(s=n,n=void 0),typeof a=="function"&&(s=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const o={type:t,data:n,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},a=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(La.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),sf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=ku.indexOf(this._offlineEventListener);a!==-1&&ku.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}La.protocol=P_;class ER extends La{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),a=!1;La.priorWebsocketSuccess=!1;const s=()=>{a||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!a)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;La.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function o(){a||(a=!0,m(),n.close(),n=null)}const u=y=>{const b=new Error("probe error: "+y);b.transport=n.name,o(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function h(){u("socket closed")}function f(y){n&&y.name!==n.name&&o()}const m=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",h),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",h),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&n.push(t[a]);return n}}let RR=class extends ER{constructor(t,n={}){const a=typeof t=="object"?t:n;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(s=>xR[s]).filter(s=>!!s)),super(t,a)}};function AR(e,t="",n){let a=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),a=af(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const o=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+o+":"+a.port+t,a.href=a.protocol+"://"+o+(n&&n.port===a.port?"":":"+a.port),a}const LR=typeof ArrayBuffer=="function",DR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,L_=Object.prototype.toString,MR=typeof Blob=="function"||typeof Blob<"u"&&L_.call(Blob)==="[object BlobConstructor]",NR=typeof File=="function"||typeof File<"u"&&L_.call(File)==="[object FileConstructor]";function dp(e){return LR&&(e instanceof ArrayBuffer||DR(e))||MR&&e instanceof Blob||NR&&e instanceof File}function xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,a=e.length;n<a;n++)if(xu(e[n]))return!0;return!1}if(dp(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}function OR(e){const t=[],n=e.data,a=e;return a.data=of(n,t),a.attachments=t.length,{packet:a,buffers:t}}function of(e,t){if(!e)return e;if(dp(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=of(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=of(e[a],t));return n}return e}function IR(e,t){return e.data=lf(e.data,t),delete e.attachments,e}function lf(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=lf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=lf(e[n],t));return e}const jR=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(tt||(tt={}));class UR{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&xu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=OR(t),a=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(a),s}}class hp extends Dt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const a=n.type===tt.BINARY_EVENT;a||n.type===tt.BINARY_ACK?(n.type=a?tt.EVENT:tt.ACK,this.reconstructor=new BR(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(dp(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const a={type:Number(t.charAt(0))};if(tt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===tt.BINARY_EVENT||a.type===tt.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(o,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!FR(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");a.attachments=c}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););a.nsp=t.substring(o,n)}else a.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const o=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}a.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(hp.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case tt.CONNECT:return Av(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||Av(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&jR.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BR{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=IR(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const FR=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Av(e){return Object.prototype.toString.call(e)==="[object Object]"}const VR=Object.freeze(Object.defineProperty({__proto__:null,Decoder:hp,Encoder:UR,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function nr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class D_ extends Dt{constructor(t,n,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[nr(t,"open",this.onopen.bind(this)),nr(t,"packet",this.onpacket.bind(this)),nr(t,"error",this.onerror.bind(this)),nr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var a,s,o;if(zR.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,y=n.pop();this._registerAckCallback(m,y),u.id=m}const c=(s=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||s===void 0?void 0:s.writable,h=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!c||(h?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var a;const s=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(o),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((a,s)=>{const o=(u,c)=>u?s(u):a(c);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...o)=>(this._queue[0],s!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...o)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){const a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.CONNECT_ERROR:this.destroy();const a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const a of n)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let a=!1;return function(...s){a||(a=!0,n.packet({type:tt.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const a of n)a.apply(this,t.data)}}}function vs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}vs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};vs.prototype.reset=function(){this.attempts=0};vs.prototype.setMin=function(e){this.ms=e};vs.prototype.setMax=function(e){this.max=e};vs.prototype.setJitter=function(e){this.jitter=e};class uf extends Dt{constructor(t,n){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,mc(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((a=n.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new vs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||VR;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new RR(this.uri,this.opts);const n=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const s=nr(n,"open",function(){a.onopen(),t&&t()}),o=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=nr(n,"error",o);if(this._timeout!==!1){const c=this._timeout,h=this.setTimeoutFn(()=>{s(),o(new Error("timeout")),n.close()},c);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(nr(t,"ping",this.onping.bind(this)),nr(t,"data",this.ondata.bind(this)),nr(t,"error",this.onerror.bind(this)),nr(t,"close",this.onclose.bind(this)),nr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){pc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new D_(this,t,n),this.nsps[t]=a),a}_destroy(t){const n=Object.keys(this.nsps);for(const a of n)if(this.nsps[a].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let a=0;a<n.length;a++)this.engine.write(n[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fo={};function Su(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=AR(e,t.path||"/socket.io"),a=n.source,s=n.id,o=n.path,u=fo[s]&&o in fo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let h;return c?h=new uf(a,t):(fo[s]||(fo[s]=new uf(a,t)),h=fo[s]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(Su,{Manager:uf,Socket:D_,io:Su,connect:Su});var We=class M_ extends Error{constructor(t,n,a,s){super(t),this.name="InsForgeError",this.statusCode=n,this.error=a,this.nextActions=s}static fromApiError(t){return new M_(t.message,t.statusCode,t.error,t.nextActions)}},$R=["authorization","x-api-key","cookie","set-cookie"],HR=["password","token","accesstoken","refreshtoken","authorization","secret","apikey","api_key","email","ssn","creditcard","credit_card"];function WR(e){const t={};for(const[n,a]of Object.entries(e))$R.includes(n.toLowerCase())?t[n]="***REDACTED***":t[n]=a;return t}function ko(e){if(e==null)return e;if(typeof e=="string")try{const t=JSON.parse(e);return ko(t)}catch{return e}if(Array.isArray(e))return e.map(ko);if(typeof e=="object"){const t={};for(const[n,a]of Object.entries(e))HR.includes(n.toLowerCase().replace(/[-_]/g,""))?t[n]="***REDACTED***":t[n]=ko(a);return t}return e}function Lv(e){if(e==null)return"";if(typeof e=="string")try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}if(typeof FormData<"u"&&e instanceof FormData)return"[FormData]";try{return JSON.stringify(e,null,2)}catch{return"[Unserializable body]"}}var N_=class{constructor(e){typeof e=="function"?(this.enabled=!0,this.customLog=e):(this.enabled=!!e,this.customLog=null)}log(e,...t){if(!this.enabled)return;const n=`[InsForge Debug] ${e}`;this.customLog?this.customLog(n,...t):console.log(n,...t)}warn(e,...t){if(!this.enabled)return;const n=`[InsForge Debug] ${e}`;this.customLog?this.customLog(n,...t):console.warn(n,...t)}error(e,...t){if(!this.enabled)return;const n=`[InsForge Debug] ${e}`;this.customLog?this.customLog(n,...t):console.error(n,...t)}logRequest(e,t,n,a){if(!this.enabled)return;const s=[`→ ${e} ${t}`];n&&Object.keys(n).length>0&&s.push(` Headers: ${JSON.stringify(WR(n))}`);const o=Lv(ko(a));if(o){const u=o.length>1e3?o.slice(0,1e3)+"... [truncated]":o;s.push(` Body: ${u}`)}this.log(s.join(`
|
|
39
|
+
`))}logResponse(e,t,n,a,s){if(!this.enabled)return;const o=[`← ${e} ${t} ${n} (${a}ms)`],u=Lv(ko(s));if(u){const c=u.length>1e3?u.slice(0,1e3)+"... [truncated]":u;o.push(` Body: ${c}`)}n>=400?this.error(o.join(`
|
|
40
|
+
`)):this.log(o.join(`
|
|
41
|
+
`))}},fp="insforge_csrf_token";function O_(){if(typeof document>"u")return null;const e=document.cookie.split(";").find(t=>t.trim().startsWith(`${fp}=`));return e&&e.split("=")[1]||null}function I_(e){if(typeof document>"u")return;const t=10080*60,n=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=`${fp}=${encodeURIComponent(e)}; path=/; max-age=${t}; SameSite=Lax${n}`}function j_(){if(typeof document>"u")return;const e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=`${fp}=; path=/; max-age=0; SameSite=Lax${e}`}var U_=class{constructor(){this.accessToken=null,this.user=null,this.onTokenChange=null}saveSession(e){const t=e.accessToken!==this.accessToken;this.accessToken=e.accessToken,this.user=e.user,t&&this.onTokenChange&&this.onTokenChange()}getSession(){return!this.accessToken||!this.user?null:{accessToken:this.accessToken,user:this.user}}getAccessToken(){return this.accessToken}setAccessToken(e){const t=e!==this.accessToken;this.accessToken=e,t&&this.onTokenChange&&this.onTokenChange()}getUser(){return this.user}setUser(e){this.user=e}clearSession(){const e=this.accessToken!==null;this.accessToken=null,this.user=null,e&&this.onTokenChange&&this.onTokenChange()}},KR=new Set([500,502,503,504]),qR=new Set(["GET","HEAD","PUT","DELETE","OPTIONS"]),GR=class{constructor(e,t,n){if(this.userToken=null,this.autoRefreshToken=!0,this.isRefreshing=!1,this.refreshPromise=null,this.refreshToken=null,this.baseUrl=e.baseUrl||"http://localhost:7130",this.autoRefreshToken=e.autoRefreshToken??!0,this.fetch=e.fetch||(globalThis.fetch?globalThis.fetch.bind(globalThis):void 0),this.anonKey=e.anonKey,this.defaultHeaders={...e.headers},this.tokenManager=t??new U_,this.logger=n||new N_(!1),this.timeout=e.timeout??3e4,this.retryCount=e.retryCount??3,this.retryDelay=e.retryDelay??500,!this.fetch)throw new Error("Fetch is not available. Please provide a fetch implementation in the config.")}buildUrl(e,t){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([a,s])=>{if(a==="select"){let o=s.replace(/\s+/g," ").trim();o=o.replace(/\s*\(\s*/g,"(").replace(/\s*\)\s*/g,")").replace(/\(\s+/g,"(").replace(/\s+\)/g,")").replace(/,\s+(?=[^()]*\))/g,","),n.searchParams.append(a,o)}else n.searchParams.append(a,s)}),n.toString()}isRetryableStatus(e){return KR.has(e)}computeRetryDelay(e){const n=this.retryDelay*Math.pow(2,e-1)*(.85+Math.random()*.3);return Math.round(n)}async handleRequest(e,t,n={}){const{params:a,headers:s={},body:o,signal:u,...c}=n,h=this.buildUrl(t,a),f=Date.now(),y=qR.has(e.toUpperCase())||n.idempotent===!0?this.retryCount:0,b={...this.defaultHeaders},w=this.userToken||this.anonKey;w&&(b.Authorization=`Bearer ${w}`);let x;o!==void 0&&(typeof FormData<"u"&&o instanceof FormData?x=o:(e!=="GET"&&(b["Content-Type"]="application/json;charset=UTF-8"),x=JSON.stringify(o))),s instanceof Headers?s.forEach((P,L)=>{b[L]=P}):Array.isArray(s)?s.forEach(([P,L])=>{b[P]=L}):Object.assign(b,s),this.logger.logRequest(e,h,b,x);let T;for(let P=0;P<=y;P++){if(P>0){const M=this.computeRetryDelay(P);if(this.logger.warn(`Retry ${P}/${y} for ${e} ${h} in ${M}ms`),u?.aborted)throw u.reason;await new Promise((I,K)=>{const G=()=>{clearTimeout(W),K(u.reason)},W=setTimeout(()=>{u&&u.removeEventListener("abort",G),I()},M);u&&u.addEventListener("abort",G,{once:!0})})}let L,D;if((this.timeout>0||u)&&(L=new AbortController,this.timeout>0&&(D=setTimeout(()=>L.abort(),this.timeout)),u))if(u.aborted)L.abort(u.reason);else{const M=()=>L.abort(u.reason);u.addEventListener("abort",M,{once:!0}),L.signal.addEventListener("abort",()=>{u.removeEventListener("abort",M)},{once:!0})}try{const M=await this.fetch(h,{method:e,headers:b,body:x,...c,...L?{signal:L.signal}:{}});if(this.isRetryableStatus(M.status)&&P<y){D!==void 0&&clearTimeout(D),await M.body?.cancel(),T=new We(`Server error: ${M.status} ${M.statusText}`,M.status,"SERVER_ERROR");continue}if(M.status===204){D!==void 0&&clearTimeout(D);return}let I;const K=M.headers.get("content-type");try{K?.includes("json")?I=await M.json():I=await M.text()}catch(G){throw D!==void 0&&clearTimeout(D),new We(`Failed to parse response body: ${G?.message||"Unknown error"}`,M.status,M.ok?"PARSE_ERROR":"REQUEST_FAILED")}if(D!==void 0&&clearTimeout(D),!M.ok){if(this.logger.logResponse(e,h,M.status,Date.now()-f,I),I&&typeof I=="object"&&"error"in I){!I.statusCode&&!I.status&&(I.statusCode=M.status);const G=We.fromApiError(I);throw Object.keys(I).forEach(W=>{W!=="error"&&W!=="message"&&W!=="statusCode"&&(G[W]=I[W])}),G}throw new We(`Request failed: ${M.statusText}`,M.status,"REQUEST_FAILED")}return this.logger.logResponse(e,h,M.status,Date.now()-f,I),I}catch(M){if(D!==void 0&&clearTimeout(D),M?.name==="AbortError")throw L&&L.signal.aborted&&this.timeout>0&&!u?.aborted?new We(`Request timed out after ${this.timeout}ms`,408,"REQUEST_TIMEOUT"):M;if(M instanceof We)throw M;if(P<y){T=M;continue}throw new We(`Network request failed: ${M?.message||"Unknown error"}`,0,"NETWORK_ERROR")}}throw T||new We("Request failed after all retry attempts",0,"NETWORK_ERROR")}async request(e,t,n={}){try{return await this.handleRequest(e,t,{...n})}catch(a){if(a instanceof We&&a.statusCode===401&&a.error==="INVALID_TOKEN"&&this.autoRefreshToken)try{const s=await this.handleTokenRefresh();return this.setAuthToken(s.accessToken),this.tokenManager.saveSession(s),s.csrfToken&&I_(s.csrfToken),s.refreshToken&&this.setRefreshToken(s.refreshToken),await this.handleRequest(e,t,{...n})}catch(s){throw this.tokenManager.clearSession(),this.userToken=null,this.refreshToken=null,j_(),s}throw a}}get(e,t){return this.request("GET",e,t)}post(e,t,n){return this.request("POST",e,{...n,body:t})}put(e,t,n){return this.request("PUT",e,{...n,body:t})}patch(e,t,n){return this.request("PATCH",e,{...n,body:t})}delete(e,t){return this.request("DELETE",e,t)}setAuthToken(e){this.userToken=e}setRefreshToken(e){this.refreshToken=e}getHeaders(){const e={...this.defaultHeaders},t=this.userToken||this.anonKey;return t&&(e.Authorization=`Bearer ${t}`),e}async handleTokenRefresh(){return this.isRefreshing?this.refreshPromise:(this.isRefreshing=!0,this.refreshPromise=(async()=>{try{const e=O_(),t=this.refreshToken?{refreshToken:this.refreshToken}:void 0;return await this.handleRequest("POST","/api/auth/sessions/current",{body:t,headers:e?{"X-CSRF-Token":e}:{},credentials:"include"})}finally{this.isRefreshing=!1,this.refreshPromise=null}})(),this.refreshPromise)}},cf="insforge_pkce_verifier";function B_(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function YR(){const e=new Uint8Array(32);return crypto.getRandomValues(e),B_(e)}async function ZR(e){const n=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",n);return B_(new Uint8Array(a))}function QR(e){typeof sessionStorage<"u"&&sessionStorage.setItem(cf,e)}function XR(){if(typeof sessionStorage>"u")return null;const e=sessionStorage.getItem(cf);return e&&sessionStorage.removeItem(cf),e}function kn(e,t){return e instanceof We?{data:null,error:e}:{data:null,error:new We(e instanceof Error?e.message:t,500,"UNEXPECTED_ERROR")}}function Dv(...e){if(typeof window>"u")return;const t=new URL(window.location.href);e.forEach(n=>t.searchParams.delete(n)),window.history.replaceState({},document.title,t.toString())}var JR=class{constructor(e,t,n={}){this.http=e,this.tokenManager=t,this.options=n,this.authCallbackHandled=this.detectAuthCallback()}isServerMode(){return!!this.options.isServerMode}saveSessionFromResponse(e){if(!e.accessToken||!e.user)return!1;const t={accessToken:e.accessToken,user:e.user};return!this.isServerMode()&&e.csrfToken&&I_(e.csrfToken),this.isServerMode()||this.tokenManager.saveSession(t),this.http.setAuthToken(e.accessToken),this.http.setRefreshToken(e.refreshToken??null),!0}async detectAuthCallback(){if(!(this.isServerMode()||typeof window>"u"))try{const e=new URLSearchParams(window.location.search),t=e.get("error");if(t){Dv("error"),console.debug("OAuth callback error:",t);return}const n=e.get("insforge_code");if(n){Dv("insforge_code");const{error:a}=await this.exchangeOAuthCode(n);a&&console.debug("OAuth code exchange failed:",a.message);return}}catch(e){console.debug("OAuth callback detection skipped:",e)}}async signUp(e){try{const t=await this.http.post(this.isServerMode()?"/api/auth/users?client_type=mobile":"/api/auth/users",e,{credentials:"include"});return t.accessToken&&t.user&&this.saveSessionFromResponse(t),t.refreshToken&&this.http.setRefreshToken(t.refreshToken),{data:t,error:null}}catch(t){return kn(t,"An unexpected error occurred during sign up")}}async signInWithPassword(e){try{const t=await this.http.post(this.isServerMode()?"/api/auth/sessions?client_type=mobile":"/api/auth/sessions",e,{credentials:"include"});return this.saveSessionFromResponse(t),t.refreshToken&&this.http.setRefreshToken(t.refreshToken),{data:t,error:null}}catch(t){return kn(t,"An unexpected error occurred during sign in")}}async signOut(){try{try{await this.http.post(this.isServerMode()?"/api/auth/logout?client_type=mobile":"/api/auth/logout",void 0,{credentials:"include"})}catch{}return this.tokenManager.clearSession(),this.http.setAuthToken(null),this.http.setRefreshToken(null),this.isServerMode()||j_(),{error:null}}catch{return{error:new We("Failed to sign out",500,"SIGNOUT_ERROR")}}}async signInWithOAuth(e){try{const{provider:t,redirectTo:n,skipBrowserRedirect:a}=e,s=encodeURIComponent(t.toLowerCase()),o=YR(),u=await ZR(o);QR(o);const c={code_challenge:u};n&&(c.redirect_uri=n);const f=fc.options.includes(s)?`/api/auth/oauth/${s}`:`/api/auth/oauth/custom/${s}`,m=await this.http.get(f,{params:c});return!this.isServerMode()&&typeof window<"u"&&!a?(window.location.href=m.authUrl,{data:{},error:null}):{data:{url:m.authUrl,provider:s,codeVerifier:o},error:null}}catch(t){return t instanceof We?{data:{},error:t}:{data:{},error:new We("An unexpected error occurred during OAuth initialization",500,"UNEXPECTED_ERROR")}}}async exchangeOAuthCode(e,t){try{const n=t??XR();if(!n)return{data:null,error:new We("PKCE code verifier not found. Ensure signInWithOAuth was called in the same browser session.",400,"PKCE_VERIFIER_MISSING")};const a={code:e,code_verifier:n},s=await this.http.post(this.isServerMode()?"/api/auth/oauth/exchange?client_type=mobile":"/api/auth/oauth/exchange",a,{credentials:"include"});return this.saveSessionFromResponse(s),{data:s,error:null}}catch(n){return kn(n,"An unexpected error occurred during OAuth code exchange")}}async signInWithIdToken(e){try{const{provider:t,token:n}=e,a=await this.http.post("/api/auth/id-token?client_type=mobile",{provider:t,token:n},{credentials:"include"});return this.saveSessionFromResponse(a),a.refreshToken&&this.http.setRefreshToken(a.refreshToken),{data:a,error:null}}catch(t){return kn(t,"An unexpected error occurred during ID token sign in")}}async refreshSession(e){try{if(this.isServerMode()&&!e?.refreshToken)return{data:null,error:new We("refreshToken is required when refreshing session in server mode",400,"REFRESH_TOKEN_REQUIRED")};const t=this.isServerMode()?null:O_(),n=await this.http.post(this.isServerMode()?"/api/auth/refresh?client_type=mobile":"/api/auth/refresh",this.isServerMode()?{refresh_token:e?.refreshToken}:void 0,{headers:t?{"X-CSRF-Token":t}:{},credentials:"include"});return n.accessToken&&this.saveSessionFromResponse(n),{data:n,error:null}}catch(t){return kn(t,"An unexpected error occurred during session refresh")}}async getCurrentUser(){await this.authCallbackHandled;try{if(this.isServerMode()){const t=this.tokenManager.getAccessToken();return t?(this.http.setAuthToken(t),{data:{user:(await this.http.get("/api/auth/sessions/current")).user??null},error:null}):{data:{user:null},error:null}}const e=this.tokenManager.getSession();if(e)return this.http.setAuthToken(e.accessToken),{data:{user:e.user},error:null};if(typeof window<"u"){const{data:t,error:n}=await this.refreshSession();if(n)return{data:{user:null},error:n};if(t?.accessToken)return{data:{user:t.user??null},error:null}}return{data:{user:null},error:null}}catch(e){return e instanceof We?{data:{user:null},error:e}:{data:{user:null},error:new We("An unexpected error occurred while getting user",500,"UNEXPECTED_ERROR")}}}async getProfile(e){try{return{data:await this.http.get(`/api/auth/profiles/${e}`),error:null}}catch(t){return kn(t,"An unexpected error occurred while fetching user profile")}}async setProfile(e){try{const t=await this.http.patch("/api/auth/profiles/current",{profile:e}),n=this.tokenManager.getUser();return!this.isServerMode()&&n&&t.profile!==void 0&&this.tokenManager.setUser({...n,profile:t.profile}),{data:t,error:null}}catch(t){return kn(t,"An unexpected error occurred while updating user profile")}}async resendVerificationEmail(e){try{return{data:await this.http.post("/api/auth/email/send-verification",e),error:null}}catch(t){return kn(t,"An unexpected error occurred while sending verification email")}}async verifyEmail(e){try{const t=await this.http.post(this.isServerMode()?"/api/auth/email/verify?client_type=mobile":"/api/auth/email/verify",e,{credentials:"include"});return this.saveSessionFromResponse(t),t.refreshToken&&this.http.setRefreshToken(t.refreshToken),{data:t,error:null}}catch(t){return kn(t,"An unexpected error occurred while verifying email")}}async sendResetPasswordEmail(e){try{return{data:await this.http.post("/api/auth/email/send-reset-password",e),error:null}}catch(t){return kn(t,"An unexpected error occurred while sending password reset email")}}async exchangeResetPasswordToken(e){try{return{data:await this.http.post("/api/auth/email/exchange-reset-password-token",e),error:null}}catch(t){return kn(t,"An unexpected error occurred while verifying reset code")}}async resetPassword(e){try{return{data:await this.http.post("/api/auth/email/reset-password",e),error:null}}catch(t){return kn(t,"An unexpected error occurred while resetting password")}}async getPublicAuthConfig(){try{return{data:await this.http.get("/api/auth/public-config"),error:null}}catch(e){return kn(e,"An unexpected error occurred while fetching auth configuration")}}};function eA(e,t){return async(n,a)=>{const s=typeof n=="string"?n:n.toString(),o=new URL(s),u=o.pathname.slice(1),c=u.match(/^rpc\/(.+)$/),h=c?`/api/database/rpc/${c[1]}`:`/api/database/records/${u}`,f=`${e.baseUrl}${h}${o.search}`,m=t.getAccessToken(),y=e.getHeaders(),b=m||y.Authorization?.replace("Bearer ",""),w=new Headers(a?.headers);return b&&!w.has("Authorization")&&w.set("Authorization",`Bearer ${b}`),await fetch(f,{...a,headers:w})}}var tA=class{constructor(e,t){this.postgrest=new YE("http://dummy",{fetch:eA(e,t),headers:{}})}from(e){return this.postgrest.from(e)}rpc(e,t,n){return this.postgrest.rpc(e,t,n)}},nA=class{constructor(e,t){this.bucketName=e,this.http=t}async upload(e,t){try{const n=await this.http.post(`/api/storage/buckets/${this.bucketName}/upload-strategy`,{filename:e,contentType:t.type||"application/octet-stream",size:t.size});if(n.method==="presigned")return await this.uploadWithPresignedUrl(n,t);if(n.method==="direct"){const a=new FormData;return a.append("file",t),{data:await this.http.request("PUT",`/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}`,{body:a,headers:{}}),error:null}}throw new We(`Unsupported upload method: ${n.method}`,500,"STORAGE_ERROR")}catch(n){return{data:null,error:n instanceof We?n:new We("Upload failed",500,"STORAGE_ERROR")}}}async uploadAuto(e){try{const t=e instanceof File?e.name:"file",n=await this.http.post(`/api/storage/buckets/${this.bucketName}/upload-strategy`,{filename:t,contentType:e.type||"application/octet-stream",size:e.size});if(n.method==="presigned")return await this.uploadWithPresignedUrl(n,e);if(n.method==="direct"){const a=new FormData;return a.append("file",e),{data:await this.http.request("POST",`/api/storage/buckets/${this.bucketName}/objects`,{body:a,headers:{}}),error:null}}throw new We(`Unsupported upload method: ${n.method}`,500,"STORAGE_ERROR")}catch(t){return{data:null,error:t instanceof We?t:new We("Upload failed",500,"STORAGE_ERROR")}}}async uploadWithPresignedUrl(e,t){try{const n=new FormData;e.fields&&Object.entries(e.fields).forEach(([s,o])=>{n.append(s,o)}),n.append("file",t);const a=await fetch(e.uploadUrl,{method:"POST",body:n});if(!a.ok)throw new We(`Upload to storage failed: ${a.statusText}`,a.status,"STORAGE_ERROR");return e.confirmRequired&&e.confirmUrl?{data:await this.http.post(e.confirmUrl,{size:t.size,contentType:t.type||"application/octet-stream"}),error:null}:{data:{key:e.key,bucket:this.bucketName,size:t.size,mimeType:t.type||"application/octet-stream",uploadedAt:new Date().toISOString(),url:this.getPublicUrl(e.key)},error:null}}catch(n){throw n instanceof We?n:new We("Presigned upload failed",500,"STORAGE_ERROR")}}async download(e){try{const t=await this.http.post(`/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}/download-strategy`,{expiresIn:3600}),n=t.url,a={};t.method==="direct"&&Object.assign(a,this.http.getHeaders());const s=await fetch(n,{method:"GET",headers:a});if(!s.ok)try{const u=await s.json();throw We.fromApiError(u)}catch{throw new We(`Download failed: ${s.statusText}`,s.status,"STORAGE_ERROR")}return{data:await s.blob(),error:null}}catch(t){return{data:null,error:t instanceof We?t:new We("Download failed",500,"STORAGE_ERROR")}}}getPublicUrl(e){return`${this.http.baseUrl}/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}`}async list(e){try{const t={};return e?.prefix&&(t.prefix=e.prefix),e?.search&&(t.search=e.search),e?.limit&&(t.limit=e.limit.toString()),e?.offset&&(t.offset=e.offset.toString()),{data:await this.http.get(`/api/storage/buckets/${this.bucketName}/objects`,{params:t}),error:null}}catch(t){return{data:null,error:t instanceof We?t:new We("List failed",500,"STORAGE_ERROR")}}}async remove(e){try{return{data:await this.http.delete(`/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}`),error:null}}catch(t){return{data:null,error:t instanceof We?t:new We("Delete failed",500,"STORAGE_ERROR")}}}},rA=class{constructor(e){this.http=e}from(e){return new nA(e,this.http)}},aA=class{constructor(e){this.http=e,this.chat=new iA(e),this.images=new lA(e),this.embeddings=new oA(e)}},iA=class{constructor(e){this.completions=new sA(e)}},sA=class{constructor(e){this.http=e}async create(e){const t={model:e.model,messages:e.messages,temperature:e.temperature,maxTokens:e.maxTokens,topP:e.topP,stream:e.stream,webSearch:e.webSearch,fileParser:e.fileParser,thinking:e.thinking,tools:e.tools,toolChoice:e.toolChoice,parallelToolCalls:e.parallelToolCalls};if(e.stream){const s=this.http.getHeaders();s["Content-Type"]="application/json";const o=await this.http.fetch(`${this.http.baseUrl}/api/ai/chat/completion`,{method:"POST",headers:s,body:JSON.stringify(t)});if(!o.ok){const u=await o.json();throw new Error(u.error||"Stream request failed")}return this.parseSSEStream(o,e.model)}const n=await this.http.post("/api/ai/chat/completion",t),a=n.text||"";return{id:`chatcmpl-${Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:n.metadata?.model,choices:[{index:0,message:{role:"assistant",content:a,...n.tool_calls?.length&&{tool_calls:n.tool_calls},...n.annotations?.length&&{annotations:n.annotations}},finish_reason:n.tool_calls?.length?"tool_calls":"stop"}],usage:n.metadata?.usage||{prompt_tokens:0,completion_tokens:0,total_tokens:0}}}async*parseSSEStream(e,t){const n=e.body.getReader(),a=new TextDecoder;let s="";try{for(;;){const{done:o,value:u}=await n.read();if(o)break;s+=a.decode(u,{stream:!0});const c=s.split(`
|
|
42
|
+
`);s=c.pop()||"";for(const h of c)if(h.startsWith("data: ")){const f=h.slice(6).trim();if(f)try{const m=JSON.parse(f);if((m.chunk||m.content)&&(yield{id:`chatcmpl-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:t,choices:[{index:0,delta:{content:m.chunk||m.content},finish_reason:null}]}),m.tool_calls?.length&&(yield{id:`chatcmpl-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:t,choices:[{index:0,delta:{tool_calls:m.tool_calls},finish_reason:"tool_calls"}]}),m.done){n.releaseLock();return}}catch{console.warn("Failed to parse SSE data:",f)}}}}finally{n.releaseLock()}}},oA=class{constructor(e){this.http=e}async create(e){const t=await this.http.post("/api/ai/embeddings",e);return{object:t.object,data:t.data,model:t.metadata?.model,usage:t.metadata?.usage?{prompt_tokens:t.metadata.usage.promptTokens||0,total_tokens:t.metadata.usage.totalTokens||0}:{prompt_tokens:0,total_tokens:0}}}},lA=class{constructor(e){this.http=e}async generate(e){const t=await this.http.post("/api/ai/image/generation",e);let n=[];return t.images&&t.images.length>0?n=t.images.map(a=>({b64_json:a.imageUrl.replace(/^data:image\/\w+;base64,/,""),content:t.text})):t.text&&(n=[{content:t.text}]),{created:Math.floor(Date.now()/1e3),data:n,...t.metadata?.usage&&{usage:{total_tokens:t.metadata.usage.totalTokens||0,input_tokens:t.metadata.usage.promptTokens||0,output_tokens:t.metadata.usage.completionTokens||0}}}}},uA=class F_{constructor(t,n){this.http=t,this.functionsUrl=n||F_.deriveSubhostingUrl(t.baseUrl)}static deriveSubhostingUrl(t){try{const{hostname:n}=new URL(t);return n.endsWith(".insforge.app")?`https://${n.split(".")[0]}.functions.insforge.app`:void 0}catch{return}}async invoke(t,n={}){const{method:a="POST",body:s,headers:o={}}=n;if(this.functionsUrl)try{return{data:await this.http.request(a,`${this.functionsUrl}/${t}`,{body:s,headers:o}),error:null}}catch(u){if(u instanceof Error&&u.name==="AbortError")throw u;if(!(u instanceof We&&u.statusCode===404))return{data:null,error:u instanceof We?u:new We(u instanceof Error?u.message:"Function invocation failed",500,"FUNCTION_ERROR")}}try{const u=`/functions/${t}`;return{data:await this.http.request(a,u,{body:s,headers:o}),error:null}}catch(u){if(u instanceof Error&&u.name==="AbortError")throw u;return{data:null,error:u instanceof We?u:new We(u instanceof Error?u.message:"Function invocation failed",500,"FUNCTION_ERROR")}}}},Mv=1e4,cA=class{constructor(e,t,n){this.socket=null,this.connectPromise=null,this.subscribedChannels=new Set,this.eventListeners=new Map,this.baseUrl=e,this.tokenManager=t,this.anonKey=n,this.tokenManager.onTokenChange=()=>this.onTokenChange()}notifyListeners(e,t){const n=this.eventListeners.get(e);if(n)for(const a of n)try{a(t)}catch(s){console.error(`Error in ${e} callback:`,s)}}connect(){return this.socket?.connected?Promise.resolve():this.connectPromise?this.connectPromise:(this.connectPromise=new Promise((e,t)=>{const n=this.tokenManager.getAccessToken()??this.anonKey;this.socket=Su(this.baseUrl,{transports:["websocket"],auth:n?{token:n}:void 0});let a=!0,s=null;const o=()=>{s&&(clearTimeout(s),s=null)};s=setTimeout(()=>{a&&(a=!1,this.connectPromise=null,this.socket?.disconnect(),this.socket=null,t(new Error(`Connection timeout after ${Mv}ms`)))},Mv),this.socket.on("connect",()=>{o();for(const u of this.subscribedChannels)this.socket.emit("realtime:subscribe",{channel:u});this.notifyListeners("connect"),a&&(a=!1,this.connectPromise=null,e())}),this.socket.on("connect_error",u=>{o(),this.notifyListeners("connect_error",u),a&&(a=!1,this.connectPromise=null,t(u))}),this.socket.on("disconnect",u=>{this.notifyListeners("disconnect",u)}),this.socket.on("realtime:error",u=>{this.notifyListeners("error",u)}),this.socket.onAny((u,c)=>{u!=="realtime:error"&&this.notifyListeners(u,c)})}),this.connectPromise)}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null),this.subscribedChannels.clear()}onTokenChange(){const e=this.tokenManager.getAccessToken()??this.anonKey;this.socket&&(this.socket.auth=e?{token:e}:{}),this.socket&&(this.socket.connected||this.connectPromise)&&(this.socket.disconnect(),this.socket.connect())}get isConnected(){return this.socket?.connected??!1}get connectionState(){return this.socket?this.socket.connected?"connected":"connecting":"disconnected"}get socketId(){return this.socket?.id}async subscribe(e){if(this.subscribedChannels.has(e))return{ok:!0,channel:e};if(!this.socket?.connected)try{await this.connect()}catch(t){const n=t instanceof Error?t.message:"Connection failed";return{ok:!1,channel:e,error:{code:"CONNECTION_FAILED",message:n}}}return new Promise(t=>{this.socket.emit("realtime:subscribe",{channel:e},n=>{n.ok&&this.subscribedChannels.add(e),t(n)})})}unsubscribe(e){this.subscribedChannels.delete(e),this.socket?.connected&&this.socket.emit("realtime:unsubscribe",{channel:e})}async publish(e,t,n){if(!this.socket?.connected)throw new Error("Not connected to realtime server. Call connect() first.");this.socket.emit("realtime:publish",{channel:e,event:t,payload:n})}on(e,t){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e).add(t)}off(e,t){const n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}once(e,t){const n=a=>{this.off(e,n),t(a)};this.on(e,n)}getSubscribedChannels(){return Array.from(this.subscribedChannels)}},dA=class{constructor(e){this.http=e}async send(e){try{return{data:await this.http.post("/api/email/send-raw",e),error:null}}catch(t){if(t instanceof Error&&t.name==="AbortError")throw t;return{data:null,error:t instanceof We?t:new We(t instanceof Error?t.message:"Email send failed",500,"EMAIL_ERROR")}}}},hA=class{constructor(e={}){const t=new N_(e.debug);this.tokenManager=new U_,this.http=new GR(e,this.tokenManager,t),e.edgeFunctionToken&&(this.http.setAuthToken(e.edgeFunctionToken),this.tokenManager.setAccessToken(e.edgeFunctionToken)),this.auth=new JR(this.http,this.tokenManager,{isServerMode:e.isServerMode??!1}),this.database=new tA(this.http,this.tokenManager),this.storage=new rA(this.http),this.ai=new aA(this.http),this.functions=new uA(this.http,e.functionsUrl),this.realtime=new cA(this.http.baseUrl,this.tokenManager,e.anonKey),this.emails=new dA(this.http)}getHttpClient(){return this.http}};function fA(e){return new hA(e)}const pp={VITE_INSFORGE_ANON_KEY:"ik_9f35735991b684f7cf57fa00bb4d0487",VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function fi(){const e=typeof import.meta<"u"?pp:void 0;return(e?.VITE_INSFORGE_BASE_URL||e?.VITE_TOKENTRACKER_BACKEND_BASE_URL||"").trim()}function V_(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return window.location.origin;const t=typeof import.meta<"u"?pp:void 0;return(t?.VITE_INSFORGE_BASE_URL||t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||"").trim()}function gc(){const e=typeof import.meta<"u"?pp:void 0;return(e?.VITE_INSFORGE_ANON_KEY||e?.VITE_TOKENTRACKER_BACKEND_ANON_KEY||"").trim()}function df(){return!!V_()}let kh=null;function pA(){return df()?(kh||(kh=fA({baseUrl:V_(),anonKey:gc()||void 0,autoRefreshToken:!0})),kh):null}const z_="tokentracker_cloud_sync_enabled",mA="tokentracker_cloud_device_session_v1",mp="tokentracker_cloud_last_sync_ts";let gp=null;function yp(){try{localStorage.removeItem(mA)}catch{}}function gA(){if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"}function yA(){try{const e=localStorage.getItem(z_);return e===null||e===""?!1:e==="1"||e==="true"}catch{return!1}}function Ej(e){try{localStorage.setItem(z_,e?"1":"0")}catch{}}function $_(){return yp(),gp}function vA(e){gp=e,yp()}function H_(){gp=null;try{localStorage.removeItem(mp)}catch{}yp()}function bA(){try{const e=Number(localStorage.getItem(mp));return Number.isFinite(e)?e:0}catch{return 0}}function W_(e){try{localStorage.setItem(mp,String(e))}catch{}}function Ea(e){if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null}function _A(e){const t=Ea(e);if(!t)return null;const n=t.split(".");if(n.length<2)return null;const a=n[1];try{const s=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),o=typeof atob=="function"?atob(s):Buffer.from(s,"base64").toString("utf8"),c=JSON.parse(o)?.exp;return typeof c!="number"||!Number.isFinite(c)||c<=0?null:Math.floor(c*1e3)}catch{return null}}function wA(e){const t=Ea(e);if(!t)return!1;const n=t.split(".");if(n.length!==3)return!1;try{for(let a=0;a<2;a++){const s=n[a];if(!/^[A-Za-z0-9_-]+$/.test(s))return!1;const o=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),u=typeof atob=="function"?atob(o):Buffer.from(o,"base64").toString("utf8");a===1&&JSON.parse(u)}return!0}catch{return!1}}function kA(e,t=3e4){const n=_A(e);return n?n<=Date.now()+Math.max(0,Number(t)||0):!1}async function xA(e){if(!e)return null;if(typeof e=="string")return Ea(e);if(typeof e=="function")try{const t=await e();return Ea(t)}catch{return null}if(typeof e=="object"){if(typeof e.getAccessToken=="function"){try{const t=await e.getAccessToken(),n=Ea(t);if(n)return n}catch{}return Ea(e.accessToken)}return null}return Ea(e)}async function Rj(e,t={}){const n=Math.max(1,Math.min(12,Math.floor(Number(t.maxAttempts)||8))),a=Math.max(20,Math.floor(Number(t.baseDelayMs)||50));for(let s=0;s<n;s++){const o=await xA(e);if(o)return o;s<n-1&&await new Promise(u=>setTimeout(u,a*(s+1)))}return null}function Aj(e){return typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1")||typeof e=="function"||e&&typeof e=="object"&&typeof e.getAccessToken=="function"?!0:!!Ea(e)}function Lj(){if(typeof Intl>"u"||!Intl.DateTimeFormat)return null;try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}}function Dj(e=new Date){const t=e instanceof Date?e:new Date(e);if(!Number.isFinite(t.getTime()))return 0;const n=t.getTimezoneOffset();return Number.isFinite(n)?-n:0}function K_(e){if(!Number.isFinite(e)||e===0)return"UTC";const t=e>=0?"+":"-",n=Math.abs(e),a=String(Math.floor(n/60)).padStart(2,"0"),s=String(n%60).padStart(2,"0");return`UTC${t}${a}:${s}`}function Mj({timeZone:e,offsetMinutes:t}={}){const n=K_(t);return e&&e!=="UTC"?`${e} (${n})`:n}function Nj({timeZone:e,offsetMinutes:t}={}){return Number.isFinite(t)?K_(t):e||"UTC"}function Oj({timeZone:e,offsetMinutes:t,date:n=new Date}={}){const a=n instanceof Date?n:new Date(n);if(!Number.isFinite(a.getTime()))return"";if(e&&typeof Intl<"u"&&Intl.DateTimeFormat)try{const u=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(a).reduce((m,y)=>(y.type&&y.value&&(m[y.type]=y.value),m),{}),c=u.year,h=u.month,f=u.day;if(c&&h&&f)return`${c}-${h}-${f}`}catch{}if(typeof t=="number"&&Number.isFinite(t)){const s=new Date(a.getTime()+t*6e4);return PA(s)}return TA(a)}function SA({timeZone:e,offsetMinutes:t,date:n=new Date}={}){const a=n instanceof Date?n:new Date(n);if(!Number.isFinite(a.getTime()))return null;if(e&&typeof Intl<"u"&&Intl.DateTimeFormat)try{const u=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(a).reduce((m,y)=>(y.type&&y.value&&(m[y.type]=y.value),m),{}),c=Number(u.year),h=Number(u.month),f=Number(u.day);if(Number.isFinite(c)&&Number.isFinite(h)&&Number.isFinite(f))return{year:c,month:h,day:f}}catch{}if(typeof t=="number"&&Number.isFinite(t)){const s=new Date(a.getTime()+t*6e4);return{year:s.getUTCFullYear(),month:s.getUTCMonth()+1,day:s.getUTCDate()}}return{year:a.getFullYear(),month:a.getMonth()+1,day:a.getDate()}}function Ij({timeZone:e,offsetMinutes:t}={}){return e?`tz:${e}`:typeof t=="number"&&Number.isFinite(t)?`offset:${Math.trunc(t)}`:"utc"}function PA(e){const t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0"),a=String(e.getUTCDate()).padStart(2,"0");return`${t}-${n}-${a}`}function TA(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${a}`}function yt(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toISOString().slice(0,10)}function Sr(e){const t=e instanceof Date?e:new Date(e);if(!Number.isFinite(t.getTime()))return"";const n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${a}-${s}`}function CA(e){if(!e)return null;const t=String(e).trim(),n=t.split("-");if(n.length!==3)return null;const a=Number(n[0]),s=Number(n[1])-1,o=Number(n[2]);if(!Number.isFinite(a)||!Number.isFinite(s)||!Number.isFinite(o))return null;const u=new Date(Date.UTC(a,s,o));return Number.isFinite(u.getTime())&&yt(u)===t?u:null}function EA(e){if(!e)return"";const t=e.year,n=String(e.month).padStart(2,"0"),a=String(e.day).padStart(2,"0");return!t||!n||!a?"":`${t}-${n}-${a}`}function RA(e,{timeZone:t,offsetMinutes:n,now:a}={}){const s=a instanceof Date&&Number.isFinite(a.getTime())?a:new Date,o=SA({timeZone:t,offsetMinutes:n,date:s});if(!o){const h=Sr(new Date);return{from:h,to:h}}const u=EA(o),c=CA(u);if(!c)return{from:u,to:u};if(e==="day")return{from:u,to:u};if(e==="week"){const h=new Date(c),m=(h.getUTCDay()+6)%7;h.setUTCDate(h.getUTCDate()-m);const y=new Date(h);return y.setUTCDate(y.getUTCDate()+6),{from:yt(h),to:yt(y)}}if(e==="month"){const h=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),1)),f=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth()+1,0));return{from:yt(h),to:yt(f)}}if(e==="total"){const h=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth()-23,1));return{from:yt(h),to:u}}return RA("week")}function jj(e){if(e==null)return"-";try{if(typeof e=="bigint")return new Intl.NumberFormat().format(e);if(typeof e=="number")return new Intl.NumberFormat().format(e);const t=String(e).trim();return/^[0-9]+$/.test(t)?new Intl.NumberFormat().format(BigInt(t)):t}catch{return String(e)}}function Uj(e,{thousandSuffix:t="K",millionSuffix:n="M",billionSuffix:a="B",decimals:s=1}={}){const o=Number(String(e));if(!Number.isFinite(o))return"-";const u=o<0?"-":"",c=Math.abs(o),h=Math.max(0,Math.min(6,Math.floor(s)));if(c<1e3)return`${u}${String(c)}`;const f=(w,x)=>{const T=w.toFixed(h),P=Number(T).toString();return`${u}${P}${x}`},m=(w,x,T)=>{const P=w.toFixed(h),L=Number(P);return T&&L>=1e3?f(L/1e3,T):`${u}${L.toString()}${x}`};if(c>=1e9)return f(c/1e9,a);if(c>=1e6)return m(c/1e6,n,a);const y=c/1e3,b=Number(y.toFixed(h));return b>=1e3?f(b/1e3,n):f(b,t)}function q_(e){const t=Number(String(e));return Number.isFinite(t)?t:null}function Bj(e,{decimals:t=2}={}){if(e==null)return"-";const n=String(e).trim();if(!n)return"-";const a=n.match(/^(-?\d+)(?:\.(\d+))?$/);if(!a)return n;const s=a[1],o=a[2]||"";let u=s;try{u=new Intl.NumberFormat().format(BigInt(s))}catch{u=s}const c=Math.max(0,Math.min(6,Math.floor(t))),h=c?o.slice(0,c).padEnd(c,"0"):"",f=s.startsWith("-")?"-":"",m=c?`${u.replace("-","")}.${h}`:u.replace("-","");return`${f}$${m}`}function Ku(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;const n=Number(t[1]),a=Number(t[2])-1,s=Number(t[3]),o=new Date(Date.UTC(n,a,s));return Number.isFinite(o.getTime())&&yt(o)===e.trim()?o:null}function ni(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function AA(e,t){const n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())-Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.floor(n/864e5)}function xh(e,t){if(!Array.isArray(e)||e.length===0)return 0;const n=e.length,a=(n-1)*t,s=Math.floor(a),o=a-s,u=e[s]??e[n-1],c=e[Math.min(n-1,s+1)]??e[n-1];return Math.round(u+(c-u)*o)}function LA(e){return e<=0?0:e>=4?4:e}function G_({weeks:e=52,now:t,weekStartsOn:n="sun"}={}){const a=t instanceof Date&&Number.isFinite(t.getTime())?t:new Date,s=Sr(a),o=Ku(s)||new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),u=n==="mon"?1:0,c=o.getUTCDay(),h=ni(o,-((c-u+7)%7)),f=ni(h,-7*(Math.max(1,e)-1));return{from:yt(f),to:s}}function DA({dailyRows:e,weeks:t=52,to:n,weekStartsOn:a="sun"}={}){const s=Ku(n)||new Date(Date.UTC(new Date().getFullYear(),new Date().getMonth(),new Date().getDate())),{from:o}=G_({weeks:t,now:s,weekStartsOn:a}),u=Ku(o)||ni(s,-(t*7-1)),c=(()=>{const I=(u.getUTCDay()-(a==="mon"?1:0)+7)%7;return ni(u,-I)})(),h=new Map;for(const D of Array.isArray(e)?e:[]){const M=typeof D?.day=="string"?D.day:null;if(!M)continue;const I=q_(D?.billable_total_tokens??D?.total_tokens)??0;h.set(M,Math.max(0,I))}const f=AA(c,s)+1,m=Math.ceil(f/7),y=[];for(let D=0;D<f;D++){const M=ni(c,D),I=yt(M),K=h.get(I)??0;K>0&&y.push(K)}y.sort((D,M)=>D-M);const b=xh(y,.5),w=xh(y,.75),x=xh(y,.9);function T(D){return!D||D<=0?0:D<=b?1:D<=w?2:D<=x?3:4}const P=[];for(let D=0;D<m;D++){const M=[];for(let I=0;I<7;I++){const K=D*7+I,G=ni(c,K);if(G.getTime()>s.getTime()){M.push(null);continue}const W=yt(G),S=h.get(W)??0;M.push({day:W,value:S,level:LA(T(S))})}P.push(M)}const L=P.length>t?P.slice(P.length-t):P;return{from:o,to:yt(s),weeks:L,thresholds:{t1:b,t2:w,t3:x}}}function MA({dailyRows:e,to:t}={}){const n=Ku(t)||new Date(Date.UTC(new Date().getFullYear(),new Date().getMonth(),new Date().getDate())),a=new Map;for(const o of Array.isArray(e)?e:[]){const u=typeof o?.day=="string"?o.day:null;if(!u)continue;const c=q_(o?.billable_total_tokens??o?.total_tokens)??0;a.set(u,Math.max(0,c))}let s=0;for(let o=0;o<370;o++){const u=yt(ni(n,-o));if((a.get(u)??0)>0){s+=1;continue}break}return s}const yc={},Y_="tokentracker",NA=["victorgpt/tokentracker","spacedriveapp/spacedrive","acme/alpha","acme/beta","neo/nebula","signal/flux","matrix/terminal","orbit/atlas","lumen/core","delta/horizon"],Nv=["NEO","TRINITY","MORPHEUS","ORACLE","CYPHER","SWITCH","APOC","TANK","SMITH","SERAPH","NIOBE","MOUSE","DOZER","LINK","BLADE"];function Pn(){if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock")||"").toLowerCase();if(t==="0"||t==="false"||t==="off"||t==="no")return!1;if(t==="1"||t==="true"||t==="on"||t==="yes")return!0}if(typeof import.meta<"u"&&yc){const e="".toLowerCase();if(e==="1"||e==="true")return!0}return!1}function OA(){if(typeof import.meta<"u"&&yc){const e="".trim();if(e)return e;const t="".trim();if(t)return t}if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock_now")||"").trim();if(t)return t;const n=String(e.get("mock_today")||"").trim();if(n)return n}return""}function IA(e){if(!e)return null;const t=String(e).trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){const[a,s,o]=t.split("-").map(Number);if(!Number.isFinite(a)||!Number.isFinite(s)||!Number.isFinite(o))return null;const u=new Date(a,s-1,o,12,0,0);return Number.isFinite(u.getTime())?u:null}const n=new Date(t);return Number.isFinite(n.getTime())?n:null}function Fj(){return Pn()?IA(OA()):null}function jA(){if(typeof import.meta<"u"&&yc){const e="".trim();if(e)return e}if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock_seed")||"").trim();if(t)return t}return Y_}function UA(){if(typeof import.meta<"u"&&yc){const e="".trim(),t=Number(e);if(Number.isFinite(t)&&t>0)return Math.floor(t)}if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock_missing")||"").trim(),n=Number(t);if(Number.isFinite(n)&&n>0)return Math.floor(n)}return 0}function Vo(e){return(e==null?jA():String(e)).trim()||Y_}function zo(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function un(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;const n=Number(t[1]),a=Number(t[2])-1,s=Number(t[3]),o=new Date(Date.UTC(n,a,s));return Number.isFinite(o.getTime())&&yt(o)===e.trim()?o:null}function Lo(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function Z_(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1))}function BA(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}`}function fs({from:e,to:t,seed:n}){const a=un(Sr(new Date))||new Date,s=un(e)||a,o=un(t)||s,u=[],c=Vo(n),h=Math.floor((Date.UTC(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate())-Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()))/864e5)+1;for(let f=0;f<h;f+=1){const m=Lo(s,f),y=yt(m),b=zo(`${c}:${y}`),w=b%1e3/1e3,x=.6+.4*Math.sin(f/6*Math.PI*.5),T=m.getUTCDay()===0||m.getUTCDay()===6?.65:1,P=18e3+Math.round(12e3*w),L=Math.max(0,Math.round(P*x*T)),D=Math.round(L*.46),M=Math.round(L*.34),I=Math.round(L*.14),K=Math.max(0,L-D-M-I);u.push({day:y,total_tokens:L,billable_total_tokens:L,input_tokens:D,output_tokens:M,cached_input_tokens:I,reasoning_output_tokens:K,conversation_count:1+b%5})}return u}function FA({day:e,seed:t}){const n=un(e)||un(Sr(new Date))||new Date,a=yt(n),s=Vo(t),o=Array.from({length:48},(c,h)=>{const f=Math.floor(h/2),m=h%2===0?0:30,b=zo(`${s}:${a}:${f}:${m}`)%1e3/1e3,w=(f+m/60)/24,x=.4+.6*Math.sin(w*Math.PI*2),T=900+Math.round(700*b),P=Math.max(0,Math.round(T*x)),L=Math.round(P*.46),D=Math.round(P*.34),M=Math.round(P*.14),I=Math.max(0,P-L-D-M);return{hour:`${a}T${String(f).padStart(2,"0")}:${String(m).padStart(2,"0")}:00`,total_tokens:P,billable_total_tokens:P,input_tokens:L,output_tokens:D,cached_input_tokens:M,reasoning_output_tokens:I}}),u=Math.max(0,Math.min(48,UA()));if(u>0){const c=Date.now(),h=o.map((y,b)=>{const w=Date.parse(y.hour);return Number.isFinite(w)&&w<=c?{index:b,ts:w}:null}).filter(Boolean),f=Math.max(0,h.length-u),m=h.slice(f);for(const y of m){const b=o[y.index];b&&(o[y.index]={...b,missing:!0})}}return o}function VA({months:e=24,to:t,seed:n}){const a=un(t)||un(Sr(new Date))||new Date,s=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1)),o=Vo(n),u=[];for(let c=e-1;c>=0;c-=1){const h=Z_(s,-c),f=BA(h),y=zo(`${o}:${f}`)%1e3/1e3,b=.7+.3*Math.sin(u.length/6*Math.PI*.5),w=36e4+Math.round(2e5*y),x=Math.max(0,Math.round(w*b)),T=Math.round(x*.46),P=Math.round(x*.34),L=Math.round(x*.14),D=Math.max(0,x-T-P-L);u.push({month:f,total_tokens:x,billable_total_tokens:x,input_tokens:T,output_tokens:P,cached_input_tokens:L,reasoning_output_tokens:D})}return u}function vp(e){return e.reduce((t,n)=>(t.total_tokens+=Number(n.total_tokens||0),t.billable_total_tokens+=Number(n.billable_total_tokens||n.total_tokens||0),t.input_tokens+=Number(n.input_tokens||0),t.output_tokens+=Number(n.output_tokens||0),t.cached_input_tokens+=Number(n.cached_input_tokens||0),t.reasoning_output_tokens+=Number(n.reasoning_output_tokens||0),t.conversation_count+=Number(n.conversation_count||0),t),{total_tokens:0,billable_total_tokens:0,input_tokens:0,output_tokens:0,cached_input_tokens:0,reasoning_output_tokens:0,conversation_count:0})}function zA(e,t=1.75){const n=Number(e||0);return!Number.isFinite(n)||n<=0?"0.000000":(n*t/1e6).toFixed(6)}function Ov(e,t){const n=Number.isFinite(t)?t:0;return{total_tokens:Math.max(0,Math.round(e.total_tokens*n)),billable_total_tokens:Math.max(0,Math.round((e.billable_total_tokens??e.total_tokens)*n)),input_tokens:Math.max(0,Math.round(e.input_tokens*n)),output_tokens:Math.max(0,Math.round(e.output_tokens*n)),cached_input_tokens:Math.max(0,Math.round(e.cached_input_tokens*n)),reasoning_output_tokens:Math.max(0,Math.round(e.reasoning_output_tokens*n))}}function hf(e){return{...e,total_cost_usd:zA(e.total_tokens)}}function $A({from:e,to:t,seed:n}={}){const a=fs({from:e,to:t,seed:n});return{from:e,to:t,data:a}}function HA({day:e,seed:t}={}){const n=un(e)||new Date,a=yt(n),s=FA({day:a,seed:t});return{day:a,data:s}}function WA({months:e=24,to:t,seed:n}={}){const a=un(t)||un(Sr(new Date))||new Date,s=yt(a),o=VA({months:e,to:s,seed:n}),u=Z_(new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1)),-(e-1));return{from:yt(u),to:s,months:e,data:o}}function KA({from:e,to:t,seed:n,rolling:a=!0}={}){const s=fs({from:e,to:t,seed:n}),o=vp(s),u=hf(o),c=a?qA({to:t,seed:n}):null;return{from:e,to:t,days:s.length,totals:u,...c?{rolling:c}:{}}}function qA({to:e,seed:t}={}){const n=un(e)||un(Sr(new Date))||new Date,a=yt(n),s=yt(Lo(n,-6)),o=yt(Lo(n,-29)),u=fs({from:s,to:a,seed:t}),c=fs({from:o,to:a,seed:t});return{last_7d:Iv({rows:u,from:s,to:a}),last_30d:Iv({rows:c,from:o,to:a})}}function Iv({rows:e,from:t,to:n}={}){const a=vp(e||[]),s=(e||[]).filter(u=>Number(u.billable_total_tokens??u.total_tokens)>0).length,o=s>0?Math.floor(a.billable_total_tokens/s):0;return{from:t,to:n,totals:{billable_total_tokens:a.billable_total_tokens,conversation_count:a.conversation_count},active_days:s,avg_per_active_day:o}}function GA({seed:e,limit:t=3}={}){const n=Vo(e),a=NA.map((s,o)=>{const c=12e4+zo(`${n}:${s}`)%9e5,h=o%4*4200,f=Math.max(0,c+h),m=Math.max(0,Math.round(f*.96));return{project_key:s,project_ref:`https://github.com/${s}`,total_tokens:String(f),billable_total_tokens:String(m)}}).sort((s,o)=>Number(o.billable_total_tokens)-Number(s.billable_total_tokens)).slice(0,Math.max(1,Math.min(10,Math.floor(Number(t)||3))));return{generated_at:new Date().toISOString(),entries:a}}function YA(e){const t=un(Sr(new Date))||new Date,n=String(e).trim().toLowerCase()||"week";if(n==="total")return{from:"1970-01-01",to:"9999-12-31"};if(n==="month"){const u=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1)),c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,0));return{from:yt(u),to:yt(c)}}const a=t.getUTCDay(),s=yt(Lo(t,-a)),o=yt(Lo(t,-a+6));return{from:s,to:o}}function Q_({seed:e,period:t,metric:n,limit:a=20,offset:s=0}={}){const o=Vo(e),u=Math.max(1,Math.min(100,Math.floor(Number(a)||20))),c=Math.max(0,Math.min(1e4,Math.floor(Number(s)||0))),h=String(n||"all").trim().toLowerCase()||"all",f=String(t||"week").trim().toLowerCase()||"week",m=f==="month"||f==="total"||f==="week"?f:"week",{from:y,to:b}=YA(m),w=250,x=w>0?Math.ceil(w/u):0,T=Math.floor(c/u)+1,P=Array.from({length:w},(W,S)=>{const Z=S+1,X=`00000000-0000-0000-0000-${String(Z).padStart(12,"0")}`,_e=Nv[Z%Nv.length],Re=18e4+zo(`${o}:${_e}:${Z}`)%9e5,fe=Math.max(0,Re+Z*1200),ce=Math.floor(fe*.28),ue=Math.floor(fe*.18),Me=Math.floor(fe*.1),H=Math.floor(fe*.1),Y=Math.floor(fe*.08),$=Math.floor(fe*.03),N=Math.floor(fe*.02),q=Math.floor(fe*.04),xe=Math.floor(fe*.03),Ae=Math.max(0,fe-ce-ue-Me-H-Y-$-N-q-xe),Se=Z%7!==0;return{id:Z,user_id:X,is_public:Se,is_me:!1,display_name:Se?_e:"Anonymous",avatar_url:null,gpt_tokens:ce,claude_tokens:ue,gemini_tokens:Me,cursor_tokens:H,opencode_tokens:Y,openclaw_tokens:Ae,hermes_tokens:$,kiro_tokens:N,copilot_tokens:q,kimi_tokens:xe,other_tokens:0,total_tokens:fe}}),L=Math.max(0,Math.min(w-1,Math.floor(w*.8)));P[L]&&(P[L].is_me=!0);const D=h==="gpt"||h==="codex"?"gpt_tokens":h==="claude"?"claude_tokens":h==="gemini"?"gemini_tokens":h==="cursor"?"cursor_tokens":h==="opencode"?"opencode_tokens":h==="openclaw"?"openclaw_tokens":h==="hermes"?"hermes_tokens":h==="kiro"?"kiro_tokens":h==="copilot"?"copilot_tokens":h==="kimi"?"kimi_tokens":"total_tokens",M=P.slice().sort((W,S)=>Number(S[D])-Number(W[D])||W.id-S.id).map((W,S)=>({user_id:W.is_public?W.user_id:null,rank:S+1,is_me:!!W.is_me,display_name:W.display_name,avatar_url:W.avatar_url,gpt_tokens:String(W.gpt_tokens),claude_tokens:String(W.claude_tokens),gemini_tokens:String(W.gemini_tokens),cursor_tokens:String(W.cursor_tokens),opencode_tokens:String(W.opencode_tokens),openclaw_tokens:String(W.openclaw_tokens),hermes_tokens:String(W.hermes_tokens??0),kiro_tokens:String(W.kiro_tokens??0),copilot_tokens:String(W.copilot_tokens??0),kimi_tokens:String(W.kimi_tokens??0),other_tokens:String(W.other_tokens??0),total_tokens:String(W.total_tokens),is_public:!!W.is_public})),I=M.find(W=>W?.is_me)||null,K=I?{rank:I.rank,gpt_tokens:I.gpt_tokens,claude_tokens:I.claude_tokens,gemini_tokens:I.gemini_tokens,cursor_tokens:I.cursor_tokens,opencode_tokens:I.opencode_tokens,openclaw_tokens:I.openclaw_tokens,hermes_tokens:I.hermes_tokens,kiro_tokens:I.kiro_tokens,copilot_tokens:I.copilot_tokens,kimi_tokens:I.kimi_tokens,other_tokens:I.other_tokens,total_tokens:I.total_tokens}:{rank:null,gpt_tokens:"0",claude_tokens:"0",gemini_tokens:"0",cursor_tokens:"0",opencode_tokens:"0",openclaw_tokens:"0",hermes_tokens:"0",kiro_tokens:"0",copilot_tokens:"0",kimi_tokens:"0",other_tokens:"0",total_tokens:"0"},G=M.slice(c,c+u);return{period:m,metric:h,from:y,to:b,generated_at:new Date().toISOString(),page:T,limit:u,offset:c,total_entries:w,total_pages:x,entries:G,me:K}}function ZA({weeks:e=52,to:t,weekStartsOn:n="sun",seed:a}={}){const s=G_({weeks:e,now:un(t)||un(Sr(new Date))||new Date,weekStartsOn:n}),o=fs({from:s.from,to:s.to,seed:a});return{...DA({dailyRows:o,weeks:e,to:s.to,weekStartsOn:n}),week_starts_on:n,active_days:o.filter(c=>Number(c.billable_total_tokens??c.total_tokens)>0).length,streak_days:MA({dailyRows:o,to:s.to})}}function QA({from:e,to:t,seed:n}={}){const a=fs({from:e,to:t,seed:n}),s=vp(a),u=[{source:"codex",weight:.7,models:[{model:"gpt-5.2-codex",model_id:"gpt-5.2-codex",weight:.2},{model:"unknown",model_id:"unknown",weight:.8}]},{source:"claude",weight:.2,models:[{model:"claude-3.5",model_id:"claude-3.5",weight:.3},{model:"unknown",model_id:"unknown",weight:.7}]},{source:"every-code",weight:.1,models:[{model:"unknown",model_id:"unknown",weight:1}]}].map(c=>{const h=Ov(s,c.weight),f=c.models.map(m=>{const y=Ov(h,m.weight);return{model:m.model,model_id:m.model_id||m.model,totals:hf(y)}});return{source:c.source,totals:hf(h),models:f}});return{from:e,to:t,days:a.length,sources:u,pricing:{model:"mock",pricing_mode:"add",source:"mock",effective_from:Sr(new Date),rates_per_million_usd:{input:"1.750000",cached_input:"0.175000",output:"14.000000",reasoning_output:"14.000000"}}}}function XA({from:e,to:t,source:n="claude"}={}){if(n==="codex")return{from:e,to:t,source:"codex",scope:"supported",totals:{input_tokens:142e4,cached_input_tokens:588e4,cache_creation_input_tokens:92e4,output_tokens:256e4,reasoning_output_tokens:61e4,total_tokens:1078e4},session_count:188,message_count:5436,tool_calls_breakdown:{categories:[{name:"Execution",calls:742,totals:{input_tokens:32e4,cached_input_tokens:104e4,cache_creation_input_tokens:11e4,output_tokens:46e4,reasoning_output_tokens:12e4,total_tokens:193e4},tools:[{name:"exec_command",calls:510,totals:{input_tokens:25e4,cached_input_tokens:82e4,cache_creation_input_tokens:8e4,output_tokens:37e4,reasoning_output_tokens:9e4,total_tokens:152e4}},{name:"write_stdin",calls:232,totals:{input_tokens:7e4,cached_input_tokens:22e4,cache_creation_input_tokens:3e4,output_tokens:9e4,reasoning_output_tokens:3e4,total_tokens:41e4}}]},{name:"Browser",calls:406,totals:{input_tokens:21e4,cached_input_tokens:88e4,cache_creation_input_tokens:9e4,output_tokens:42e4,reasoning_output_tokens:1e5,total_tokens:17e5},tools:[{name:"take_snapshot",calls:180,totals:{input_tokens:1e5,cached_input_tokens:4e5,cache_creation_input_tokens:4e4,output_tokens:18e4,reasoning_output_tokens:4e4,total_tokens:76e4}},{name:"click",calls:126,totals:{input_tokens:6e4,cached_input_tokens:25e4,cache_creation_input_tokens:3e4,output_tokens:12e4,reasoning_output_tokens:35e3,total_tokens:495e3}},{name:"evaluate_script",calls:100,totals:{input_tokens:5e4,cached_input_tokens:23e4,cache_creation_input_tokens:2e4,output_tokens:12e4,reasoning_output_tokens:25e3,total_tokens:445e3}}]}],tools_total:363e4,privacy:{includes_inputs:!1,note:"Aggregated tool names only; no tool arguments or outputs are included."}},exec_command_breakdown:{by_type:[{name:"test",calls:168,failures:14,duration_ms:482e3,max_duration_ms:18400,output_chars:45e4,output_lines:8600,totals:{input_tokens:9e4,cached_input_tokens:32e4,output_tokens:16e4,reasoning_output_tokens:42e3,total_tokens:612e3}},{name:"build",calls:116,failures:9,duration_ms:392e3,max_duration_ms:22100,output_chars:31e4,output_lines:5200,totals:{input_tokens:7e4,cached_input_tokens:24e4,output_tokens:13e4,reasoning_output_tokens:3e4,total_tokens:47e4}}],by_exit:[{name:"completed:0",calls:438,failures:0,duration_ms:104e4,max_duration_ms:22100,output_chars:83e4,output_lines:13100,totals:{input_tokens:22e4,cached_input_tokens:78e4,output_tokens:35e4,reasoning_output_tokens:82e3,total_tokens:1432e3}},{name:"completed:1",calls:72,failures:72,duration_ms:155e3,max_duration_ms:11800,output_chars:12e4,output_lines:2300,totals:{input_tokens:3e4,cached_input_tokens:11e4,output_tokens:55e3,reasoning_output_tokens:8e3,total_tokens:195e3}}]}};if(n!=="claude")return{from:e,to:t,source:n,scope:"unsupported",totals:{input_tokens:0,cached_input_tokens:0,cache_creation_input_tokens:0,output_tokens:0,reasoning_output_tokens:0,total_tokens:0},categories:["system_prefix","conversation_history","user_input","tool_calls","subagents","reasoning","assistant_response"].map(u=>({key:u,totals:{input_tokens:0,cached_input_tokens:0,cache_creation_input_tokens:0,output_tokens:0,reasoning_output_tokens:0,total_tokens:0},percent:0})),session_count:0,message_count:0};const a=[{key:"system_prefix",total:12896539},{key:"conversation_history",total:320207200},{key:"user_input",total:998025},{key:"tool_calls",total:4808739},{key:"subagents",total:1022828},{key:"reasoning",total:11073118},{key:"assistant_response",total:1289174}],s=a.reduce((u,c)=>u+c.total,0),o=a.map(({key:u,total:c})=>({key:u,totals:{input_tokens:u==="user_input"?c:0,cached_input_tokens:u==="conversation_history"?Math.round(c*.95):0,cache_creation_input_tokens:u==="system_prefix"?c:u==="conversation_history"?Math.round(c*.05):0,output_tokens:["tool_calls","subagents","reasoning","assistant_response"].includes(u)?c:0,reasoning_output_tokens:u==="reasoning"?c:0,total_tokens:c},percent:Number((c/s*100).toFixed(2))}));return{from:e,to:t,source:"claude",scope:"supported",totals:{input_tokens:998025,cached_input_tokens:Math.round(320207200*.95),cache_creation_input_tokens:12896539+Math.round(320207200*.05),output_tokens:18193859,reasoning_output_tokens:11073118,total_tokens:s},categories:o,session_count:312,message_count:12046}}let Pu=null;function JA(){Pu=null}async function eL(e=fetch){if(Pu)return Pu;const t=await e("/api/local-auth",{method:"GET",headers:{Accept:"application/json"},cache:"no-store"});if(!t.ok)throw new Error(`Local auth request failed with HTTP ${t.status}`);const n=await t.json().catch(()=>null),a=typeof n?.token=="string"?n.token.trim():"";if(!a)throw new Error("Local auth token missing from response");return Pu=a,a}async function bp(e=fetch){return{"x-tokentracker-local-auth":await eL(e)}}const ir={usageSummary:"tokentracker-usage-summary",usageDaily:"tokentracker-usage-daily",usageHourly:"tokentracker-usage-hourly",usageMonthly:"tokentracker-usage-monthly",usageHeatmap:"tokentracker-usage-heatmap",usageModelBreakdown:"tokentracker-usage-model-breakdown",usageCategoryBreakdown:"tokentracker-usage-category-breakdown",projectUsageSummary:"tokentracker-project-usage-summary",userStatus:"tokentracker-user-status",localSync:"tokentracker-local-sync",usageLimits:"tokentracker-usage-limits"};async function Pr(e,t,n){const a=new URL(`/functions/${e}`,window.location.origin);if(t)for(const[o,u]of Object.entries(t))u!=null&&u!==""&&a.searchParams.set(o,String(u));const s=await fetch(a.toString(),{headers:{Accept:"application/json"},cache:"no-store",...n});if(!s.ok){const o=new Error(`Request failed with HTTP ${s.status}`);throw o.status=s.status,o}return s.json()}function Oa({timeZone:e,tzOffsetMinutes:t}={}){const n={},a=typeof e=="string"?e.trim():"";return a&&(n.tz=a),Number.isFinite(t)&&(n.tz_offset_minutes=String(Math.trunc(t))),n}function mi({source:e,model:t}={}){const n={},a=typeof e=="string"?e.trim().toLowerCase():"";a&&(n.source=a);const s=typeof t=="string"?t.trim():"";return s&&(n.model=s),n}async function Vj({from:e,to:t,source:n,model:a,timeZone:s,tzOffsetMinutes:o,rolling:u=!1,accessToken:c}={}){if(Pn())return KA({from:e,to:t,seed:c,rolling:u});const h=Oa({timeZone:s,tzOffsetMinutes:o}),f=mi({source:n,model:a}),m=u?{rolling:"1"}:{};return Pr(ir.usageSummary,{from:e,to:t,...f,...h,...m})}async function zj({from:e,to:t,source:n,limit:a,timeZone:s,tzOffsetMinutes:o,accessToken:u}={}){if(Pn())return GA({seed:u,limit:a});const c=Oa({timeZone:s,tzOffsetMinutes:o}),f={...mi({source:n}),...c};return e&&(f.from=e),t&&(f.to=t),a!=null&&(f.limit=String(a)),Pr(ir.projectUsageSummary,f)}async function $o(e,t={}){const n=fi();if(!n)throw new Error("InsForge base URL not configured");const a=n.replace(/\/$/,""),s=new URL(`${a}/functions/${e}`);if(t.params)for(const[h,f]of Object.entries(t.params))f!=null&&f!==""&&s.searchParams.set(h,String(f));const o={Accept:"application/json","Content-Type":"application/json"},u=gc();u&&(o.apikey=u),t.accessToken&&wA(t.accessToken)&&(o.Authorization=`Bearer ${t.accessToken}`);const c=await fetch(s.toString(),{method:t.method||"GET",headers:o,...t.body!=null?{body:JSON.stringify(t.body)}:{}});if(!c.ok){const h=new Error(`Request failed with HTTP ${c.status}`);throw h.status=c.status,h}return c.json()}async function $j({accessToken:e,userId:t,period:n,metric:a,limit:s,offset:o}={}){return Pn()?Q_({seed:e||t,period:n,metric:a,limit:s,offset:o}):$o("tokentracker-leaderboard",{params:{period:n,limit:s,offset:o,user_id:t}})}async function jv({accessToken:e}={}){return $o("tokentracker-public-visibility",{accessToken:e,method:"GET"})}async function Hj({accessToken:e,enabled:t,anonymous:n,display_name:a,github_url:s,show_github_url:o}={}){const u={};return t!==void 0&&(u.enabled=!!t),n!==void 0&&(u.anonymous=!!n),a!==void 0&&(u.display_name=String(a)),s!==void 0&&(u.github_url=s===null?null:String(s)),o!==void 0&&(u.show_github_url=!!o),$o("tokentracker-public-visibility",{accessToken:e,method:"POST",body:u})}async function Wj({accessToken:e,period:t,source:n}={}){const a={};return t&&(a.period=t),typeof n=="string"&&n.trim()&&(a.source=n.trim()),$o("tokentracker-leaderboard-refresh",{accessToken:e,method:"POST",body:a})}async function Kj({accessToken:e,userId:t,period:n}={}){if(Pn()){const a=Q_({seed:e,period:n,metric:"all",limit:250,offset:0}),o=(Array.isArray(a?.entries)?a.entries:[]).find(u=>u?.user_id===t)||null;return{period:a?.period??"week",from:a?.from??null,to:a?.to??null,generated_at:a?.generated_at??new Date().toISOString(),entry:o}}return $o("tokentracker-leaderboard-profile",{accessToken:e,params:{user_id:t,period:n}})}async function qj(e={}){if(Pn()){const t=new Date().toISOString();return{user_id:"local-user",created_at:t,pro:{active:!1,sources:[],expires_at:null,partial:!1,as_of:t},subscriptions:{partial:!1,as_of:t,items:[]},install:{partial:!1,as_of:t,has_active_device_token:!1,has_active_device:!1,active_device_tokens:0,active_devices:0,latest_token_activity_at:null,latest_device_seen_at:null}}}return Pr(ir.userStatus)}async function Gj({signal:e}={}){const t=await bp(),n=await fetch(`/functions/${ir.localSync}`,{method:"POST",headers:{Accept:"application/json",...t},cache:"no-store",signal:e}),a=await n.json().catch(()=>({ok:!1,error:`Local sync request failed with HTTP ${n.status}`}));if(!n.ok||a?.ok===!1){const s=a?.error||a?.message||`Local sync request failed with HTTP ${n.status}`,o=new Error(s);throw o.status=n.status,o}return a}async function Yj({from:e,to:t,source:n,timeZone:a,tzOffsetMinutes:s,accessToken:o}={}){if(Pn())return QA({from:e,to:t,seed:o});const u=Oa({timeZone:a,tzOffsetMinutes:s}),c=mi({source:n});return Pr(ir.usageModelBreakdown,{from:e,to:t,...c,...u})}async function Zj({from:e,to:t,source:n="claude",timeZone:a,tzOffsetMinutes:s}={}){if(Pn())return XA({from:e,to:t,source:n});const o=Oa({timeZone:a,tzOffsetMinutes:s});return Pr(ir.usageCategoryBreakdown,{from:e,to:t,source:n,...o})}async function Qj({from:e,to:t,source:n,model:a,timeZone:s,tzOffsetMinutes:o,accessToken:u}={}){if(Pn())return $A({from:e,to:t,seed:u});const c=Oa({timeZone:s,tzOffsetMinutes:o}),h=mi({source:n,model:a});return Pr(ir.usageDaily,{from:e,to:t,...h,...c})}async function Xj({day:e,source:t,model:n,timeZone:a,tzOffsetMinutes:s,accessToken:o}={}){if(Pn())return HA({day:e,seed:o});const u=Oa({timeZone:a,tzOffsetMinutes:s}),c=mi({source:t,model:n}),h=e?{day:e,...c,...u}:{...c,...u};return Pr(ir.usageHourly,h)}async function Jj({months:e,to:t,source:n,model:a,timeZone:s,tzOffsetMinutes:o,accessToken:u}={}){if(Pn())return WA({months:e,to:t,seed:u});const c=Oa({timeZone:s,tzOffsetMinutes:o}),h=mi({source:n,model:a});return Pr(ir.usageMonthly,{...e?{months:String(e)}:{},...t?{to:t}:{},...h,...c})}async function e3(e={}){const t=e?.refresh?{refresh:"1"}:void 0;return Pr(ir.usageLimits,t)}async function t3({weeks:e,to:t,weekStartsOn:n,source:a,model:s,timeZone:o,tzOffsetMinutes:u,accessToken:c}={}){if(Pn())return ZA({weeks:e,to:t,weekStartsOn:n,seed:c});const h=Oa({timeZone:o,tzOffsetMinutes:u}),f=mi({source:a,model:s});return Pr(ir.usageHeatmap,{weeks:String(e),to:t,week_starts_on:n,...f,...h})}const X_=k.createContext(null);function tL(e){if(!e||typeof e!="object")return"";const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},n=e.profile&&typeof e.profile=="object"?e.profile:{},a=t.full_name||t.name||n.name||t.user_name||t.preferred_username;return typeof a=="string"&&a.trim()?a.trim():typeof e.email=="string"&&e.email.includes("@")?e.email.split("@")[0].trim()||e.email.trim():typeof e.email=="string"?e.email.trim():""}function Uv(e){if(!e||typeof e!="object")return null;const t=e,n=t.session&&typeof t.session=="object"?t.session:null,a=typeof t.accessToken=="string"&&t.accessToken||typeof t.access_token=="string"&&t.access_token||n&&typeof n.accessToken=="string"&&n.accessToken||n&&typeof n.access_token=="string"&&n.access_token||null;return a&&a.length>0?a:null}async function Sh(e,t={}){if(!e)return null;const n=Math.max(0,Math.floor(Number(t.skewMs)||6e4)),a=e.tokenManager,s=()=>a?.getAccessToken?.()??a?.getSession?.()?.accessToken??null;let o=s();if(!o||kA(o,n)){const{data:u}=await e.auth.refreshSession();if(o=s()??Uv(u)??null,!o&&typeof e.auth.getCurrentUser=="function")try{await e.auth.getCurrentUser(),o=s()??Uv(u)??null}catch{}}return o||null}function nL({children:e}){const[t,n]=k.useState(null),[a,s]=k.useState(null),[o,u]=k.useState(!0);k.useEffect(()=>{if(!df()){n(null),s(null),u(!1);return}n(pA())},[]),k.useEffect(()=>{if(!t)return;let G=!0;return u(!0),(async()=>{try{let{data:W,error:S}=await t.auth.getCurrentUser();if(!G)return;if(!S&&!W?.user){if(await new Promise(X=>setTimeout(X,150)),!G)return;const Z=await t.auth.getCurrentUser();W=Z.data,S=Z.error}if(S){s(null);return}s(W?.user??null)}catch{G&&s(null)}finally{G&&u(!1)}})(),()=>{G=!1}},[t]);const c=k.useCallback(async()=>{if(t)try{let{data:G,error:W}=await t.auth.getCurrentUser();if(!W&&!G?.user){await new Promise(Z=>setTimeout(Z,150));const S=await t.auth.getCurrentUser();G=S.data,W=S.error}if(W){s(null);return}s(G?.user??null)}catch{s(null)}},[t]),h=k.useCallback(async(G,W)=>{if(!t)return{error:new Error("InsForge client not configured")};const S=typeof window<"u"&&window.webkit?.messageHandlers?.nativeOAuth;if(S){const _e=typeof W=="string"&&W.trim()?W.trim():`${window.location.origin}/auth/callback`,oe=await t.auth.signInWithOAuth({provider:G,redirectTo:_e,skipBrowserRedirect:!0});if(oe.data?.url){try{const Re=await bp();await fetch("/api/auth-bridge/verifier",{method:"PUT",headers:{"Content-Type":"application/json",...Re},body:JSON.stringify({native:!0})})}catch{}S.postMessage(oe.data.url)}return oe}const Z=typeof W=="string"&&W.trim()?W.trim():typeof window<"u"?`${window.location.origin}/dashboard`:void 0;return await t.auth.signInWithOAuth({provider:G,redirectTo:Z})},[t]),f=k.useCallback(async G=>{if(!t)return{data:null,error:new Error("InsForge client not configured")};const{data:W,error:S}=await t.auth.signInWithPassword(G);return W?.user&&s(W.user),{data:W,error:S}},[t]),m=k.useCallback(async G=>{if(!t)return{data:null,error:new Error("InsForge client not configured")};const{data:W,error:S}=await t.auth.signUp(G);return W?.user&&W?.accessToken&&s(W.user),{data:W,error:S}},[t]),y=k.useCallback(async()=>t?t.auth.getPublicAuthConfig():{data:null,error:new Error("InsForge client not configured")},[t]),b=k.useCallback(async()=>{t&&(await t.auth.signOut(),H_(),JA(),s(null))},[t]),w=k.useCallback(async()=>Sh(t),[t]),[x,T]=k.useState(null),[P,L]=k.useState(!1),D=k.useMemo(()=>tL(a),[a]);k.useEffect(()=>{if(!a||!t){T(null),L(!1);return}let G=!0;return(async()=>{try{const W=await Sh(t);if(!G||!W){G&&L(!0);return}const S=await jv({accessToken:W});G&&S?.display_name&&T(S.display_name)}catch{}G&&L(!0)})(),()=>{G=!1}},[a,t]);const M=P?x||D:"",I=k.useCallback(async()=>{if(t)try{const G=await Sh(t);if(!G)return;const W=await jv({accessToken:G});W?.display_name&&T(W.display_name)}catch{}},[t]),K=k.useMemo(()=>!df()||!t?{enabled:!1,client:null,user:null,signedIn:!1,loading:!1,displayName:"",refreshUser:async()=>{},refreshDisplayName:async()=>{},signInWithOAuth:async()=>({error:new Error("InsForge not configured")}),signInWithPassword:async()=>({data:null,error:new Error("InsForge not configured")}),signUp:async()=>({data:null,error:new Error("InsForge not configured")}),getPublicAuthConfig:async()=>({data:null,error:new Error("InsForge not configured")}),signOut:async()=>{},getAccessToken:async()=>null}:{enabled:!0,client:t,user:a,signedIn:!!a,loading:o,displayName:M,refreshUser:c,refreshDisplayName:I,signInWithOAuth:h,signInWithPassword:f,signUp:m,getPublicAuthConfig:y,signOut:b,getAccessToken:w},[t,a,o,M,c,I,h,f,m,y,b,w]);return U.jsx(X_.Provider,{value:K,children:e})}function vc(){return k.useContext(X_)}const rL=`key,module,page,component,slot,text,notes,status
|
|
43
|
+
header.auth.sign_in_aria,shared,*,InsforgeUserHeaderControls,sign_in_aria,"Sign in",,active
|
|
44
|
+
login.back_home,shared,LoginPage,LoginPage,back_home,"Back to home",,active
|
|
45
|
+
login.cloud_only,shared,LoginPage,LoginPage,cloud_only,"Cloud sign-in is not configured. Use the local dashboard on localhost.",,active
|
|
46
|
+
login.title,shared,LoginPage,LoginPage,title,"Sign in",,active
|
|
47
|
+
login.subtitle,shared,LoginPage,LoginPage,subtitle,"Choose email or a connected account.",,active
|
|
48
|
+
login.dismiss,shared,LoginPage,LoginPage,dismiss,"Dismiss",,active
|
|
49
|
+
login.verify_email_success,shared,LoginPage,LoginPage,verify_ok,"Email verified. You can sign in below.",,active
|
|
50
|
+
login.verify_email_pending,shared,LoginPage,LoginPage,verify_pending,"Check your email to verify your account, then sign in.",,active
|
|
51
|
+
login.oauth.continue,shared,LoginPage,LoginPage,oauth_continue,"Continue with {{provider}}",,active
|
|
52
|
+
login.divider,shared,LoginPage,LoginPage,divider,"Or",,active
|
|
53
|
+
login.tab.sign_in,shared,LoginPage,LoginPage,tab_sign_in,"Sign in",,active
|
|
54
|
+
login.tab.sign_up,shared,LoginPage,LoginPage,tab_sign_up,"Create account",,active
|
|
55
|
+
login.field.name,shared,LoginPage,LoginPage,field_name,"Display name",,active
|
|
56
|
+
login.field.name_placeholder,shared,LoginPage,LoginPage,name_placeholder,"Optional",,active
|
|
57
|
+
login.field.email,shared,LoginPage,LoginPage,field_email,"Email",,active
|
|
58
|
+
login.field.password,shared,LoginPage,LoginPage,field_password,"Password",,active
|
|
59
|
+
login.password_hint,shared,LoginPage,LoginPage,pw_hint,"At least {{min}} characters.",,active
|
|
60
|
+
login.submit.sign_in,shared,LoginPage,LoginPage,submit_sign_in,"Sign in with email",,active
|
|
61
|
+
login.submit.sign_up,shared,LoginPage,LoginPage,submit_sign_up,"Create account",,active
|
|
62
|
+
login_modal.subtitle,shared,*,LoginModal,subtitle,"Sign in to join the leaderboard",,active
|
|
63
|
+
login_modal.continue_email,shared,*,LoginModal,continue_email,"Continue with Email",,active
|
|
64
|
+
login_modal.divider_email,shared,*,LoginModal,divider_email,"email",,active
|
|
65
|
+
shared.placeholder.short,shared,*,*,placeholder_short,"--",,active
|
|
66
|
+
shared.unit.percent,shared,*,*,unit_percent,"%",,active
|
|
67
|
+
shared.unit.thousand_abbrev,shared,*,*,unit_thousand_abbrev,"K",,active
|
|
68
|
+
shared.unit.million_abbrev,shared,*,*,unit_million_abbrev,"M",,active
|
|
69
|
+
shared.unit.billion_abbrev,shared,*,*,unit_billion_abbrev,"B",,active
|
|
70
|
+
shared.data_source,shared,*,*,label,"Data source: {{source}}",,active
|
|
71
|
+
shared.error.prefix,shared,*,*,label,"Error: {{error}}",,active
|
|
72
|
+
shared.status.unsynced,shared,*,*,status,"—",,active
|
|
73
|
+
error.boundary.title,shared,*,ErrorBoundary,title,"Something went wrong",,active
|
|
74
|
+
error.boundary.subtitle,shared,*,ErrorBoundary,subtitle,"This view failed to render",,active
|
|
75
|
+
error.boundary.hint,shared,*,ErrorBoundary,hint,"Open the console, then reload the page",,active
|
|
76
|
+
error.boundary.no_details,shared,*,ErrorBoundary,details,"No error details",,active
|
|
77
|
+
error.boundary.action.reload,shared,*,ErrorBoundary,action_reload,"Reload",,active
|
|
78
|
+
|
|
79
|
+
landing.handle.default,landing,LandingPage,LandingPage,handle_default,"VIBE_USER",,active
|
|
80
|
+
landing.handle.special,landing,LandingPage,LandingPage,handle_special,"VOLT",,active
|
|
81
|
+
landing.screenshot.alt,landing,LandingPage,LandingPage,screenshot_alt,"TokenTracker dashboard screenshot",,active
|
|
82
|
+
landing.nav.login,landing,LandingPage,LandingPage,nav_login,"LOGIN",,active
|
|
83
|
+
landing.nav.signup,landing,LandingPage,LandingPage,nav_signup,"SIGN UP",,active
|
|
84
|
+
landing.install.command,landing,LandingPage,LandingPage,install_command,"npx --yes tokentracker-cli",,active
|
|
85
|
+
landing.install.action.copy,landing,LandingPage,LandingPage,install_copy,"COPY COMMAND",,active
|
|
86
|
+
landing.install.action.copied,landing,LandingPage,LandingPage,install_copied,"COPIED",,active
|
|
87
|
+
landing.meta.title,landing,LandingPage,Meta,title,"Token Tracker — Token Usage Tracker for AI Agent CLIs",,active
|
|
88
|
+
landing.meta.description,landing,LandingPage,Meta,description,"Automatically monitor token usage across Claude Code, Cursor, Codex, and more. Local-first, privacy-focused, and zero manual configuration.",,active
|
|
89
|
+
landing.meta.og_site_name,landing,LandingPage,Meta,og_site_name,"Token Tracker",,active
|
|
90
|
+
landing.meta.og_type,landing,LandingPage,Meta,og_type,"website",,active
|
|
91
|
+
landing.meta.og_image,landing,LandingPage,Meta,og_image,"https://www.tokentracker.cc/dashboard-dark.png",,active
|
|
92
|
+
landing.meta.og_url,landing,LandingPage,Meta,og_url,"https://www.tokentracker.cc/",,active
|
|
93
|
+
landing.meta.twitter_card,landing,LandingPage,Meta,twitter_card,"summary_large_image",,active
|
|
94
|
+
share.meta.title,share,SharePage,Meta,title,"Token Tracker Share",,active
|
|
95
|
+
share.meta.description,share,SharePage,Meta,description,"Share a Token Tracker dashboard snapshot with token usage insights across models, projects, and time windows.",,active
|
|
96
|
+
share.meta.og_site_name,share,SharePage,Meta,og_site_name,"Token Tracker",,active
|
|
97
|
+
share.meta.og_type,share,SharePage,Meta,og_type,"website",,active
|
|
98
|
+
share.meta.og_image,share,SharePage,Meta,og_image,"https://www.tokentracker.cc/dashboard-dark.png",,active
|
|
99
|
+
share.meta.og_url,share,SharePage,Meta,og_url,"https://www.tokentracker.cc/share",,active
|
|
100
|
+
share.meta.twitter_card,share,SharePage,Meta,twitter_card,"summary_large_image",,active
|
|
101
|
+
landing.handle.placeholder,landing,LandingPage,LandingPage,handle_placeholder,"TRY '{{handle}}'",,active
|
|
102
|
+
landing.rank.expectation,landing,LandingPage,LandingPage,rank_expectation,"RANK_EXPECTATION: {{rank}}",,active
|
|
103
|
+
landing.rank.singularity,landing,LandingPage,LandingPage,rank_singularity,"APEX",,active
|
|
104
|
+
landing.rank.unranked,landing,LandingPage,LandingPage,rank_unranked,"UNRANKED",,active
|
|
105
|
+
landing.cta.primary,landing,LandingPage,LandingPage,cta_primary,"View Dashboard",,active
|
|
106
|
+
landing.cta.secondary,landing,LandingPage,LandingPage,cta_secondary,"GITHUB SOURCE",,active
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
landing.v2.hero.title_line1,landing,LandingPage,MarketingLanding,hero_title_1,"TRACK ALL YOUR",,active
|
|
114
|
+
landing.v2.hero.title_line2,landing,LandingPage,MarketingLanding,hero_title_2,"AI TOKENS",,active
|
|
115
|
+
landing.v2.install.mac_cta,landing,LandingPage,MarketingLanding,mac_cta,"MAC APP (DMG)",,active
|
|
116
|
+
landing.v2.models.title,landing,LandingPage,MarketingLanding,models_title,"SUPPORTED AI CLI TOOLS",,active
|
|
117
|
+
landing.v2.compare.kicker,landing,LandingPage,MarketingLanding,compare_kicker,"SEAMLESS TRACKING",,active
|
|
118
|
+
landing.v2.compare.title,landing,LandingPage,MarketingLanding,compare_title,"Stop guessing your AI usage.",,active
|
|
119
|
+
landing.v2.compare.subtitle,landing,LandingPage,MarketingLanding,compare_subtitle,"AI CLI tools hide your usage data in obscure local files. TokenTracker aggregates them into a single, beautiful dashboard in real-time.",,active
|
|
120
|
+
landing.v2.distill.body,landing,LandingPage,MarketingLanding,distill_body,"100% local processing. No prompts or code are ever collected.",,active
|
|
121
|
+
landing.v2.compare.with.title,landing,LandingPage,MarketingLanding,with_title,"WITH TOKEN TRACKER",,active
|
|
122
|
+
landing.v2.compare.with.p1,landing,LandingPage,MarketingLanding,with_p1,"Centralized usage dashboard",,active
|
|
123
|
+
landing.v2.compare.with.p2,landing,LandingPage,MarketingLanding,with_p2,"Real-time token metrics",,active
|
|
124
|
+
landing.v2.compare.with.p3,landing,LandingPage,MarketingLanding,with_p3,"100% local, privacy-guaranteed",,active
|
|
125
|
+
landing.v2.compare.without.title,landing,LandingPage,MarketingLanding,without_title,"WITHOUT IT",,active
|
|
126
|
+
landing.v2.compare.without.p1,landing,LandingPage,MarketingLanding,without_p1,"Scattered JSON log files",,active
|
|
127
|
+
landing.v2.compare.without.p2,landing,LandingPage,MarketingLanding,without_p2,"Blind to token consumption",,active
|
|
128
|
+
landing.v2.compare.without.p3,landing,LandingPage,MarketingLanding,without_p3,"Unexpected API bills",,active
|
|
129
|
+
landing.v2.footer.line,landing,LandingPage,MarketingLanding,footer_line,"Token Tracker — Made by developers, for developers.",,active
|
|
130
|
+
landing.v2.nav.github,landing,LandingPage,MarketingLanding,nav_github,"GITHUB",,active
|
|
131
|
+
landing.v2.models.agent.codex,landing,LandingPage,MarketingLanding,agent_codex,"CODEX",,active
|
|
132
|
+
landing.v2.models.agent.claude_code,landing,LandingPage,MarketingLanding,agent_claude_code,"CLAUDE CODE",,active
|
|
133
|
+
landing.v2.models.agent.cursor,landing,LandingPage,MarketingLanding,agent_cursor,"CURSOR",,active
|
|
134
|
+
landing.v2.models.agent.gemini,landing,LandingPage,MarketingLanding,agent_gemini,"GEMINI",,active
|
|
135
|
+
landing.v2.models.agent.opencode,landing,LandingPage,MarketingLanding,agent_opencode,"OPENCODE",,active
|
|
136
|
+
landing.v2.models.agent.openclaw,landing,LandingPage,MarketingLanding,agent_openclaw,"OPENCLAW",,active
|
|
137
|
+
landing.v2.cta.primary,landing,LandingPage,MarketingLanding,cta_primary,"Open Dashboard",,active
|
|
138
|
+
landing.v2.hero.subtagline,landing,LandingPage,MarketingLanding,hero_subtagline,"Automatically monitor token usage across Claude Code, Cursor, Codex, and more. Local-first, privacy-focused, and zero manual configuration.",,active
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
identity_card.rank_label,ui,IdentityCard,IdentityCard,rank_label,"Started",,active
|
|
144
|
+
identity_card.streak_label,ui,IdentityCard,IdentityCard,streak_label,"Active days",,active
|
|
145
|
+
identity_card.rank_placeholder,ui,IdentityCard,IdentityCard,rank_placeholder,"—",,active
|
|
146
|
+
identity_card.streak_value,ui,IdentityCard,IdentityCard,streak_value,"{{days}} DAY",,active
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
dashboard.core_index.collapse_label,dashboard,DashboardPage,UsagePanel,toggle,"▾",,active
|
|
150
|
+
dashboard.core_index.expand_label,dashboard,DashboardPage,UsagePanel,toggle,"▸",,active
|
|
151
|
+
dashboard.core_index.collapse_aria,dashboard,DashboardPage,UsagePanel,toggle_aria,"Collapse model breakdown",,active
|
|
152
|
+
dashboard.core_index.expand_aria,dashboard,DashboardPage,UsagePanel,toggle_aria,"Expand model breakdown",,active
|
|
153
|
+
usage.summary.total,ui,UsagePanel,UsagePanel,summary_label_total,"Total tokens",,active
|
|
154
|
+
usage.metric.total,ui,UsagePanel,UsagePanel,metric_total,"Total",,active
|
|
155
|
+
usage.metric.input,ui,UsagePanel,UsagePanel,metric_input,"Input",,active
|
|
156
|
+
usage.metric.output,ui,UsagePanel,UsagePanel,metric_output,"Output",,active
|
|
157
|
+
usage.metric.cached_input,ui,UsagePanel,UsagePanel,metric_cached_input,"Cached input",,active
|
|
158
|
+
usage.metric.reasoning_output,ui,UsagePanel,UsagePanel,metric_reasoning_output,"Reasoning output",,active
|
|
159
|
+
usage.button.refresh,ui,UsagePanel,UsagePanel,button_refresh,"Refresh",,active
|
|
160
|
+
|
|
161
|
+
dashboard.rolling.title,ui,RollingUsagePanel,RollingUsagePanel,title,"Recent Activity",,active
|
|
162
|
+
dashboard.rolling.last_7d,ui,RollingUsagePanel,RollingUsagePanel,label_last_7d,"Last 7 days",,active
|
|
163
|
+
dashboard.rolling.last_30d,ui,RollingUsagePanel,RollingUsagePanel,label_last_30d,"Last 30 days",,active
|
|
164
|
+
dashboard.rolling.avg_active_day,ui,RollingUsagePanel,RollingUsagePanel,label_avg_active_day,"Daily average",,active
|
|
165
|
+
|
|
166
|
+
dashboard.projects.title,ui,ProjectUsagePanel,ProjectUsagePanel,title,"Project Usage",,active
|
|
167
|
+
dashboard.projects.tokens_label,ui,ProjectUsagePanel,ProjectUsagePanel,tokens_label,"Tokens",,active
|
|
168
|
+
dashboard.projects.stars_label,ui,ProjectUsagePanel,ProjectUsagePanel,stars_label,"STAR",,active
|
|
169
|
+
dashboard.projects.limit_label,ui,ProjectUsagePanel,ProjectUsagePanel,limit_label,"Show",,active
|
|
170
|
+
dashboard.projects.limit_aria,ui,ProjectUsagePanel,ProjectUsagePanel,limit_aria,"Select repository limit",,active
|
|
171
|
+
dashboard.projects.limit_top_3,ui,ProjectUsagePanel,ProjectUsagePanel,limit_top_3,"TOP 3",,active
|
|
172
|
+
dashboard.projects.limit_top_6,ui,ProjectUsagePanel,ProjectUsagePanel,limit_top_6,"TOP 6",,active
|
|
173
|
+
dashboard.projects.limit_top_10,ui,ProjectUsagePanel,ProjectUsagePanel,limit_top_10,"TOP 10",,active
|
|
174
|
+
dashboard.projects.empty,ui,ProjectUsagePanel,ProjectUsagePanel,empty,"No public repositories",,active
|
|
175
|
+
dashboard.widgets.title,dashboard,DashboardPage,WidgetOnboardingCard,title,"Desktop Widgets",,active
|
|
176
|
+
dashboard.widgets.hint,dashboard,DashboardPage,WidgetOnboardingCard,hint,"Right-click your desktop → Edit Widgets → search ""TokenTracker""",,active
|
|
177
|
+
dashboard.widgets.dismiss_aria,dashboard,DashboardPage,WidgetOnboardingCard,dismiss_aria,"Dismiss widget intro",,active
|
|
178
|
+
widgets.page.title,dashboard,WidgetsPage,WidgetsPage,title,"Widgets",,active
|
|
179
|
+
widgets.cta.open_gallery,dashboard,WidgetsPage,WidgetsPage,cta_open_gallery,"Open Widget Gallery",,active
|
|
180
|
+
widgets.cta.download,dashboard,WidgetsPage,WidgetsPage,cta_download,"Download Mac App",,active
|
|
181
|
+
widgets.cta.macos_only,dashboard,WidgetsPage,WidgetsPage,cta_macos_only,"macOS only",,active
|
|
182
|
+
widgets.menubar.section.title,dashboard,WidgetsPage,WidgetsPage,menubar_section_title,"Menu Bar",,active
|
|
183
|
+
widgets.gallery.section.title,dashboard,WidgetsPage,WidgetsPage,gallery_section_title,"Desktop Widgets",,active
|
|
184
|
+
widgets.summary.name,dashboard,WidgetsPage,WidgetsPage,summary_name,"Usage Summary",,active
|
|
185
|
+
widgets.summary.description,dashboard,WidgetsPage,WidgetsPage,summary_desc,"Today and seven-day usage with a compact sparkline.",,active
|
|
186
|
+
widgets.heatmap.name,dashboard,WidgetsPage,WidgetsPage,heatmap_name,"Activity Heatmap",,active
|
|
187
|
+
widgets.heatmap.description,dashboard,WidgetsPage,WidgetsPage,heatmap_desc,"GitHub-style daily calendar. Spot streaks and quiet days at a glance.",,active
|
|
188
|
+
widgets.topModels.name,dashboard,WidgetsPage,WidgetsPage,topmodels_name,"Top Models",,active
|
|
189
|
+
widgets.topModels.description,dashboard,WidgetsPage,WidgetsPage,topmodels_desc,"Your heaviest-used models ranked by token share.",,active
|
|
190
|
+
widgets.limits.name,dashboard,WidgetsPage,WidgetsPage,limits_name,"Usage Limits",,active
|
|
191
|
+
widgets.limits.description,dashboard,WidgetsPage,WidgetsPage,limits_desc,"Live rate-limit progress for Claude, Codex, Cursor, Gemini and more.",,active
|
|
192
|
+
dashboard.cost_breakdown.title,ui,CostAnalysisModal,CostAnalysisModal,title,"Cost Breakdown",,active
|
|
193
|
+
dashboard.cost_breakdown.total_label,ui,CostAnalysisModal,CostAnalysisModal,total_label,"Estimated Total Cost",,active
|
|
194
|
+
dashboard.cost_breakdown.close,ui,CostAnalysisModal,CostAnalysisModal,close_label,"Close",,active
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
trend.monitor.label,ui,TrendMonitor,TrendMonitor,label,"Usage Trend",,active
|
|
198
|
+
|
|
199
|
+
heatmap.title,ui,ActivityHeatmap,ActivityHeatmap,title,"Activity Heatmap",,active
|
|
200
|
+
heatmap.empty,ui,ActivityHeatmap,ActivityHeatmap,empty_state,"No activity data yet.",,active
|
|
201
|
+
heatmap.legend.less,ui,ActivityHeatmap,ActivityHeatmap,legend_less,"Less",,active
|
|
202
|
+
heatmap.legend.more,ui,ActivityHeatmap,ActivityHeatmap,legend_more,"More",,active
|
|
203
|
+
heatmap.legend.utc,ui,ActivityHeatmap,ActivityHeatmap,legend_utc,"UTC",,active
|
|
204
|
+
heatmap.tooltip,ui,ActivityHeatmap,ActivityHeatmap,tooltip,"{{day}} • {{value}} {{unit}} • {{tz}}",,active
|
|
205
|
+
heatmap.unit.tokens,ui,ActivityHeatmap,ActivityHeatmap,unit_tokens,"tokens",,active
|
|
206
|
+
heatmap.month.jan,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Jan",,active
|
|
207
|
+
heatmap.month.feb,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Feb",,active
|
|
208
|
+
heatmap.month.mar,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Mar",,active
|
|
209
|
+
heatmap.month.apr,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Apr",,active
|
|
210
|
+
heatmap.month.may,ui,ActivityHeatmap,ActivityHeatmap,month_label,"May",,active
|
|
211
|
+
heatmap.month.jun,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Jun",,active
|
|
212
|
+
heatmap.month.jul,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Jul",,active
|
|
213
|
+
heatmap.month.aug,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Aug",,active
|
|
214
|
+
heatmap.month.sep,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Sep",,active
|
|
215
|
+
heatmap.month.oct,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Oct",,active
|
|
216
|
+
heatmap.month.nov,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Nov",,active
|
|
217
|
+
heatmap.month.dec,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Dec",,active
|
|
218
|
+
heatmap.day.sun,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Sun",,active
|
|
219
|
+
heatmap.day.mon,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Mon",,active
|
|
220
|
+
heatmap.day.tue,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Tue",,active
|
|
221
|
+
heatmap.day.wed,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Wed",,active
|
|
222
|
+
heatmap.day.thu,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Thu",,active
|
|
223
|
+
heatmap.day.fri,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Fri",,active
|
|
224
|
+
heatmap.day.sat,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Sat",,active
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
daily.sort.date.label,dashboard,DashboardPage,DailyTable,sort_label,"Date",,active
|
|
230
|
+
daily.sort.date.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Date",,active
|
|
231
|
+
daily.sort.total.label,dashboard,DashboardPage,DailyTable,sort_label,"Total",,active
|
|
232
|
+
daily.sort.total.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Total",,active
|
|
233
|
+
daily.sort.input.label,dashboard,DashboardPage,DailyTable,sort_label,"Input",,active
|
|
234
|
+
daily.sort.input.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Input",,active
|
|
235
|
+
daily.sort.output.label,dashboard,DashboardPage,DailyTable,sort_label,"Output",,active
|
|
236
|
+
daily.sort.output.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Output",,active
|
|
237
|
+
daily.sort.cached.label,dashboard,DashboardPage,DailyTable,sort_label,"Cached",,active
|
|
238
|
+
daily.sort.cached.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Cached input",,active
|
|
239
|
+
daily.sort.reasoning.label,dashboard,DashboardPage,DailyTable,sort_label,"Reasoning",,active
|
|
240
|
+
daily.sort.reasoning.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Reasoning output",,active
|
|
241
|
+
daily.sort.conversations.label,dashboard,DashboardPage,DailyTable,sort_label,"Convs",,active
|
|
242
|
+
daily.sort.conversations.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Conversations",,active
|
|
243
|
+
details.pagination.prev,dashboard,DashboardPage,DailyTable,pagination_prev,"Prev",,active
|
|
244
|
+
details.pagination.next,dashboard,DashboardPage,DailyTable,pagination_next,"Next",,active
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
leaderboard.profile.nav.back,dashboard,LeaderboardProfilePage,Header,nav_back,"$ Leaderboard",,active
|
|
249
|
+
leaderboard.title,dashboard,LeaderboardPage,LeaderboardPage,title,"Leaderboard",,active
|
|
250
|
+
leaderboard.range,dashboard,LeaderboardPage,LeaderboardPage,range,"UTC {{period}} · {{from}} – {{to}}",,active
|
|
251
|
+
leaderboard.range_loading,dashboard,LeaderboardPage,LeaderboardPage,range_loading,"UTC {{period}} · …",,active
|
|
252
|
+
leaderboard.range.total,dashboard,LeaderboardPage,LeaderboardPage,range_total,"All time",,active
|
|
253
|
+
leaderboard.generated_at,dashboard,LeaderboardPage,LeaderboardPage,generated_at,"Updated {{ts}}",,active
|
|
254
|
+
leaderboard.period.week,dashboard,LeaderboardPage,LeaderboardPage,period_week,"Week",,active
|
|
255
|
+
leaderboard.period.month,dashboard,LeaderboardPage,LeaderboardPage,period_month,"Month",,active
|
|
256
|
+
leaderboard.period.total,dashboard,LeaderboardPage,LeaderboardPage,period_total,"All",,active
|
|
257
|
+
|
|
258
|
+
leaderboard.me_label,dashboard,LeaderboardPage,LeaderboardPage,me_label,"You",,active
|
|
259
|
+
leaderboard.anon_label,dashboard,LeaderboardPage,LeaderboardPage,anon_label,"Anonymous",,active
|
|
260
|
+
leaderboard.error.unknown,dashboard,LeaderboardPage,LeaderboardPage,error_unknown,"Unknown error",,active
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
leaderboard.loading,dashboard,LeaderboardPage,LeaderboardPage,state_loading,"Loading…",,active
|
|
265
|
+
leaderboard.empty,dashboard,LeaderboardPage,LeaderboardPage,state_empty,"No data",,active
|
|
266
|
+
|
|
267
|
+
leaderboard.column.rank,dashboard,LeaderboardPage,LeaderboardPage,column_rank,"Rank",,active
|
|
268
|
+
leaderboard.column.user,dashboard,LeaderboardPage,LeaderboardPage,column_user,"User",,active
|
|
269
|
+
leaderboard.column.total,dashboard,LeaderboardPage,LeaderboardPage,column_total,"Total",,active
|
|
270
|
+
leaderboard.column.codex,dashboard,LeaderboardPage,LeaderboardPage,column_codex,"Codex",,active
|
|
271
|
+
leaderboard.column.claude,dashboard,LeaderboardPage,LeaderboardPage,column_claude,"Claude",,active
|
|
272
|
+
leaderboard.column.gemini,dashboard,LeaderboardPage,LeaderboardPage,column_gemini,"Gemini",,active
|
|
273
|
+
leaderboard.column.cursor,dashboard,LeaderboardPage,LeaderboardPage,column_cursor,"Cursor",,active
|
|
274
|
+
leaderboard.column.opencode,dashboard,LeaderboardPage,LeaderboardPage,column_opencode,"OpenCode",,active
|
|
275
|
+
leaderboard.column.openclaw,dashboard,LeaderboardPage,LeaderboardPage,column_openclaw,"OpenClaw",,active
|
|
276
|
+
leaderboard.column.hermes,dashboard,LeaderboardPage,LeaderboardPage,column_hermes,"Hermes",,active
|
|
277
|
+
leaderboard.column.kiro,dashboard,LeaderboardPage,LeaderboardPage,column_kiro,"Kiro",,active
|
|
278
|
+
leaderboard.column.copilot,dashboard,LeaderboardPage,LeaderboardPage,column_copilot,"GitHub Copilot",,active
|
|
279
|
+
leaderboard.column.kimi,dashboard,LeaderboardPage,LeaderboardPage,column_kimi,"Kimi Code",,active
|
|
280
|
+
leaderboard.column.kilo-cli,dashboard,LeaderboardPage,LeaderboardPage,column_kilo_cli,"Kilo CLI",,active
|
|
281
|
+
leaderboard.column.kilo-code,dashboard,LeaderboardPage,LeaderboardPage,column_kilo_code,"Kilo Code",,active
|
|
282
|
+
limits.copilot.otelHint.title,dashboard,LimitsPage,LimitsPage,otel_hint_title,"Track Copilot token usage",,active
|
|
283
|
+
limits.copilot.otelHint.body,dashboard,LimitsPage,LimitsPage,otel_hint_body,"Limits load via your GitHub OAuth token. To also record per-token usage, enable Copilot's OpenTelemetry export and add these lines to your shell profile (~/.zshrc or ~/.bashrc):",,active
|
|
284
|
+
limits.copilot.otelHint.copy,dashboard,LimitsPage,LimitsPage,otel_hint_copy,"Copy",,active
|
|
285
|
+
limits.copilot.otelHint.copied,dashboard,LimitsPage,LimitsPage,otel_hint_copied,"Copied",,active
|
|
286
|
+
leaderboard.column.supplemental,dashboard,LeaderboardPage,LeaderboardPage,column_supplemental,"Supplemental",,active
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
leaderboard.pagination.prev,dashboard,LeaderboardPage,LeaderboardPage,pagination_prev,"Previous",,active
|
|
290
|
+
leaderboard.pagination.next,dashboard,LeaderboardPage,LeaderboardPage,pagination_next,"Next",,active
|
|
291
|
+
leaderboard.pagination.ellipsis,dashboard,LeaderboardPage,LeaderboardPage,pagination_ellipsis,"…",,active
|
|
292
|
+
leaderboard.pagination.page_unknown,dashboard,LeaderboardPage,LeaderboardPage,pagination_unknown,"Page {{page}}",,active
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
dashboard.session_expired.copy_label,dashboard,DashboardPage,AsciiBox,body,"run npx --yes tokentracker-cli init",,active
|
|
298
|
+
dashboard.session_expired.copied,dashboard,DashboardPage,AsciiBox,body,"copied",,active
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
dashboard.install.prompt,dashboard,DashboardPage,AsciiBox,install_prompt,"Install Node.js 18+ then run:",,active
|
|
302
|
+
dashboard.install.cmd.init,dashboard,DashboardPage,AsciiBox,install_cmd,"npx --yes tokentracker-cli init",,active
|
|
303
|
+
dashboard.install.cmd.init_link_code,dashboard,DashboardPage,AsciiBox,install_cmd,"npx --yes tokentracker-cli init --link-code {{link_code}}",,active
|
|
304
|
+
dashboard.install.copy,dashboard,DashboardPage,AsciiBox,install_copy,"Copy install command",,active
|
|
305
|
+
dashboard.install.copy_base,dashboard,DashboardPage,AsciiBox,install_copy,"Copy init command",,active
|
|
306
|
+
dashboard.install.copied,dashboard,DashboardPage,AsciiBox,install_copy,"Copied to clipboard",,active
|
|
307
|
+
dashboard.install.link_code.loading,dashboard,DashboardPage,AsciiBox,install_status,"Generating private code...",,active
|
|
308
|
+
dashboard.install.link_code.failed,dashboard,DashboardPage,AsciiBox,install_status,"Private code unavailable",,active
|
|
309
|
+
dashboard.install.cmd.sync,dashboard,DashboardPage,AsciiBox,install_cmd,"npx --yes tokentracker-cli sync",,active
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
dashboard.daily.title,dashboard,DashboardPage,AsciiBox,title,"Daily Breakdown",,active
|
|
314
|
+
dashboard.daily.empty,dashboard,DashboardPage,AsciiBox,empty_state,"No data yet. Use your AI CLI then run {{cmd}}.",,active
|
|
315
|
+
|
|
316
|
+
dashboard.identity.title,dashboard,DashboardPage,IdentityCard,title,"Your Profile",,active
|
|
317
|
+
dashboard.identity.subtitle,dashboard,DashboardPage,IdentityCard,subtitle,"Track your coding journey",,active
|
|
318
|
+
dashboard.identity.fallback,dashboard,DashboardPage,IdentityCard,handle_fallback,"Anonymous",,active
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
dashboard.screenshot.title_line1,dashboard,DashboardPage,ScreenshotTitle,title_line,"Coding Agent",,active
|
|
322
|
+
dashboard.screenshot.title_line2,dashboard,DashboardPage,ScreenshotTitle,title_line,"2025 Wrapped",,active
|
|
323
|
+
dashboard.screenshot.twitter_button,dashboard,DashboardPage,ScreenshotShare,button_label,"Share on X",,active
|
|
324
|
+
dashboard.screenshot.twitter_label,dashboard,DashboardPage,ScreenshotShare,aria_label,"Share on X",,active
|
|
325
|
+
dashboard.screenshot.twitter_hint,dashboard,DashboardPage,ScreenshotShare,helper_text,"Auto-copies image to clipboard",,active
|
|
326
|
+
dashboard.screenshot.twitter_text,dashboard,DashboardPage,ScreenshotShare,share_text,"{{total_tokens}} tokens on the record.\\n{{model_name}} led with {{model_percent}}%.\\n\\nMy AI usage, unaudited →\\ntokentracker.cc",,active
|
|
327
|
+
|
|
328
|
+
nav.usage,shared,*,Sidebar,nav_usage,"Tokens",,active
|
|
329
|
+
nav.limits,shared,*,Sidebar,nav_limits,"Limits",,active
|
|
330
|
+
nav.widgets,shared,*,Sidebar,nav_widgets,"macOS Widgets",,active
|
|
331
|
+
nav.leaderboard,shared,*,Sidebar,nav_leaderboard,"Leaderboard",,active
|
|
332
|
+
nav.collapse,shared,*,Sidebar,nav_collapse,"Collapse sidebar",,active
|
|
333
|
+
nav.expand,shared,*,Sidebar,nav_expand,"Expand sidebar",,active
|
|
334
|
+
nav.menu,shared,*,Sidebar,nav_menu,"Open navigation menu",,active
|
|
335
|
+
nav.close_menu,shared,*,Sidebar,nav_close_menu,"Close navigation menu",,active
|
|
336
|
+
nav.aside_label,shared,*,Sidebar,aside_label,"Main navigation",,active
|
|
337
|
+
nav.nav_label,shared,*,Sidebar,nav_label,"Primary",,active
|
|
338
|
+
limits.page.subtitle,ui,LimitsPage,LimitsPage,subtitle,"Rate limits and quota usage across your AI tools.",,active
|
|
339
|
+
limits.settings.toggle_visible,ui,LimitsPage,LimitsSettingsPanel,toggle_visible,"Toggle visibility",,active
|
|
340
|
+
limits.page.openSettings,ui,LimitsPage,LimitsPage,open_settings,"Display settings",,active
|
|
341
|
+
nav.group.general,shared,*,Sidebar,group_general,"General",,active
|
|
342
|
+
nav.group.tools,shared,*,Sidebar,group_tools,"Tools",,active
|
|
343
|
+
nav.group.account,shared,*,Sidebar,group_account,"Account",,active
|
|
344
|
+
nav.settings,shared,*,Sidebar,nav_settings,"Settings",,active
|
|
345
|
+
header.auth.open_settings,shared,*,InsforgeUserHeaderControls,open_settings,"Open settings",,active
|
|
346
|
+
settings.page.title,ui,SettingsPage,SettingsPage,title,"Settings",,active
|
|
347
|
+
settings.page.subtitle,ui,SettingsPage,SettingsPage,subtitle,"Manage your account, appearance, and display preferences.",,active
|
|
348
|
+
settings.section.appearance,ui,SettingsPage,SettingsPage,sec_appearance,"Appearance",,active
|
|
349
|
+
settings.section.account,ui,SettingsPage,SettingsPage,sec_account,"Account",,active
|
|
350
|
+
settings.section.limits,ui,SettingsPage,SettingsPage,sec_limits,"Limits Display",,active
|
|
351
|
+
settings.appearance.theme.label,ui,SettingsPage,SettingsPage,theme_label,"Theme",,active
|
|
352
|
+
settings.appearance.theme.hint,ui,SettingsPage,SettingsPage,theme_hint,"Choose how Token Tracker looks across the dashboard.",,active
|
|
353
|
+
settings.appearance.theme.light,ui,SettingsPage,SettingsPage,theme_light,"Light",,active
|
|
354
|
+
settings.appearance.theme.dark,ui,SettingsPage,SettingsPage,theme_dark,"Dark",,active
|
|
355
|
+
settings.appearance.theme.system,ui,SettingsPage,SettingsPage,theme_system,"System",,active
|
|
356
|
+
settings.account.displayName,ui,SettingsPage,SettingsPage,display_name,"Display name",,active
|
|
357
|
+
settings.account.edit,ui,SettingsPage,SettingsPage,edit,"Edit",,active
|
|
358
|
+
settings.account.save,ui,SettingsPage,SettingsPage,save,"Save",,active
|
|
359
|
+
settings.account.saving,ui,SettingsPage,SettingsPage,saving,"Saving...",,active
|
|
360
|
+
settings.account.cancel,ui,SettingsPage,SettingsPage,cancel,"Cancel",,active
|
|
361
|
+
settings.account.cloudSync,ui,SettingsPage,SettingsPage,cloud_sync,"Cloud sync",,active
|
|
362
|
+
settings.account.cloudSyncHint,ui,SettingsPage,SettingsPage,cloud_sync_hint,"Upload local usage to your Token Tracker cloud account.",,active
|
|
363
|
+
settings.account.publicProfile,ui,SettingsPage,SettingsPage,public_profile,"Public profile",,active
|
|
364
|
+
settings.account.publicProfileHint,ui,SettingsPage,SettingsPage,public_profile_hint,"Show your usage on the public leaderboard.",,active
|
|
365
|
+
settings.account.displayNameAnonymousHint,ui,SettingsPage,SettingsPage,display_name_anon_hint,"Anonymous — your name and avatar are hidden on the leaderboard",,active
|
|
366
|
+
settings.account.displayNameDisabledWhileAnon,ui,SettingsPage,SettingsPage,display_name_disabled,"Turn on the switch first to edit your name",,active
|
|
367
|
+
settings.account.githubUrl,ui,SettingsPage,SettingsPage,github_url,"GitHub profile",,active
|
|
368
|
+
settings.account.githubUrlHint,ui,SettingsPage,SettingsPage,github_url_hint,"Show a GitHub link next to your name on the leaderboard.",,active
|
|
369
|
+
settings.account.githubUrlPlaceholder,ui,SettingsPage,SettingsPage,github_url_placeholder,"username or https://github.com/username",,active
|
|
370
|
+
settings.account.githubUrlInvalid,ui,SettingsPage,SettingsPage,github_url_invalid,"Use a GitHub username or https://github.com/username URL.",,active
|
|
371
|
+
leaderboard.github.aria,ui,LeaderboardPage,LeaderboardPage,github_aria,"Open GitHub profile",,active
|
|
372
|
+
auth.callback.processing,ui,*,NativeAuthCallbackPage,processing,"Processing…",,active
|
|
373
|
+
auth.callback.success,ui,*,NativeAuthCallbackPage,success,"Signed in successfully",,active
|
|
374
|
+
auth.callback.redirecting,ui,*,NativeAuthCallbackPage,redirecting,"Returning to TokenTracker…",,active
|
|
375
|
+
auth.callback.failed,ui,*,NativeAuthCallbackPage,failed,"Sign-in incomplete. Please try again.",,active
|
|
376
|
+
auth.callback.close,ui,*,NativeAuthCallbackPage,close,"Close this page",,active
|
|
377
|
+
stats.period.today,ui,DashboardPage,StatsPanel,period_today,"today",,active
|
|
378
|
+
stats.period.week,ui,DashboardPage,StatsPanel,period_week,"week",,active
|
|
379
|
+
stats.period.month,ui,DashboardPage,StatsPanel,period_month,"month",,active
|
|
380
|
+
stats.period.all,ui,DashboardPage,StatsPanel,period_all,"all",,active
|
|
381
|
+
stats.period.convs,ui,DashboardPage,StatsPanel,period_convs,"convs",,active
|
|
382
|
+
leaderboard.column.est_cost,ui,LeaderboardPage,LeaderboardPage,column_est_cost,"Est. Cost",,active
|
|
383
|
+
leaderboard.signin_prompt,ui,LeaderboardPage,LeaderboardPage,signin_prompt,"Sign in to join the leaderboard",,active
|
|
384
|
+
leaderboard.signin_button,ui,LeaderboardPage,LeaderboardPage,signin_button,"Sign In",,active
|
|
385
|
+
leaderboard.sync_prompt,ui,LeaderboardPage,LeaderboardPage,sync_prompt,"Enable Cloud Sync to appear in rankings",,active
|
|
386
|
+
leaderboard.sync_button.idle,ui,LeaderboardPage,LeaderboardPage,sync_button_idle,"Enable & Sync",,active
|
|
387
|
+
leaderboard.sync_button.busy,ui,LeaderboardPage,LeaderboardPage,sync_button_busy,"Syncing...",,active
|
|
388
|
+
leaderboard.pagination.page_size_label,ui,LeaderboardPage,LeaderboardPage,page_size_label,"Rows per page",,active
|
|
389
|
+
leaderboard.github.tooltipAction,ui,LeaderboardPage,LeaderboardPage,github_tooltip_action,"Click to open GitHub profile",,active
|
|
390
|
+
leaderboard.github.tooltipPrefix,ui,LeaderboardPage,LeaderboardPage,github_tooltip_prefix,"Set yours in",,active
|
|
391
|
+
leaderboard.github.tooltipSettingsLink,ui,LeaderboardPage,LeaderboardPage,github_tooltip_link,"Settings",,active
|
|
392
|
+
leaderboard.github.tooltipSuffix,ui,LeaderboardPage,LeaderboardPage,github_tooltip_suffix," to appear here",,active
|
|
393
|
+
settings.account.signOut,ui,SettingsPage,SettingsPage,sign_out,"Sign out",,active
|
|
394
|
+
settings.account.signIn,ui,SettingsPage,SettingsPage,sign_in,"Sign in",,active
|
|
395
|
+
settings.account.signedOutHint,ui,SettingsPage,SettingsPage,signed_out_hint,"Sign in to manage cloud sync and leaderboard preferences.",,active
|
|
396
|
+
settings.section.menubar,ui,SettingsPage,SettingsPage,sec_menubar,"Menu Bar App",,active
|
|
397
|
+
settings.menubar.showStats,ui,SettingsPage,SettingsPage,mb_show_stats,"Show stats in menu bar",,active
|
|
398
|
+
settings.menubar.showStatsHint,ui,SettingsPage,SettingsPage,mb_show_stats_hint,"Display today's token count and cost beside the menu bar icon.",,active
|
|
399
|
+
settings.menubar.animatedIcon,ui,SettingsPage,SettingsPage,mb_anim,"Animated icon",,active
|
|
400
|
+
settings.menubar.animatedIconHint,ui,SettingsPage,SettingsPage,mb_anim_hint,"Blink the Clawd character and play the syncing animation in the menu bar.",,active
|
|
401
|
+
settings.menubar.launchAtLogin,ui,SettingsPage,SettingsPage,mb_login,"Launch at login",,active
|
|
402
|
+
settings.menubar.launchAtLoginHint,ui,SettingsPage,SettingsPage,mb_login_hint,"Start TokenTrackerBar automatically when you sign in to macOS.",,active
|
|
403
|
+
settings.menubar.syncNow,ui,SettingsPage,SettingsPage,mb_sync_now,"Sync now",,active
|
|
404
|
+
settings.menubar.syncNowHint,ui,SettingsPage,SettingsPage,mb_sync_now_hint,"Trigger an immediate parse and upload of local AI tool logs.",,active
|
|
405
|
+
settings.menubar.syncing,ui,SettingsPage,SettingsPage,mb_syncing,"Syncing…",,active
|
|
406
|
+
settings.menubar.updates,ui,SettingsPage,SettingsPage,mb_updates,"Updates",,active
|
|
407
|
+
settings.menubar.checkUpdates,ui,SettingsPage,SettingsPage,mb_check_updates,"Check for updates",,active
|
|
408
|
+
menubar.slot.primary,ui,WidgetsPage,MenuBarDisplayCard,slot_primary,"Primary slot",,active
|
|
409
|
+
menubar.slot.secondary,ui,WidgetsPage,MenuBarDisplayCard,slot_secondary,"Secondary slot",,active
|
|
410
|
+
menubar.native_only,ui,WidgetsPage,MenuBarDisplayCard,native_only,"Open TokenTrackerBar for macOS to edit the live menu bar display.",,active
|
|
411
|
+
menubar.metric.today_tokens,ui,WidgetsPage,MenuBarDisplayCard,metric_today_tokens,"Today Tokens",,active
|
|
412
|
+
menubar.metric.today_cost,ui,WidgetsPage,MenuBarDisplayCard,metric_today_cost,"Today Cost",,active
|
|
413
|
+
menubar.metric.last_7d_tokens,ui,WidgetsPage,MenuBarDisplayCard,metric_last_7d,"Last 7 Days",,active
|
|
414
|
+
menubar.metric.total_tokens,ui,WidgetsPage,MenuBarDisplayCard,metric_total_tokens,"Total Tokens",,active
|
|
415
|
+
menubar.metric.total_cost,ui,WidgetsPage,MenuBarDisplayCard,metric_total_cost,"Total Cost",,active
|
|
416
|
+
menubar.metric.claude_5h,ui,WidgetsPage,MenuBarDisplayCard,metric_claude_5h,"Claude 5h Limit",,active
|
|
417
|
+
menubar.metric.claude_7d,ui,WidgetsPage,MenuBarDisplayCard,metric_claude_7d,"Claude 7d Limit",,active
|
|
418
|
+
menubar.metric.codex_5h,ui,WidgetsPage,MenuBarDisplayCard,metric_codex_5h,"Codex 5h Limit",,active
|
|
419
|
+
menubar.metric.codex_7d,ui,WidgetsPage,MenuBarDisplayCard,metric_codex_7d,"Codex 7d Limit",,active
|
|
420
|
+
share.modal.title,share,DashboardPage,ShareModal,title,"Share your stats",,active
|
|
421
|
+
share.modal.subtitle,share,DashboardPage,ShareModal,subtitle,"Generate a poster-style card and share anywhere.",,active
|
|
422
|
+
share.modal.close,share,DashboardPage,ShareModal,close,"Close",,active
|
|
423
|
+
share.modal.action.x,share,DashboardPage,ShareModal,action_x,"Share on X",,active
|
|
424
|
+
share.modal.action.download,share,DashboardPage,ShareModal,action_download,"Download",,active
|
|
425
|
+
share.modal.action.copy,share,DashboardPage,ShareModal,action_copy,"Copy image",,active
|
|
426
|
+
share.modal.hint.x,share,DashboardPage,ShareModal,hint_x,"Paste image in tweet",,active
|
|
427
|
+
share.modal.hint.copy,share,DashboardPage,ShareModal,hint_copy,"to clipboard",,active
|
|
428
|
+
share.modal.name_label,share,DashboardPage,ShareModal,name_label,"Display name",,active
|
|
429
|
+
share.modal.name_placeholder,share,DashboardPage,ShareModal,name_placeholder,"Enter your name",,active
|
|
430
|
+
share.modal.footer,share,DashboardPage,ShareModal,footer,"Your data stays local — images are generated in your browser and never uploaded.",,active
|
|
431
|
+
share.button.label,share,DashboardPage,DashboardHeader,share_button,"Share",,active
|
|
432
|
+
share.button.aria,share,DashboardPage,DashboardHeader,share_button_aria,"Open share card",,active
|
|
433
|
+
share.toast.copied,share,DashboardPage,ShareModal,toast_copied,"Image copied to clipboard",,active
|
|
434
|
+
share.toast.downloaded,share,DashboardPage,ShareModal,toast_downloaded,"Image saved",,active
|
|
435
|
+
share.toast.failed,share,DashboardPage,ShareModal,toast_failed,"Couldn't generate image",,active
|
|
436
|
+
share.toast.working,share,DashboardPage,ShareModal,toast_working,"Generating…",,active
|
|
437
|
+
share.modal.style_label,share,DashboardPage,ShareModal,style_label,"Style",,active
|
|
438
|
+
share.variant.neon,share,DashboardPage,ShareModal,variant_neon,"Neon",,active
|
|
439
|
+
share.variant.broadsheet,share,DashboardPage,ShareModal,variant_broadsheet,"Broadsheet",,active
|
|
440
|
+
share.date.month_year,share,DashboardPage,ShareCard,date_month_year,"{{month}} {{year}}",,active
|
|
441
|
+
share.issue.all_time,share,DashboardPage,ShareCard,issue_all_time,"ALL TIME",,active
|
|
442
|
+
share.month_short.jan,share,DashboardPage,ShareCard,month_short,"JAN",,active
|
|
443
|
+
share.month_short.feb,share,DashboardPage,ShareCard,month_short,"FEB",,active
|
|
444
|
+
share.month_short.mar,share,DashboardPage,ShareCard,month_short,"MAR",,active
|
|
445
|
+
share.month_short.apr,share,DashboardPage,ShareCard,month_short,"APR",,active
|
|
446
|
+
share.month_short.may,share,DashboardPage,ShareCard,month_short,"MAY",,active
|
|
447
|
+
share.month_short.jun,share,DashboardPage,ShareCard,month_short,"JUN",,active
|
|
448
|
+
share.month_short.jul,share,DashboardPage,ShareCard,month_short,"JUL",,active
|
|
449
|
+
share.month_short.aug,share,DashboardPage,ShareCard,month_short,"AUG",,active
|
|
450
|
+
share.month_short.sep,share,DashboardPage,ShareCard,month_short,"SEP",,active
|
|
451
|
+
share.month_short.oct,share,DashboardPage,ShareCard,month_short,"OCT",,active
|
|
452
|
+
share.month_short.nov,share,DashboardPage,ShareCard,month_short,"NOV",,active
|
|
453
|
+
share.month_short.dec,share,DashboardPage,ShareCard,month_short,"DEC",,active
|
|
454
|
+
share.hook.top_loyal,share,DashboardPage,ShareCard,hook_top_loyal,"{{percent}}% loyal to {{name}}.",,active
|
|
455
|
+
share.hook.days_record,share,DashboardPage,ShareCard,hook_days_record,"{{days}} days on the record.",,active
|
|
456
|
+
share.hook.top_led,share,DashboardPage,ShareCard,hook_top_led,"Led by {{name}} ({{percent}}%).",,active
|
|
457
|
+
share.hook.multi_models,share,DashboardPage,ShareCard,hook_multi_models,"Across {{count}} models, {{days}} days.",,active
|
|
458
|
+
share.hook.days_with_model,share,DashboardPage,ShareCard,hook_days_with_model,"{{days}} days with {{name}}.",,active
|
|
459
|
+
share.hook.new_chapter,share,DashboardPage,ShareCard,hook_new_chapter,"The beginning of a new chapter.",,active
|
|
460
|
+
share.card.broadsheet.issue,share,DashboardPage,BroadsheetCard,issue_label,"Issue",,active
|
|
461
|
+
share.card.broadsheet.by,share,DashboardPage,BroadsheetCard,by_label,"By",,active
|
|
462
|
+
share.card.broadsheet.tracked_since,share,DashboardPage,BroadsheetCard,tracked_since,"Tracked since",,active
|
|
463
|
+
share.card.broadsheet.total_tokens,share,DashboardPage,BroadsheetCard,total_tokens,"Total tokens",,active
|
|
464
|
+
share.card.broadsheet.estimated_spend,share,DashboardPage,BroadsheetCard,estimated_spend,"Estimated spend",,active
|
|
465
|
+
share.card.broadsheet.billable_days,share,DashboardPage,BroadsheetCard,billable_days,"{{days}} billable days",,active
|
|
466
|
+
share.card.broadsheet.heatmap_title,share,DashboardPage,BroadsheetCard,heatmap_title,"The Year in Print",,active
|
|
467
|
+
share.card.broadsheet.heatmap_days_on_record,share,DashboardPage,BroadsheetCard,heatmap_days,"{{active}} / {{total}} days on record",,active
|
|
468
|
+
share.card.broadsheet.roster_title,share,DashboardPage,BroadsheetCard,roster_title,"The Roster",,active
|
|
469
|
+
share.card.broadsheet.roster_subtitle,share,DashboardPage,BroadsheetCard,roster_subtitle,"Models in regular rotation",,active
|
|
470
|
+
share.card.broadsheet.empty,share,DashboardPage,BroadsheetCard,empty,"An empty week — the press was quiet.",,active
|
|
471
|
+
share.card.broadsheet.global_rank,share,DashboardPage,BroadsheetCard,global_rank,"Global rank",,active
|
|
472
|
+
share.card.broadsheet.active_days,share,DashboardPage,BroadsheetCard,active_days,"Active",,active
|
|
473
|
+
share.card.broadsheet.days_count,share,DashboardPage,BroadsheetCard,days_count,"{{days}} days",,active
|
|
474
|
+
share.card.broadsheet.track_yours,share,DashboardPage,BroadsheetCard,track_yours,"Track yours",,active
|
|
475
|
+
share.card.annual.report_title,share,DashboardPage,AnnualReportCard,report_title,"Token Report",,active
|
|
476
|
+
share.card.annual.less,share,DashboardPage,AnnualReportCard,legend_less,"Less",,active
|
|
477
|
+
share.card.annual.more,share,DashboardPage,AnnualReportCard,legend_more,"More",,active
|
|
478
|
+
share.card.annual.heatmap_title,share,DashboardPage,AnnualReportCard,heatmap_title,"TOKEN USAGE HEATMAP",,active
|
|
479
|
+
share.card.annual.total_tokens,share,DashboardPage,AnnualReportCard,total_tokens,"Total Tokens",,active
|
|
480
|
+
share.card.annual.estimated_cost,share,DashboardPage,AnnualReportCard,estimated_cost,"Estimated Cost",,active
|
|
481
|
+
share.card.annual.longest_streak,share,DashboardPage,AnnualReportCard,longest_streak,"Longest Streak",,active
|
|
482
|
+
share.card.annual.days_count,share,DashboardPage,AnnualReportCard,days_count,"{{days}} days",,active
|
|
483
|
+
share.card.annual.top_model,share,DashboardPage,AnnualReportCard,top_model,"Top Model",,active
|
|
484
|
+
usage.period.day,ui,DashboardPage,UsageOverview,period_day,"Day",,active
|
|
485
|
+
usage.period.week,ui,DashboardPage,UsageOverview,period_week,"Week",,active
|
|
486
|
+
usage.period.month,ui,DashboardPage,UsageOverview,period_month,"Month",,active
|
|
487
|
+
usage.period.total,ui,DashboardPage,UsageOverview,period_total,"Total",,active
|
|
488
|
+
usage.period.custom,ui,DashboardPage,UsageOverview,period_custom,"Custom",,active
|
|
489
|
+
usage.overview.tablist_aria,ui,DashboardPage,UsageOverview,tablist_aria,"Time period",,active
|
|
490
|
+
usage.overview.cost_breakdown_aria,ui,DashboardPage,UsageOverview,cost_breakdown_aria,"View cost breakdown",,active
|
|
491
|
+
usage.overview.distribution_aria,ui,DashboardPage,UsageOverview,distribution_aria,"Provider distribution: {{items}}",,active
|
|
492
|
+
usage.overview.distribution_item,ui,DashboardPage,UsageOverview,distribution_item,"{{label}} {{percent}}%",,active
|
|
493
|
+
usage.overview.provider_card_aria,ui,DashboardPage,UsageOverview,provider_card_aria,"{{provider}}: {{percent}}%, {{tokens}} tokens, {{cost}}. Click to {{action}} details",,active
|
|
494
|
+
usage.overview.expand,ui,DashboardPage,UsageOverview,expand,"expand",,active
|
|
495
|
+
usage.overview.collapse,ui,DashboardPage,UsageOverview,collapse,"collapse",,active
|
|
496
|
+
usage.overview.model_count,ui,DashboardPage,UsageOverview,model_count,"{{count}} models",,active
|
|
497
|
+
usage.overview.model_details_aria,ui,DashboardPage,UsageOverview,model_details_aria,"{{provider}} model details",,active
|
|
498
|
+
limits.panel.title,ui,LimitsPage,UsageLimitsPanel,title,"Usage Limits",,active
|
|
499
|
+
limits.label.cursor_plan,ui,LimitsPage,UsageLimitsPanel,cursor_plan,"Plan",,active
|
|
500
|
+
limits.label.cursor_auto,ui,LimitsPage,UsageLimitsPanel,cursor_auto,"Auto",,active
|
|
501
|
+
limits.label.cursor_api,ui,LimitsPage,UsageLimitsPanel,cursor_api,"API",,active
|
|
502
|
+
limits.label.kiro_month,ui,LimitsPage,UsageLimitsPanel,kiro_month,"Month",,active
|
|
503
|
+
limits.label.kiro_bonus,ui,LimitsPage,UsageLimitsPanel,kiro_bonus,"Bonus",,active
|
|
504
|
+
limits.label.kimi_weekly,ui,LimitsPage,UsageLimitsPanel,kimi_weekly,"Weekly",,active
|
|
505
|
+
limits.label.kimi_5h,ui,LimitsPage,UsageLimitsPanel,kimi_5h,"5h",,active
|
|
506
|
+
limits.label.kimi_total,ui,LimitsPage,UsageLimitsPanel,kimi_total,"Total",,active
|
|
507
|
+
limits.label.kimi_parallel,ui,LimitsPage,UsageLimitsPanel,kimi_parallel,"Parallel: {{count}}",,active
|
|
508
|
+
limits.label.copilot_premium,ui,LimitsPage,UsageLimitsPanel,copilot_premium,"Premium",,active
|
|
509
|
+
limits.label.copilot_chat,ui,LimitsPage,UsageLimitsPanel,copilot_chat,"Chat",,active
|
|
510
|
+
limits.status.not_connected,ui,LimitsPage,UsageLimitsPanel,status_not_connected,"Not connected",,active
|
|
511
|
+
limits.status.no_data,ui,LimitsPage,UsageLimitsPanel,status_no_data,"No live limit data returned",,active
|
|
512
|
+
limits.status.all_hidden,ui,LimitsPage,UsageLimitsPanel,status_all_hidden,"All limit providers are hidden. Open display settings to show them.",,active
|
|
513
|
+
shared.time.now,shared,*,Shared,time_now,"now",,active
|
|
514
|
+
nav.ip_check,shared,*,Sidebar,nav_ip_check,Claude IP Check,,active
|
|
515
|
+
nav.skills,shared,*,Sidebar,nav_skills,Skills,,active
|
|
516
|
+
skills.page.title,ui,SkillsPage,SkillsPage,title,Skills,,active
|
|
517
|
+
skills.tab.my,ui,SkillsPage,SkillsPage,tab_my,My Skills,,active
|
|
518
|
+
skills.tab.browse,ui,SkillsPage,SkillsPage,tab_browse,Browse,,active
|
|
519
|
+
skills.action.refresh,ui,SkillsPage,SkillsPage,action_refresh,Refresh,,active
|
|
520
|
+
skills.action.install,ui,SkillsPage,SkillCard,action_install,Install,,active
|
|
521
|
+
skills.action.install_to,ui,SkillsPage,SkillCard,action_install_to,"Install to {{count}} Agents",,active
|
|
522
|
+
skills.action.choose_targets,ui,SkillsPage,SkillCard,action_choose_targets,"Choose targets",,active
|
|
523
|
+
skills.target.menu_label,ui,SkillsPage,SkillCard,target_menu_label,"Install to",,active
|
|
524
|
+
skills.target.none,ui,SkillsPage,SkillsPage,target_none,"no targets",,active
|
|
525
|
+
skills.toast.installed,ui,SkillsPage,SkillsPage,toast_installed,"Installed {{name}} to {{targets}}.",,active
|
|
526
|
+
skills.action.remove,ui,SkillsPage,SkillsPage,action_remove,Remove,,active
|
|
527
|
+
skills.action.search,ui,SkillsPage,SkillsPage,action_search,Search,,active
|
|
528
|
+
skills.card.installed,ui,SkillsPage,SkillCard,card_installed,Installed,,active
|
|
529
|
+
skills.my.count,ui,SkillsPage,SkillsPage,my_count,"{{count}} skills",,active
|
|
530
|
+
skills.target.toggle_aria,ui,SkillsPage,InstalledSkillRow,target_toggle_aria,"Toggle {{target}}",,active
|
|
531
|
+
skills.target.sync_title,ui,SkillsPage,InstalledSkillRow,target_sync_title,"Enable in {{target}}",,active
|
|
532
|
+
skills.target.remove_title,ui,SkillsPage,InstalledSkillRow,target_remove_title,"Disable in {{target}}",,active
|
|
533
|
+
skills.card.installs,ui,SkillsPage,SkillCard,installs,"{{count}} installs",,active
|
|
534
|
+
skills.source.label,ui,SkillsPage,SkillsPage,source_label,Source,,active
|
|
535
|
+
skills.source.all,ui,SkillsPage,SkillsPage,source_all,All repositories,,active
|
|
536
|
+
skills.mode.repo,ui,SkillsPage,SkillsPage,mode_repo,Repositories,,active
|
|
537
|
+
skills.mode.skillssh,ui,SkillsPage,SkillsPage,mode_skillssh,skills.sh,,active
|
|
538
|
+
skills.browse.placeholder_all,ui,SkillsPage,SkillsPage,browse_placeholder_all,"Search across enabled repositories…",,active
|
|
539
|
+
skills.browse.placeholder_repo,ui,SkillsPage,SkillsPage,browse_placeholder_repo,"Search in {{repo}}…",,active
|
|
540
|
+
skills.browse.placeholder_skillssh,ui,SkillsPage,SkillsPage,browse_placeholder_skillssh,"Search the skills.sh registry…",,active
|
|
541
|
+
skills.browse.empty_sources,ui,SkillsPage,SkillsPage,browse_empty_sources,"Add a GitHub repository below to start browsing skills.",,active
|
|
542
|
+
skills.browse.manage_sources,ui,SkillsPage,SkillsPage,browse_manage_sources,Manage sources,,active
|
|
543
|
+
skills.browse.hint_skillssh,ui,SkillsPage,SkillsPage,browse_hint_skillssh,"Type at least 2 characters to search skills.sh.",,active
|
|
544
|
+
skills.browse.loading_hint,ui,SkillsPage,SkillsPage,browse_loading_hint,"Fetching skill metadata from GitHub. First load can take up to a minute; results are cached.",,active
|
|
545
|
+
skills.error.generic,ui,SkillsPage,SkillsPage,error_generic,"Skill operation failed.",,active
|
|
546
|
+
skills.confirm.remove_title,ui,SkillsPage,SkillsPage,confirm_remove_title,"Remove {{name}}?",,active
|
|
547
|
+
skills.confirm.remove_managed,ui,SkillsPage,SkillsPage,confirm_remove_managed,"This skill will be removed from every connected AI tool. You'll have a few seconds to undo.",,active
|
|
548
|
+
skills.confirm.remove_local,ui,SkillsPage,SkillsPage,confirm_remove_local,"This will delete the skill folder on disk from every connected AI tool. This cannot be undone.",,active
|
|
549
|
+
skills.toast.removed,ui,SkillsPage,SkillsPage,toast_removed,"Removed {{name}}.",,active
|
|
550
|
+
shared.action.undo,shared,*,Shared,action_undo,"Undo",,active
|
|
551
|
+
shared.action.cancel,shared,*,Shared,action_cancel,"Cancel",,active
|
|
552
|
+
skills.empty.my,ui,SkillsPage,SkillsPage,empty_my,"No skills yet. Open Discover to search and install.",,active
|
|
553
|
+
skills.empty.my_cta,ui,SkillsPage,SkillsPage,empty_my_cta,"Browse",,active
|
|
554
|
+
skills.empty.browse,ui,SkillsPage,SkillsPage,empty_browse,"No skills found for this source.",,active
|
|
555
|
+
skills.empty.search,ui,SkillsPage,SkillsPage,empty_search,"No results. Try a different query.",,active
|
|
556
|
+
skills.repo.placeholder,ui,SkillsPage,SkillsPage,repo_placeholder,"owner/repository",,active
|
|
557
|
+
skills.repo.add,ui,SkillsPage,SkillsPage,repo_add,"Add repository",,active
|
|
558
|
+
skills.repo.invalid,ui,SkillsPage,SkillsPage,repo_invalid,"Use owner/repository or a GitHub repository URL.",,active
|
|
559
|
+
skills.repo.remove,ui,SkillsPage,RepoRow,repo_remove,"Remove repository",,active
|
|
560
|
+
settings.appearance.language.label,ui,SettingsPage,SettingsPage,language_label,Language,,active
|
|
561
|
+
settings.appearance.language.hint,ui,SettingsPage,SettingsPage,language_hint,Use System to follow your computer language by default.,,active
|
|
562
|
+
settings.appearance.language.system,ui,SettingsPage,SettingsPage,language_system,System,,active
|
|
563
|
+
settings.appearance.language.english,ui,SettingsPage,SettingsPage,language_english,English,,active
|
|
564
|
+
settings.appearance.language.chinese,ui,SettingsPage,SettingsPage,language_chinese,Simplified Chinese,,active
|
|
565
|
+
dashboard.context_breakdown.empty,dashboard,DashboardPage,ContextBreakdownPanel,empty,"No Claude Code activity in the selected period.",,active
|
|
566
|
+
dashboard.context_breakdown.empty_codex,dashboard,DashboardPage,ContextBreakdownPanel,empty_codex,"No Codex activity in the selected period.",,active
|
|
567
|
+
dashboard.context_breakdown.error,dashboard,DashboardPage,ContextBreakdownPanel,error,"Couldn't read Claude Code logs for this view.",,active
|
|
568
|
+
dashboard.context_breakdown.error_codex,dashboard,DashboardPage,ContextBreakdownPanel,error_codex,"Couldn't read Codex logs for this view.",,active
|
|
569
|
+
dashboard.context_breakdown.bar_aria,dashboard,DashboardPage,ContextBreakdownPanel,bar_aria,"Token distribution: {{summary}}",,active
|
|
570
|
+
dashboard.context_breakdown.system_prefix_tooltip,dashboard,DashboardPage,ContextBreakdownPanel,tooltip,"System prompt, tools schema, skills, rules, and MCP descriptions are cached together as one prefix and can't be separated from the logs.",,active
|
|
571
|
+
dashboard.context_breakdown.footnote,dashboard,DashboardPage,ContextBreakdownPanel,footnote,"Approximate: cache reads accumulate across turns, so conversation history dominates over time. Only Claude Code logs expose the per-message detail this view requires.",,active
|
|
572
|
+
dashboard.context_breakdown.footnote_codex,dashboard,DashboardPage,ContextBreakdownPanel,footnote_codex,"Codex uses non-overlapping token buckets here. Tool and exec drill-downs are separate heuristic attributions over the same turns.",,active
|
|
573
|
+
dashboard.context_breakdown.category.system_prompt,dashboard,DashboardPage,ContextBreakdownPanel,cat,"System prompt",,active
|
|
574
|
+
dashboard.context_breakdown.category.messages,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Messages",,active
|
|
575
|
+
dashboard.context_breakdown.category.tool_calls,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Tool calls",,active
|
|
576
|
+
dashboard.context_breakdown.category.custom_agents,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Custom agents",,active
|
|
577
|
+
dashboard.context_breakdown.category.reasoning,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Reasoning",,active
|
|
578
|
+
dashboard.context_breakdown.category.skills,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Skills",,active
|
|
579
|
+
dashboard.context_breakdown.loading_aria,dashboard,DashboardPage,ContextBreakdownPanel,loading_aria,"Loading context breakdown",,active
|
|
580
|
+
dashboard.context_breakdown.loading_hint,dashboard,DashboardPage,ContextBreakdownPanel,loading_hint,"Scanning session logs…",,active
|
|
581
|
+
dashboard.context_breakdown.tool_details.total_column,dashboard,DashboardPage,ContextBreakdownPanel,tool_details_total_column,"Total",,active
|
|
582
|
+
dashboard.context_breakdown.tool_details.unavailable_codex,dashboard,DashboardPage,ContextBreakdownPanel,tool_details_unavailable_codex,"Tool-level Codex details are unavailable for this period; showing queue totals only.",,active
|
|
583
|
+
dashboard.context_breakdown.message_details.title,dashboard,DashboardPage,ContextBreakdownPanel,message_details_title,"Message details",,active
|
|
584
|
+
dashboard.context_breakdown.message_details.note,dashboard,DashboardPage,ContextBreakdownPanel,message_details_note,"Aggregated only — message text is not stored.",,active
|
|
585
|
+
dashboard.context_breakdown.message_details.category_column,dashboard,DashboardPage,ContextBreakdownPanel,message_details_category_column,"Category",,active
|
|
586
|
+
dashboard.context_breakdown.message_details.user_input,dashboard,DashboardPage,ContextBreakdownPanel,message_details_user_input,"User input",,active
|
|
587
|
+
dashboard.context_breakdown.message_details.conversation_history,dashboard,DashboardPage,ContextBreakdownPanel,message_details_conversation_history,"Conversation history",,active
|
|
588
|
+
dashboard.context_breakdown.message_details.assistant_response,dashboard,DashboardPage,ContextBreakdownPanel,message_details_assistant_response,"Assistant response",,active
|
|
589
|
+
dashboard.context_breakdown.exec_details.title,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_title,"Exec command details",,active
|
|
590
|
+
dashboard.context_breakdown.exec_details.kind_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_kind_column,"Type",,active
|
|
591
|
+
dashboard.context_breakdown.exec_details.calls_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_calls_column,"Calls",,active
|
|
592
|
+
dashboard.context_breakdown.exec_details.failures_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_failures_column,"Fail",,active
|
|
593
|
+
dashboard.context_breakdown.exec_details.duration_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_duration_column,"Duration",,active
|
|
594
|
+
dashboard.context_breakdown.exec_details.max_duration_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_max_duration_column,"Max",,active
|
|
595
|
+
dashboard.context_breakdown.exec_details.output_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_output_column,"Lines",,active
|
|
596
|
+
dashboard.context_breakdown.exec_details.group_by_type,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_type,"By type",,active
|
|
597
|
+
dashboard.context_breakdown.exec_details.group_by_executable,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_executable,"Executable",,active
|
|
598
|
+
dashboard.context_breakdown.exec_details.group_by_command,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_command,"Command",,active
|
|
599
|
+
dashboard.context_breakdown.exec_details.group_by_duration,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_duration,"Duration",,active
|
|
600
|
+
dashboard.context_breakdown.exec_details.group_by_output,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_output,"Output",,active
|
|
601
|
+
dashboard.context_breakdown.exec_details.group_by_exit,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_exit,"By exit",,active
|
|
602
|
+
`,aL={"header.auth.sign_in_aria":"登录","login.back_home":"返回首页","login.cloud_only":"未配置云端登录。请使用 localhost 上的本地仪表盘。","login.title":"登录","login.subtitle":"选择邮箱或已连接账号。","login.dismiss":"关闭","login.verify_email_success":"邮箱已验证。你现在可以登录。","login.verify_email_pending":"请先在邮箱中完成验证,然后再登录。","login.oauth.continue":"使用 {{provider}} 继续","login.divider":"或","login.tab.sign_in":"登录","login.tab.sign_up":"创建账户","login.field.name":"显示名称","login.field.name_placeholder":"可选","login.field.email":"电子邮件","login.field.password":"密码","login.password_hint":"至少 {{min}} 个字符。","login.submit.sign_in":"使用邮箱登录","login.submit.sign_up":"创建账号","auth.callback.processing":"处理中…","auth.callback.success":"登录成功","auth.callback.redirecting":"正在返回 TokenTracker…","auth.callback.failed":"登录未完成,请重试。","auth.callback.close":"关闭此页","login_modal.subtitle":"登录以加入排行榜","login_modal.continue_email":"使用邮箱继续","login_modal.divider_email":"邮箱","shared.placeholder.short":"--","shared.unit.percent":"%","shared.unit.thousand_abbrev":"K","shared.unit.million_abbrev":"M","shared.unit.billion_abbrev":"B","shared.data_source":"数据来源:{{source}}","shared.error.prefix":"错误:{{error}}","shared.status.unsynced":"—","shared.time.now":"刚刚","error.boundary.title":"出了点问题","error.boundary.subtitle":"这个视图渲染失败了","error.boundary.hint":"打开控制台,然后重新加载页面","error.boundary.no_details":"没有错误详细信息","error.boundary.action.reload":"重新加载","identity_card.rank_label":"排名","identity_card.streak_label":"活跃天数","identity_card.rank_placeholder":"—","identity_card.streak_value":"{{days}} 天","usage.summary.total":"Token 总数","usage.period.day":"日","usage.period.week":"周","usage.period.month":"月","usage.period.total":"总计","usage.period.custom":"自定义","usage.metric.total":"总计","usage.metric.input":"输入","usage.metric.output":"输出","usage.metric.cached_input":"缓存输入","usage.metric.reasoning_output":"推理输出","usage.button.refresh":"刷新","usage.overview.tablist_aria":"时间范围","usage.overview.cost_breakdown_aria":"查看成本明细","usage.overview.distribution_aria":"来源占比:{{items}}","usage.overview.distribution_item":"{{label}} {{percent}}%","usage.overview.provider_card_aria":"{{provider}}:{{percent}}%,{{tokens}} Token,{{cost}}。点击{{action}}详情","usage.overview.expand":"展开","usage.overview.collapse":"收起","usage.overview.model_count":"{{count}} 个模型","usage.overview.model_details_aria":"{{provider}} 模型详情","widgets.page.title":"组件","widgets.cta.open_gallery":"打开小组件库","widgets.cta.download":"下载 Mac 应用","widgets.cta.macos_only":"仅限 macOS","widgets.menubar.section.title":"菜单栏","widgets.gallery.section.title":"桌面小组件","widgets.summary.name":"使用概览","widgets.summary.description":"今天和近 7 天的用量,以及紧凑趋势线。","widgets.heatmap.name":"热力图","widgets.heatmap.description":"像 GitHub 一样,一眼看清活跃和空闲的日子。","widgets.topModels.name":"热门模型","widgets.topModels.description":"你最常用的模型,按 Token 占比排序。","widgets.limits.name":"使用限制","widgets.limits.description":"Claude、Codex、Cursor、Gemini 等的实时速率限制进度。","daily.sort.date.label":"日期","daily.sort.date.title":"按日期排序","daily.sort.total.label":"总计","daily.sort.total.title":"按总计排序","daily.sort.input.label":"输入","daily.sort.input.title":"按输入排序","daily.sort.output.label":"输出","daily.sort.output.title":"按输出排序","daily.sort.cached.label":"缓存","daily.sort.cached.title":"按缓存输入排序","daily.sort.reasoning.label":"推理","daily.sort.reasoning.title":"按推理输出排序","daily.sort.conversations.label":"对话数","daily.sort.conversations.title":"按对话排序","details.pagination.prev":"上一页","details.pagination.next":"下一页","limits.copilot.otelHint.title":"跟踪 Copilot Token 使用情况","limits.copilot.otelHint.body":"限额信息通过你的 GitHub OAuth 令牌读取。如果还想记录逐 Token 用量,请启用 Copilot 的 OpenTelemetry 导出,把下面这段加到你的 shell 配置文件(~/.zshrc 或 ~/.bashrc):","limits.copilot.otelHint.copy":"复制","limits.copilot.otelHint.copied":"已复制","limits.panel.title":"使用限制","limits.label.cursor_plan":"套餐","limits.label.cursor_auto":"自动","limits.label.cursor_api":"API","limits.label.kiro_month":"月度","limits.label.kiro_bonus":"奖励","limits.label.kimi_weekly":"周","limits.label.kimi_5h":"5h","limits.label.kimi_total":"总量","limits.label.kimi_parallel":"并发:{{count}}","limits.label.copilot_premium":"高级","limits.label.copilot_chat":"对话","limits.status.not_connected":"未连接","limits.status.no_data":"未返回实时限额数据","limits.status.all_hidden":"所有限额提供商都已隐藏。请打开显示设置重新显示。","nav.usage":"用量","nav.limits":"限额","nav.widgets":"小组件","nav.skills":"Skills","nav.leaderboard":"排行榜","nav.collapse":"折叠侧边栏","nav.expand":"展开侧边栏","nav.menu":"打开导航菜单","nav.close_menu":"关闭导航菜单","nav.aside_label":"主导航","nav.nav_label":"导航","limits.page.subtitle":"AI 工具的速率限制和配额使用情况。","limits.settings.toggle_visible":"切换可见性","limits.page.openSettings":"显示设置","nav.group.general":"常规","nav.group.tools":"工具","nav.group.account":"账户","nav.settings":"设置","header.auth.open_settings":"打开设置","settings.page.title":"设置","settings.page.subtitle":"管理你的账户、外观和显示偏好。","settings.section.appearance":"外观","settings.section.account":"账户","settings.section.limits":"限制显示","settings.appearance.theme.label":"主题","settings.appearance.theme.hint":"选择 Token Tracker 在仪表盘中的显示方式。","settings.appearance.theme.light":"浅色","settings.appearance.theme.dark":"深色","settings.appearance.theme.system":"系统","settings.account.displayName":"显示名称","settings.account.edit":"编辑","settings.account.save":"保存","settings.account.saving":"保存...","settings.account.cancel":"取消","settings.account.cloudSync":"云同步","settings.account.cloudSyncHint":"将本地用量上传到你的 Token Tracker 云端账号。","settings.account.publicProfile":"公开主页","settings.account.publicProfileHint":"在公开排行榜中展示你的用量。","settings.account.displayNameAnonymousHint":"匿名状态下,排行榜会隐藏你的名字和头像","settings.account.displayNameDisabledWhileAnon":"请先关闭匿名,再编辑名字","settings.account.githubUrl":"GitHub 主页","settings.account.githubUrlHint":"在排行榜名字旁显示 GitHub 链接。","settings.account.githubUrlPlaceholder":"用户名或 https://github.com/用户名","settings.account.githubUrlInvalid":"请输入 GitHub 用户名,或 https://github.com/用户名","leaderboard.github.aria":"打开 GitHub 主页","leaderboard.github.tooltipAction":"点击查看 GitHub 主页","leaderboard.github.tooltipPrefix":"可在","leaderboard.github.tooltipSettingsLink":"设置","leaderboard.github.tooltipSuffix":"中配置你的主页","settings.account.signOut":"退出登录","settings.account.signIn":"登录","settings.account.signedOutHint":"登录后可管理云同步和排行榜偏好。","settings.section.menubar":"菜单栏应用","settings.menubar.showStats":"在菜单栏中显示统计信息","settings.menubar.showStatsHint":"在菜单栏图标旁边显示今天的Token 数量和成本。","settings.menubar.animatedIcon":"动画图标","settings.menubar.animatedIconHint":"闪烁 Clawd 角色并在菜单栏中播放同步动画。","settings.menubar.launchAtLogin":"登录时启动","settings.menubar.launchAtLoginHint":"登录 macOS 时自动启动 TokenTrackerBar。","settings.menubar.syncNow":"立即同步","settings.menubar.syncNowHint":"触发本地AI工具日志立即解析并上传。","settings.menubar.syncing":"正在同步...","settings.menubar.updates":"更新","settings.menubar.checkUpdates":"检查更新","menubar.slot.primary":"第一个位置","menubar.slot.secondary":"第二个位置","menubar.native_only":"打开 macOS 版 TokenTrackerBar 后可编辑菜单栏显示。","menubar.metric.today_tokens":"今日 Token","menubar.metric.today_cost":"今日成本","menubar.metric.last_7d_tokens":"近 7 天 Token","menubar.metric.total_tokens":"总 Token","menubar.metric.total_cost":"总成本","menubar.metric.claude_5h":"Claude 5 小时限额","menubar.metric.claude_7d":"Claude 7 天限额","menubar.metric.codex_5h":"Codex 5 小时限额","menubar.metric.codex_7d":"Codex 7 天限额","nav.ip_check":"Claude IP 检查","skills.page.title":"Skills","skills.tab.my":"我的","skills.tab.browse":"发现","skills.action.refresh":"刷新","skills.action.install":"安装","skills.action.install_to":"安装到 {{count}} 个 Agents","skills.action.choose_targets":"选择目标","skills.target.menu_label":"安装到","skills.target.none":"未选目标","skills.toast.installed":"已把 {{name}} 安装到 {{targets}}。","skills.action.remove":"移除","skills.action.search":"搜索","skills.card.installed":"已安装","skills.my.count":"{{count}} 个技能","skills.target.toggle_aria":"切换 {{target}}","skills.target.sync_title":"在 {{target}} 启用","skills.target.remove_title":"在 {{target}} 停用","skills.card.installs":"{{count}} 次安装","skills.source.label":"来源","skills.source.all":"全部仓库","skills.mode.repo":"仓库","skills.mode.skillssh":"skills.sh","skills.browse.placeholder_all":"在已启用的仓库里搜索…","skills.browse.placeholder_repo":"在 {{repo}} 中搜索…","skills.browse.placeholder_skillssh":"在 skills.sh 仓库中搜索…","skills.browse.empty_sources":"添加一个 GitHub 仓库以开始浏览技能。","skills.browse.manage_sources":"管理来源","skills.browse.hint_skillssh":"至少输入 2 个字符以搜索 skills.sh。","skills.browse.loading_hint":"正在从 GitHub 拉取 skill 信息,首次加载可能需要一分钟,结果会缓存。","skills.error.generic":"Skill 操作失败。","skills.confirm.remove_title":"要移除 {{name}} 吗?","skills.confirm.remove_managed":"这个 skill 将从所有已连接的 AI 工具中移除,几秒内可以撤销。","skills.confirm.remove_local":"将从所有 AI 工具目录中删除该 skill 文件夹。此操作无法撤销。","skills.toast.removed":"已移除 {{name}}。","shared.action.undo":"撤销","shared.action.cancel":"取消","skills.empty.my":"还没有 skill。去「发现」搜索或安装。","skills.empty.my_cta":"去发现","skills.empty.browse":"这个来源下没有找到技能。","skills.empty.search":"没有结果,换个关键词试试。","skills.repo.placeholder":"owner/repository","skills.repo.add":"添加仓库","skills.repo.invalid":"请输入 owner/repository 或 GitHub 仓库 URL。","skills.repo.remove":"移除仓库","settings.appearance.language.label":"语言","settings.appearance.language.hint":"使用“系统”时会默认跟随本机语言。","settings.appearance.language.system":"系统","settings.appearance.language.english":"英语","settings.appearance.language.chinese":"简体中文"},iL={"stats.period.today":"今日","stats.period.week":"本周","stats.period.month":"本月","stats.period.all":"全部","stats.period.convs":"对话","dashboard.core_index.collapse_label":"▾","dashboard.core_index.expand_label":"▸","dashboard.core_index.collapse_aria":"折叠模型分解","dashboard.core_index.expand_aria":"展开模型细分","dashboard.rolling.title":"最近的活动","dashboard.rolling.last_7d":"过去 7 天","dashboard.rolling.last_30d":"过去 30 天","dashboard.rolling.avg_active_day":"日平均","dashboard.projects.title":"项目用量","dashboard.projects.tokens_label":"Token","dashboard.projects.stars_label":"星标","dashboard.projects.limit_label":"展示","dashboard.projects.limit_aria":"选择仓库显示数量","dashboard.projects.limit_top_3":"前 3 名","dashboard.projects.limit_top_6":"前 6 名","dashboard.projects.limit_top_10":"前 10 名","dashboard.projects.empty":"没有公开仓库","dashboard.widgets.title":"桌面小组件","dashboard.widgets.hint":"右键点按桌面 → 编辑小组件 → 搜索“TokenTracker”","dashboard.widgets.dismiss_aria":"关闭小组件介绍","dashboard.cost_breakdown.title":"成本明细","dashboard.cost_breakdown.total_label":"预计总成本","dashboard.cost_breakdown.close":"关闭","trend.monitor.label":"使用趋势","heatmap.title":"热力图","heatmap.empty":"尚无活动数据。","heatmap.legend.less":"少","heatmap.legend.more":"多","heatmap.legend.utc":"UTC","heatmap.tooltip":"{{day}} • {{value}} {{unit}} • {{tz}}","heatmap.unit.tokens":"Token","heatmap.month.jan":"1月","heatmap.month.feb":"2月","heatmap.month.mar":"3月","heatmap.month.apr":"4月","heatmap.month.may":"5月","heatmap.month.jun":"6月","heatmap.month.jul":"7月","heatmap.month.aug":"8月","heatmap.month.sep":"9月","heatmap.month.oct":"10月","heatmap.month.nov":"11月","heatmap.month.dec":"12月","heatmap.day.sun":"日","heatmap.day.mon":"一","heatmap.day.tue":"二","heatmap.day.wed":"三","heatmap.day.thu":"四","heatmap.day.fri":"五","heatmap.day.sat":"六","dashboard.session_expired.copy_label":"运行 npx --yes tokentracker-cli init","dashboard.session_expired.copied":"已复制","dashboard.install.prompt":"安装 Node.js 18+ 然后运行:","dashboard.install.cmd.init":"npx --yes tokentracker-cli init","dashboard.install.cmd.init_link_code":"npx --yes tokentracker-cli init --link-code {{link_code}}","dashboard.install.copy":"复制安装命令","dashboard.install.copy_base":"复制初始化命令","dashboard.install.copied":"已复制到剪贴板","dashboard.install.link_code.loading":"正在生成专属代码...","dashboard.install.link_code.failed":"专属代码不可用","dashboard.install.cmd.sync":"npx --yes tokentracker-cli sync","dashboard.daily.title":"每日细目","dashboard.daily.empty":"还没有数据。先使用 AI CLI,再运行 {{cmd}}。","dashboard.identity.title":"你的个人资料","dashboard.identity.subtitle":"记录你的编码之旅","dashboard.identity.fallback":"匿名用户","dashboard.screenshot.title_line1":"AI 编程助手","dashboard.screenshot.title_line2":"2025 年度回顾","dashboard.screenshot.twitter_button":"分享到 X","dashboard.screenshot.twitter_label":"分享到 X","dashboard.screenshot.twitter_hint":"自动将图像复制到剪贴板","dashboard.screenshot.twitter_text":"记录中的 {{total_tokens}} Token。\\n{{model_name}} 以 {{model_percent}}% 领先。\\n\\n我的 AI 使用情况,未经审计 →\\ntokentracker.cc"},sL={"landing.handle.default":"VIBE_USER","landing.handle.special":"伏特","landing.screenshot.alt":"TokenTracker 仪表板截图","landing.nav.login":"登录","landing.nav.signup":"注册","landing.install.command":"npx --yes tokentracker-cli","landing.install.action.copy":"复制命令","landing.install.action.copied":"已复制","landing.meta.title":"Token Tracker —— AI Coding CLI 的 Token 用量追踪器","landing.meta.description":"自动监控 Claude Code、Cursor、Codex 等工具的 Token 用量。本地优先、注重隐私、零配置。","landing.meta.og_site_name":"Token Tracker","landing.meta.og_type":"website","landing.meta.og_image":"https://www.tokentracker.cc/og-image.jpg","landing.meta.og_url":"https://www.tokentracker.cc/","landing.meta.twitter_card":"summary_large_image","share.meta.title":"Token Tracker 分享","share.meta.description":"分享你的 Token Tracker 仪表板快照,包含跨模型、项目和时间窗口的用量洞察。","share.meta.og_site_name":"Token Tracker","share.meta.og_type":"website","share.meta.og_image":"https://www.tokentracker.cc/share-dashboard.jpg","share.meta.og_url":"https://www.tokentracker.cc/share","share.meta.twitter_card":"summary_large_image","landing.handle.placeholder":"试试 “{{handle}}”","landing.rank.expectation":"预期排名:{{rank}}","landing.rank.singularity":"登顶","landing.rank.unranked":"未上榜","landing.cta.primary":"进入仪表板","landing.cta.secondary":"查看 GitHub 源码","landing.v2.hero.title_line1":"追踪你所有的","landing.v2.hero.title_line2":"AI Token","landing.v2.install.mac_cta":"Mac 应用 (DMG)","landing.v2.models.title":"支持的 AI CLI 工具","landing.v2.compare.kicker":"无缝追踪","landing.v2.compare.title":"别再瞎猜你的 AI 用量。","landing.v2.compare.subtitle":"AI CLI 把用量数据藏在零散的本地文件里。TokenTracker 把它们实时聚合到一个清晰的仪表板里。","landing.v2.distill.body":"100% 本地处理,不上传任何 prompt 或代码。","landing.v2.compare.with.title":"用 Token Tracker","landing.v2.compare.with.p1":"集中式用量仪表板","landing.v2.compare.with.p2":"实时 Token 指标","landing.v2.compare.with.p3":"100% 本地,隐私无忧","landing.v2.compare.without.title":"不用","landing.v2.compare.without.p1":"散落的 JSON 日志文件","landing.v2.compare.without.p2":"对 Token 消耗一无所知","landing.v2.compare.without.p3":"突如其来的 API 账单","landing.v2.footer.line":"Token Tracker —— 开发者打造,服务开发者。","landing.v2.nav.github":"GitHub","landing.v2.models.agent.codex":"Codex","landing.v2.models.agent.claude_code":"Claude Code","landing.v2.models.agent.cursor":"Cursor","landing.v2.models.agent.gemini":"Gemini","landing.v2.models.agent.opencode":"OpenCode","landing.v2.models.agent.openclaw":"OpenClaw","landing.v2.cta.primary":"进入仪表板","landing.v2.hero.subtagline":"自动监控 Claude Code、Cursor、Codex 等工具的 Token 用量。本地优先、注重隐私、零配置。","leaderboard.profile.nav.back":"$ 排行榜","leaderboard.title":"排行榜","leaderboard.range":"UTC {{period}} · {{from}} – {{to}}","leaderboard.range_loading":"UTC {{period}} · …","leaderboard.range.total":"全部时间","leaderboard.generated_at":"更新于 {{ts}}","leaderboard.period.week":"周","leaderboard.period.month":"月","leaderboard.period.total":"全部","leaderboard.me_label":"你","leaderboard.anon_label":"匿名","leaderboard.error.unknown":"未知错误","leaderboard.loading":"加载中…","leaderboard.empty":"暂无数据","leaderboard.column.rank":"排名","leaderboard.column.user":"用户","leaderboard.column.total":"总计","leaderboard.column.codex":"Codex","leaderboard.column.claude":"Claude","leaderboard.column.gemini":"Gemini","leaderboard.column.cursor":"Cursor","leaderboard.column.opencode":"OpenCode","leaderboard.column.openclaw":"OpenClaw","leaderboard.column.hermes":"Hermes","leaderboard.column.kiro":"Kiro","leaderboard.column.copilot":"Copilot","leaderboard.column.kimi":"Kimi","leaderboard.column.supplemental":"其他","leaderboard.column.est_cost":"预估花费","leaderboard.signin_prompt":"登录后即可上榜","leaderboard.signin_button":"登录","leaderboard.sync_prompt":"开启云同步即可参与排名","leaderboard.sync_button.idle":"开启并同步","leaderboard.sync_button.busy":"同步中…","leaderboard.pagination.page_size_label":"每页显示","leaderboard.pagination.prev":"上一页","leaderboard.pagination.next":"下一页","leaderboard.pagination.ellipsis":"……","leaderboard.pagination.page_unknown":"第 {{page}} 页","share.modal.title":"分享你的数据","share.modal.subtitle":"生成海报卡片,随处分享。","share.modal.close":"关闭","share.modal.action.x":"分享到 X","share.modal.action.download":"下载","share.modal.action.copy":"复制图片","share.modal.hint.x":"把图片粘贴到推文里","share.modal.hint.copy":"到剪贴板","share.modal.name_label":"显示名称","share.modal.name_placeholder":"输入你的名字","share.modal.style_label":"样式","share.modal.footer":"数据始终保留在本地——图片在你的浏览器内生成,绝不上传。","share.button.label":"分享","share.button.aria":"打开分享卡片","share.toast.copied":"图片已复制到剪贴板","share.toast.downloaded":"图片已保存","share.toast.failed":"图片生成失败","share.toast.working":"生成中…","share.variant.neon":"霓虹","share.variant.broadsheet":"特刊","share.date.month_year":"{{year}} 年 {{month}}","share.issue.all_time":"总计","share.month_short.jan":"1 月","share.month_short.feb":"2 月","share.month_short.mar":"3 月","share.month_short.apr":"4 月","share.month_short.may":"5 月","share.month_short.jun":"6 月","share.month_short.jul":"7 月","share.month_short.aug":"8 月","share.month_short.sep":"9 月","share.month_short.oct":"10 月","share.month_short.nov":"11 月","share.month_short.dec":"12 月","share.hook.top_loyal":"{{name}} 占了 {{percent}}% 的用量。","share.hook.days_record":"共记录 {{days}} 天。","share.hook.top_led":"{{name}} 领跑,占比 {{percent}}%。","share.hook.multi_models":"{{days}} 天里用了 {{count}} 个模型。","share.hook.days_with_model":"{{name}} 陪你跑了 {{days}} 天。","share.hook.new_chapter":"新的记录,从这里开始。","share.card.broadsheet.issue":"期号","share.card.broadsheet.by":"分享者","share.card.broadsheet.tracked_since":"追踪起始","share.card.broadsheet.total_tokens":"总 Token 数","share.card.broadsheet.estimated_spend":"预估花费","share.card.broadsheet.billable_days":"{{days}} 个活跃日","share.card.broadsheet.heatmap_title":"年度热图","share.card.broadsheet.heatmap_days_on_record":"{{active}} / {{total}} 天有记录","share.card.broadsheet.roster_title":"模型榜","share.card.broadsheet.roster_subtitle":"常用模型轮换","share.card.broadsheet.empty":"这一周很安静,还没有模型数据。","share.card.broadsheet.global_rank":"全站排名","share.card.broadsheet.active_days":"活跃","share.card.broadsheet.days_count":"{{days}} 天","share.card.broadsheet.track_yours":"追踪你自己的","share.card.annual.report_title":"用量报告","share.card.annual.less":"少","share.card.annual.more":"多","share.card.annual.heatmap_title":"Token 热图","share.card.annual.total_tokens":"总 Token 数","share.card.annual.estimated_cost":"预估成本","share.card.annual.longest_streak":"最长连击","share.card.annual.days_count":"{{days}} 天","share.card.annual.top_model":"热门模型"};function J_(){return typeof window>"u"?null:window.localStorage||null}function ew(){return typeof navigator>"u"?null:navigator.clipboard||null}function oL(){return typeof window>"u"?null:window.ClipboardItem||null}function lL(e,{storage:t}={}){const n=t??J_();if(!n||typeof n.getItem!="function")return null;try{return n.getItem(e)}catch{return null}}function uL(e,t,{storage:n}={}){const a=n??J_();if(!a||typeof a.setItem!="function")return!1;try{return a.setItem(e,t),!0}catch{return!1}}async function n3(e,{clipboard:t}={}){const n=t??ew();if(!n||typeof n.writeText!="function")return!1;try{return await n.writeText(e),!0}catch{return!1}}async function r3(e,{clipboard:t}={}){const n=t??ew(),a=oL();if(!e||!n||typeof n.write!="function"||!a)return!1;try{const s=e.type||"image/png",o=e.type&&e.type!==s?e.slice(0,e.size,s):e.type?e:e.slice(0,e.size,s),u=new a({[s]:o});return await n.write([u]),!0}catch{return!1}}const tw="tokentracker-locale",ps="system",qu="en",_p="zh-CN";function nw(e){return typeof e!="string"?qu:/^zh(?:[-_]|$)/i.test(e.trim())?_p:qu}function bc(e){return e===ps?ps:nw(e)}function cL(){return typeof navigator>"u"?[]:Array.isArray(navigator.languages)&&navigator.languages.length?navigator.languages.filter(e=>typeof e=="string"):typeof navigator.language=="string"?[navigator.language]:[]}function Gu(e,t=cL()){const n=bc(e);if(n!==ps)return n;const a=t.map(s=>typeof s=="string"?s.trim():"").find(s=>s.length>0);return a&&/^zh(?:[-_]|$)/i.test(a)?_p:qu}function wp(){return bc(lL(tw)||ps)}function dL(e){return uL(tw,bc(e))}const hL=["key","module","page","component","slot","text"],fL={[_p]:{...aL,...iL,...sL}};let Ph=null,rw=Gu(wp());function pL(e){const t=[];let n=[],a="",s=!1;for(let o=0;o<e.length;o+=1){const u=e[o];if(s){u==='"'?e[o+1]==='"'?(a+='"',o+=1):s=!1:a+=u;continue}if(u==='"'){s=!0;continue}if(u===","){n.push(a),a="";continue}if(u===`
|
|
603
|
+
`){n.push(a),a="",n.every(c=>c.trim()==="")||t.push(n),n=[];continue}u!=="\r"&&(a+=u)}return n.push(a),n.every(o=>o.trim()==="")||t.push(n),t}function mL(e){const t=pL(e);if(!t.length)return{map:new Map,rows:[]};const n=t[0].map(c=>String(c).trim());if(hL.filter(c=>!n.includes(c)).length)return{map:new Map,rows:[]};const s=Object.fromEntries(n.map((c,h)=>[c,h])),o=[],u=new Map;return t.slice(1).forEach((c,h)=>{const f={key:String(c[s.key]||"").trim(),module:String(c[s.module]||"").trim(),page:String(c[s.page]||"").trim(),component:String(c[s.component]||"").trim(),slot:String(c[s.slot]||"").trim(),text:String(c[s.text]??"").trim()};f.key&&(u.has(f.key),u.set(f.key,f),o.push(f))}),{map:u,rows:o}}function gL(){return Ph||(Ph=mL(rL)),Ph}function yL(){return fL[rw]||{}}function vL(e){const t=yL()[String(e)];return typeof t=="string"&&t.trim()?t:null}function bL(e,t){return t?e.replace(/\{\{(\w+)\}\}/g,(n,a)=>t[a]==null?n:String(t[a])):e}function _L(e){return String(e).replace(/\\n/g,`
|
|
604
|
+
`)}function wL(e,t){return vL(t)||e?.text||t}function kL(e){rw=nw(e)}function He(e,t){const a=gL().map.get(e);return bL(_L(wL(a,e)),t)}const Bv="tokentracker_native_app";let aw=null;const ff=new Set;typeof window<"u"&&window.addEventListener("native:systemAppearanceChanged",e=>{const t=e?.detail?.isDark;if(typeof t=="boolean"){aw=t;try{const n=document.documentElement;t?n.classList.add("dark"):n.classList.remove("dark")}catch{}ff.forEach(n=>{try{n(t)}catch{}})}});function Fv(){return aw}function xL(e){return ff.add(e),()=>ff.delete(e)}function iw(){if(typeof window>"u")return!1;try{if(new URLSearchParams(window.location.search).get("app")==="1"){try{window.localStorage.setItem(Bv,"1")}catch{}return!0}return window.localStorage.getItem(Bv)==="1"}catch{return!1}}function mr(){return typeof window>"u"?!1:!!window.webkit?.messageHandlers?.nativeBridge}function sw(){return typeof window>"u"?null:window.webkit?.messageHandlers?.nativeBridge??null}function a3(){return!!sw()}function Ho(e){const t=sw();if(!t)return!1;try{return t.postMessage(e),!0}catch(n){return console.warn("[tokentracker] nativeBridge post failed:",n),!1}}function i3(){return Ho({type:"getSettings"})}function Vv(e,t){return Ho({type:"setSetting",key:e,value:t})}function s3(e){return Ho({type:"action",name:e})}function SL(){return Ho({type:"getSystemAppearance"})}function PL(e,t){if(!mr())return;Ho({type:"setChromeAppearance",isDark:e==="dark",theme:t??"system"})}function o3(e){if(typeof window>"u")return()=>{};const t=n=>{n&&n.detail&&typeof n.detail=="object"&&e(n.detail)};return window.addEventListener("native:settings",t),()=>window.removeEventListener("native:settings",t)}const ow=k.createContext(null);function TL(){return Gu(wp())}function CL(e){typeof document>"u"||(document.documentElement.lang=e)}function zv(e,t){kL(e),t(n=>n===e?n:e)}function EL({children:e}){const[t,n]=k.useState(wp),[a,s]=k.useState(TL);k.useLayoutEffect(()=>{CL(a)},[a]),k.useLayoutEffect(()=>{mr()&&Vv("locale",t)},[t]),k.useLayoutEffect(()=>{if(t!==ps||typeof window>"u")return;const c=()=>zv(Gu(ps),s);return window.addEventListener("languagechange",c),()=>window.removeEventListener("languagechange",c)},[t]);const o=k.useCallback(c=>{const h=bc(c);zv(Gu(h),s),n(h),dL(h),mr()&&Vv("locale",h)},[]),u=k.useMemo(()=>({locale:t,setLocale:o,resolvedLocale:a}),[t,a,o]);return U.jsx(ow.Provider,{value:u,children:e})}const RL="modulepreload",AL=function(e){return"/"+e},$v={},sr=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let h=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");s=h(n.map(f=>{if(f=AL(f),f in $v)return;$v[f]=!0;const m=f.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":RL,m||(b.as="script"),b.crossOrigin="",b.href=f,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((w,x)=>{b.addEventListener("load",w),b.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return s.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};var Yu={},LL=()=>{window.va||(window.va=function(...t){window.vaq||(window.vaq=[]),window.vaq.push(t)})},DL="@vercel/analytics",ML="2.0.1";function lw(){return typeof window<"u"}function uw(){try{const e="production"}catch{}return"production"}function NL(e="auto"){if(e==="auto"){window.vam=uw();return}window.vam=e}function OL(){return(lw()?window.vam:uw())||"production"}function kp(){return OL()==="development"}function IL(e){return e.scriptSrc?rs(e.scriptSrc):kp()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?rs(`${e.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function jL(e,t){var n;let a=e;if(t)try{a={...(n=JSON.parse(t))==null?void 0:n.analytics,...e}}catch{}NL(a.mode);const s={sdkn:DL+(a.framework?`/${a.framework}`:""),sdkv:ML};return a.disableAutoTrack&&(s.disableAutoTrack="1"),a.viewEndpoint&&(s.viewEndpoint=rs(a.viewEndpoint)),a.eventEndpoint&&(s.eventEndpoint=rs(a.eventEndpoint)),a.sessionEndpoint&&(s.sessionEndpoint=rs(a.sessionEndpoint)),kp()&&a.debug===!1&&(s.debug="false"),a.dsn&&(s.dsn=a.dsn),a.endpoint?s.endpoint=a.endpoint:a.basePath&&(s.endpoint=rs(`${a.basePath}/insights`)),{beforeSend:a.beforeSend,src:IL(a),dataset:s}}function rs(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function UL(e={debug:!0},t){var n;if(!lw())return;const{beforeSend:a,src:s,dataset:o}=jL(e,t);if(LL(),a&&((n=window.va)==null||n.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${s}"]`))return;const u=document.createElement("script");u.src=s;for(const[c,h]of Object.entries(o))u.dataset[c]=h;u.defer=!0,u.onerror=()=>{const c=kp()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${s}. ${c}`)},document.head.appendChild(u)}function BL({route:e,path:t}){var n;(n=window.va)==null||n.call(window,"pageview",{route:e,path:t})}function FL(){if(!(typeof process>"u"||typeof Yu>"u"))return Yu.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function VL(){if(!(typeof process>"u"||typeof Yu>"u"))return Yu.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function zL(e){return k.useEffect(()=>{var t;e.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),k.useEffect(()=>{UL({framework:e.framework||"react",basePath:e.basePath??FL(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??VL())},[]),k.useEffect(()=>{e.route&&e.path&&BL({route:e.route,path:e.path})},[e.route,e.path]),null}var Zu={},$L=()=>{window.si||(window.si=function(...t){window.siq=window.siq||[],window.siq.push(t)})},HL="@vercel/speed-insights",WL="2.0.0";function KL(){return typeof window<"u"}function qL(){try{const e="production"}catch{}return"production"}function cw(){return qL()==="development"}function GL(e){return e.scriptSrc?Qu(e.scriptSrc):cw()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?Qu(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function YL(e,t){var n;let a=e;if(t)try{a={...(n=JSON.parse(t))==null?void 0:n.speedInsights,...e}}catch{}const s={sdkn:HL+(a.framework?`/${a.framework}`:""),sdkv:WL};return a.sampleRate&&(s.sampleRate=a.sampleRate.toString()),a.route&&(s.route=a.route),cw()&&a.debug===!1&&(s.debug="false"),a.dsn&&(s.dsn=a.dsn),a.endpoint?s.endpoint=Qu(a.endpoint):a.basePath&&(s.endpoint=Qu(`${a.basePath}/speed-insights/vitals`)),{src:GL(a),beforeSend:a.beforeSend,dataset:s}}function Qu(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function ZL(e={},t){var n;if(!KL()||e.route===null)return null;$L();const{beforeSend:a,src:s,dataset:o}=YL(e,t);if(document.head.querySelector(`script[src*="${s}"]`))return null;a&&((n=window.si)==null||n.call(window,"beforeSend",a));const u=document.createElement("script");u.src=s,u.defer=!0;for(const[c,h]of Object.entries(o))u.dataset[c]=h;return u.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${s}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(u),{setRoute:c=>{u.dataset.route=c??void 0}}}function QL(){if(!(typeof process>"u"||typeof Zu>"u"))return Zu.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function XL(){if(!(typeof process>"u"||typeof Zu>"u"))return Zu.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function JL(e){k.useEffect(()=>{var n;e.beforeSend&&((n=window.si)==null||n.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const t=k.useRef(null);return k.useEffect(()=>{if(!t.current){const n=ZL({framework:e.framework??"react",basePath:e.basePath??QL(),...e},e.configString??XL());n&&(t.current=n.setRoute)}},[e]),k.useEffect(()=>{t.current&&e.route&&t.current(e.route)},[e.route]),null}const dw=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const eD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const Hv=e=>{const t=tD(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Th={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 nD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},rD=k.createContext({}),aD=()=>k.useContext(rD),iD=k.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:a,className:s="",children:o,iconNode:u,...c},h)=>{const{size:f=24,strokeWidth:m=2,absoluteStrokeWidth:y=!1,color:b="currentColor",className:w=""}=aD()??{},x=a??y?Number(n??m)*24/Number(t??f):n??m;return k.createElement("svg",{ref:h,...Th,width:t??f??Th.width,height:t??f??Th.height,stroke:e??b,strokeWidth:x,className:dw("lucide",w,s),...!o&&!nD(c)&&{"aria-hidden":"true"},...c},[...u.map(([T,P])=>k.createElement(T,P)),...Array.isArray(o)?o:[o]])});const dn=(e,t)=>{const n=k.forwardRef(({className:a,...s},o)=>k.createElement(iD,{ref:o,iconNode:t,className:dw(`lucide-${eD(Hv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Hv(e),n};const sD=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],oD=dn("chart-column",sD);const lD=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],uD=dn("gauge",lD);const cD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],dD=dn("globe",cD);const hD=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],fD=dn("layout-grid",hD);const pD=[["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"}]],mD=dn("mail",pD);const gD=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],yD=dn("menu",gD);const vD=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],bD=dn("monitor",vD);const _D=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],hw=dn("moon",_D);const wD=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],kD=dn("puzzle",wD);const xD=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],SD=dn("refresh-cw",xD);const PD=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],TD=dn("settings",PD);const CD=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],fw=dn("sun",CD);const ED=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],RD=dn("triangle-alert",ED);const AD=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],LD=dn("trophy",AD);const DD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pw=dn("x",DD);function MD({children:e,variant:t="primary",size:n="md",onClick:a,disabled:s=!1,className:o="",as:u="button",...c}){const h="inline-flex items-center justify-center font-medium transition-all duration-200 rounded-md focus:outline-none focus:ring-2 focus:ring-oai-blue/30 active:scale-[0.98] active:duration-100",f={primary:"bg-oai-black dark:bg-oai-white text-white dark:text-oai-black border border-transparent hover:bg-oai-gray-800 dark:hover:bg-oai-gray-200 active:bg-oai-gray-900 dark:active:bg-oai-gray-300 disabled:bg-oai-gray-300 dark:disabled:bg-oai-gray-700 disabled:text-oai-gray-500 dark:disabled:text-oai-gray-400 focus:ring-oai-brand/30 transition-colors duration-200",secondary:"bg-oai-white dark:bg-oai-gray-900 text-oai-black dark:text-oai-white border border-oai-gray-300 dark:border-oai-gray-700 hover:border-oai-brand hover:text-oai-brand active:bg-oai-gray-50 dark:active:bg-oai-gray-800 active:border-oai-brand-dark disabled:text-oai-gray-400 dark:disabled:text-oai-gray-500 disabled:border-oai-gray-200 dark:disabled:border-oai-gray-700 focus:ring-oai-brand/30 transition-colors duration-200",ghost:"bg-transparent text-oai-gray-600 dark:text-oai-gray-300 border border-transparent hover:text-oai-brand hover:bg-oai-brand-50/50 dark:hover:bg-oai-brand-950/30 active:bg-oai-brand-50 dark:active:bg-oai-brand-900/50 disabled:text-oai-gray-400 dark:disabled:text-oai-gray-500 focus:ring-oai-brand/30 transition-colors duration-200"},m={sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-base"},y=s?"cursor-not-allowed opacity-60":"cursor-pointer",b=`${h} ${f[t]} ${m[n]} ${y} ${o}`;return U.jsx(u,{className:b,onClick:a,disabled:s,...c,children:e})}class ND extends zf.Component{constructor(t){super(t),this.state={error:null},this.handleReload=this.handleReload.bind(this)}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught an error:",t)}handleReload(){typeof window>"u"||window.location.reload()}render(){const{error:t}=this.state;if(!t)return this.props.children;const n=String(t?.message||t||""),a=n?He("shared.error.prefix",{error:n}):He("error.boundary.no_details");return U.jsx("div",{className:"flex min-h-screen items-center justify-center bg-oai-white p-6 font-oai text-oai-black antialiased dark:bg-oai-gray-950 dark:text-oai-white",children:U.jsxs("div",{className:"w-full max-w-lg rounded-xl border border-oai-gray-200 bg-white p-6 text-center shadow-sm dark:border-oai-gray-800 dark:bg-oai-gray-900",children:[U.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-full bg-amber-50 text-amber-600 dark:bg-amber-950/30 dark:text-amber-300",children:U.jsx(RD,{className:"h-5 w-5","aria-hidden":!0})}),U.jsx("div",{className:"mt-4 text-xs font-medium uppercase text-oai-gray-500 dark:text-oai-gray-400",children:He("error.boundary.title")}),U.jsx("h1",{className:"mt-2 text-xl font-semibold text-oai-black dark:text-white",children:He("error.boundary.subtitle")}),U.jsx("p",{className:"mt-2 text-sm text-oai-gray-500 dark:text-oai-gray-400",children:He("error.boundary.hint")}),U.jsx("div",{className:"mt-4 max-h-32 overflow-auto rounded-lg border border-oai-gray-200 bg-oai-gray-50 px-3 py-2 text-left text-xs leading-5 text-oai-gray-600 dark:border-oai-gray-800 dark:bg-oai-gray-950 dark:text-oai-gray-300",children:a}),U.jsxs(MD,{type:"button",size:"md",onClick:this.handleReload,className:"mt-5",children:[U.jsx(SD,{className:"mr-2 h-4 w-4","aria-hidden":!0}),He("error.boundary.action.reload")]})]})})}}function _c(){const e=k.useContext(ow);if(e===null)throw new Error("useLocale must be used within a LocaleProvider");return e}const pf="tokentracker-theme",mw=k.createContext(null);function OD(){if(typeof window>"u")return"system";try{const e=localStorage.getItem(pf);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function uu(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ID(e){if(typeof document>"u")return;const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}function jD({children:e}){const[t,n]=k.useState(OD),[a,s]=k.useState(()=>{if(t!=="system")return t;if(mr()){const f=Fv();if(typeof f=="boolean")return f?"dark":"light"}return uu()}),o=k.useRef(t);k.useEffect(()=>{o.current=t},[t]),k.useEffect(()=>{ID(a)},[a]),k.useLayoutEffect(()=>{if(t==="system"){if(mr()){const f=Fv();s(typeof f=="boolean"?f?"dark":"light":uu()),SL();return}s(uu())}else s(t)},[t]),k.useEffect(()=>mr()?xL(m=>{o.current==="system"&&s(m?"dark":"light")}):void 0,[]),k.useEffect(()=>{if(typeof window>"u"||t!=="system"||mr())return;const f=window.matchMedia("(prefers-color-scheme: dark)"),m=y=>{const b=y.matches?"dark":"light";s(b)};return f.addEventListener?(f.addEventListener("change",m),()=>f.removeEventListener("change",m)):(f.addListener(m),()=>f.removeListener(m))},[t]),k.useEffect(()=>{const f=t==="system"&&!mr()?uu():a;PL(f,t)},[a,t]);const u=k.useCallback(f=>{if(n(f),typeof window<"u")try{localStorage.setItem(pf,f)}catch{}},[]),c=k.useCallback(()=>{u(f=>{const m=f==="dark"?"light":"dark";if(typeof window<"u")try{localStorage.setItem(pf,m)}catch{}return m})},[]),h=k.useMemo(()=>({theme:t,setTheme:u,toggleTheme:c,resolvedTheme:a}),[t,u,c,a]);return U.jsx(mw.Provider,{value:h,children:e})}const gw=k.createContext({isOpen:!1,openLoginModal:()=>{},closeLoginModal:()=>{}});function UD({children:e}){const[t,n]=k.useState(!1),a=k.useCallback(()=>n(!0),[]),s=k.useCallback(()=>n(!1),[]);return U.jsx(gw.Provider,{value:{isOpen:t,openLoginModal:a,closeLoginModal:s},children:e})}function yw(){return k.useContext(gw)}const xp=k.createContext({});function Sp(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const BD=typeof window<"u",vw=BD?k.useLayoutEffect:k.useEffect,wc=k.createContext(null);function Pp(e,t){e.indexOf(t)===-1&&e.push(t)}function Xu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const xr=(e,t,n)=>n>t?t:n<e?e:n;let Tp=()=>{};const Ma={},bw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _w(e){return typeof e=="object"&&e!==null}const ww=e=>/^0[^.\s]+$/u.test(e);function kw(e){let t;return()=>(t===void 0&&(t=e()),t)}const jn=e=>e,FD=(e,t)=>n=>t(e(n)),Wo=(...e)=>e.reduce(FD),Do=(e,t,n)=>{const a=t-e;return a===0?1:(n-e)/a};class Cp{constructor(){this.subscriptions=[]}add(t){return Pp(this.subscriptions,t),()=>Xu(this.subscriptions,t)}notify(t,n,a){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,a);else for(let o=0;o<s;o++){const u=this.subscriptions[o];u&&u(t,n,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Sn=e=>e*1e3,In=e=>e/1e3;function xw(e,t){return t?e*(1e3/t):0}const Sw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,VD=1e-7,zD=12;function $D(e,t,n,a,s){let o,u,c=0;do u=t+(n-t)/2,o=Sw(u,a,s)-e,o>0?n=u:t=u;while(Math.abs(o)>VD&&++c<zD);return u}function Ko(e,t,n,a){if(e===t&&n===a)return jn;const s=o=>$D(o,0,1,e,n);return o=>o===0||o===1?o:Sw(s(o),t,a)}const Pw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Tw=e=>t=>1-e(1-t),Cw=Ko(.33,1.53,.69,.99),Ep=Tw(Cw),Ew=Pw(Ep),Rw=e=>e>=1?1:(e*=2)<1?.5*Ep(e):.5*(2-Math.pow(2,-10*(e-1))),Rp=e=>1-Math.sin(Math.acos(e)),Aw=Tw(Rp),Lw=Pw(Rp),HD=Ko(.42,0,1,1),WD=Ko(0,0,.58,1),Dw=Ko(.42,0,.58,1),KD=e=>Array.isArray(e)&&typeof e[0]!="number",Mw=e=>Array.isArray(e)&&typeof e[0]=="number",qD={linear:jn,easeIn:HD,easeInOut:Dw,easeOut:WD,circIn:Rp,circInOut:Lw,circOut:Aw,backIn:Ep,backInOut:Ew,backOut:Cw,anticipate:Rw},GD=e=>typeof e=="string",Wv=e=>{if(Mw(e)){Tp(e.length===4);const[t,n,a,s]=e;return Ko(t,n,a,s)}else if(GD(e))return qD[e];return e},cu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function YD(e,t){let n=new Set,a=new Set,s=!1,o=!1;const u=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function h(m){u.has(m)&&(f.schedule(m),e()),m(c)}const f={schedule:(m,y=!1,b=!1)=>{const x=b&&s?n:a;return y&&u.add(m),x.add(m),m},cancel:m=>{a.delete(m),u.delete(m)},process:m=>{if(c=m,s){o=!0;return}s=!0;const y=n;n=a,a=y,n.forEach(h),n.clear(),s=!1,o&&(o=!1,f.process(m))}};return f}const ZD=40;function Nw(e,t){let n=!1,a=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,u=cu.reduce((M,I)=>(M[I]=YD(o),M),{}),{setup:c,read:h,resolveKeyframes:f,preUpdate:m,update:y,preRender:b,render:w,postRender:x}=u,T=()=>{const M=Ma.useManualTiming,I=M?s.timestamp:performance.now();n=!1,M||(s.delta=a?1e3/60:Math.max(Math.min(I-s.timestamp,ZD),1)),s.timestamp=I,s.isProcessing=!0,c.process(s),h.process(s),f.process(s),m.process(s),y.process(s),b.process(s),w.process(s),x.process(s),s.isProcessing=!1,n&&t&&(a=!1,e(T))},P=()=>{n=!0,a=!0,s.isProcessing||e(T)};return{schedule:cu.reduce((M,I)=>{const K=u[I];return M[I]=(G,W=!1,S=!1)=>(n||P(),K.schedule(G,W,S)),M},{}),cancel:M=>{for(let I=0;I<cu.length;I++)u[cu[I]].cancel(M)},state:s,steps:u}}const{schedule:dt,cancel:Na,state:Kt,steps:Ch}=Nw(typeof requestAnimationFrame<"u"?requestAnimationFrame:jn,!0);let Tu;function QD(){Tu=void 0}const on={now:()=>(Tu===void 0&&on.set(Kt.isProcessing||Ma.useManualTiming?Kt.timestamp:performance.now()),Tu),set:e=>{Tu=e,queueMicrotask(QD)}},Ow=e=>t=>typeof t=="string"&&t.startsWith(e),Iw=Ow("--"),XD=Ow("var(--"),Ap=e=>XD(e)?JD.test(e.split("/*")[0].trim()):!1,JD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Kv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const bs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mo={...bs,transform:e=>xr(0,1,e)},du={...bs,default:1},xo=e=>Math.round(e*1e5)/1e5,Lp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eM(e){return e==null}const tM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dp=(e,t)=>n=>!!(typeof n=="string"&&tM.test(n)&&n.startsWith(e)||t&&!eM(n)&&Object.prototype.hasOwnProperty.call(n,t)),jw=(e,t,n)=>a=>{if(typeof a!="string")return a;const[s,o,u,c]=a.match(Lp);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(u),alpha:c!==void 0?parseFloat(c):1}},nM=e=>xr(0,255,e),Eh={...bs,transform:e=>Math.round(nM(e))},ri={test:Dp("rgb","red"),parse:jw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:a=1})=>"rgba("+Eh.transform(e)+", "+Eh.transform(t)+", "+Eh.transform(n)+", "+xo(Mo.transform(a))+")"};function rM(e){let t="",n="",a="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),a=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),a=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,a+=a,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(a,16),alpha:s?parseInt(s,16)/255:1}}const mf={test:Dp("#"),parse:rM,transform:ri.transform},qo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sa=qo("deg"),vr=qo("%"),be=qo("px"),aM=qo("vh"),iM=qo("vw"),qv={...vr,parse:e=>vr.parse(e)/100,transform:e=>vr.transform(e*100)},as={test:Dp("hsl","hue"),parse:jw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:a=1})=>"hsla("+Math.round(e)+", "+vr.transform(xo(t))+", "+vr.transform(xo(n))+", "+xo(Mo.transform(a))+")"},Lt={test:e=>ri.test(e)||mf.test(e)||as.test(e),parse:e=>ri.test(e)?ri.parse(e):as.test(e)?as.parse(e):mf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ri.transform(e):as.transform(e),getAnimatableNone:e=>{const t=Lt.parse(e);return t.alpha=0,Lt.transform(t)}},sM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oM(e){return isNaN(e)&&typeof e=="string"&&(e.match(Lp)?.length||0)+(e.match(sM)?.length||0)>0}const Uw="number",Bw="color",lM="var",uM="var(",Gv="${}",cM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ms(e){const t=e.toString(),n=[],a={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(cM,h=>(Lt.test(h)?(a.color.push(o),s.push(Bw),n.push(Lt.parse(h))):h.startsWith(uM)?(a.var.push(o),s.push(lM),n.push(h)):(a.number.push(o),s.push(Uw),n.push(parseFloat(h))),++o,Gv)).split(Gv);return{values:n,split:c,indexes:a,types:s}}function dM(e){return ms(e).values}function Fw({split:e,types:t}){const n=e.length;return a=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],a[o]!==void 0){const u=t[o];u===Uw?s+=xo(a[o]):u===Bw?s+=Lt.transform(a[o]):s+=a[o]}return s}}function hM(e){return Fw(ms(e))}const fM=e=>typeof e=="number"?0:Lt.test(e)?Lt.getAnimatableNone(e):e,pM=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:fM(e);function mM(e){const t=ms(e);return Fw(t)(t.values.map((a,s)=>pM(a,t.split[s])))}const ar={test:oM,parse:dM,createTransformer:hM,getAnimatableNone:mM};function Rh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gM({hue:e,saturation:t,lightness:n,alpha:a}){e/=360,t/=100,n/=100;let s=0,o=0,u=0;if(!t)s=o=u=n;else{const c=n<.5?n*(1+t):n+t-n*t,h=2*n-c;s=Rh(h,c,e+1/3),o=Rh(h,c,e),u=Rh(h,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(u*255),alpha:a}}function Ju(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Ah=(e,t,n)=>{const a=e*e,s=n*(t*t-a)+a;return s<0?0:Math.sqrt(s)},yM=[mf,ri,as],vM=e=>yM.find(t=>t.test(e));function Yv(e){const t=vM(e);if(!t)return!1;let n=t.parse(e);return t===as&&(n=gM(n)),n}const Zv=(e,t)=>{const n=Yv(e),a=Yv(t);if(!n||!a)return Ju(e,t);const s={...n};return o=>(s.red=Ah(n.red,a.red,o),s.green=Ah(n.green,a.green,o),s.blue=Ah(n.blue,a.blue,o),s.alpha=vt(n.alpha,a.alpha,o),ri.transform(s))},gf=new Set(["none","hidden"]);function bM(e,t){return gf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _M(e,t){return n=>vt(e,t,n)}function Mp(e){return typeof e=="number"?_M:typeof e=="string"?Ap(e)?Ju:Lt.test(e)?Zv:xM:Array.isArray(e)?Vw:typeof e=="object"?Lt.test(e)?Zv:wM:Ju}function Vw(e,t){const n=[...e],a=n.length,s=e.map((o,u)=>Mp(o)(o,t[u]));return o=>{for(let u=0;u<a;u++)n[u]=s[u](o);return n}}function wM(e,t){const n={...e,...t},a={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(a[s]=Mp(e[s])(e[s],t[s]));return s=>{for(const o in a)n[o]=a[o](s);return n}}function kM(e,t){const n=[],a={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],u=e.indexes[o][a[o]],c=e.values[u]??0;n[s]=c,a[o]++}return n}const xM=(e,t)=>{const n=ar.createTransformer(t),a=ms(e),s=ms(t);return a.indexes.var.length===s.indexes.var.length&&a.indexes.color.length===s.indexes.color.length&&a.indexes.number.length>=s.indexes.number.length?gf.has(e)&&!s.values.length||gf.has(t)&&!a.values.length?bM(e,t):Wo(Vw(kM(a,s),s.values),n):Ju(e,t)};function zw(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Mp(e)(e,t)}const SM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>dt.update(t,n),stop:()=>Na(t),now:()=>Kt.isProcessing?Kt.timestamp:on.now()}},$w=(e,t,n=10)=>{let a="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)a+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},ec=2e4;function Np(e){let t=0;const n=50;let a=e.next(t);for(;!a.done&&t<ec;)t+=n,a=e.next(t);return t>=ec?1/0:t}function PM(e,t=100,n){const a=n({...e,keyframes:[0,t]}),s=Math.min(Np(a),ec);return{type:"keyframes",ease:o=>a.next(s*o).value/t,duration:In(s)}}const St={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function yf(e,t){return e*Math.sqrt(1-t*t)}const TM=12;function CM(e,t,n){let a=n;for(let s=1;s<TM;s++)a=a-e(a)/t(a);return a}const Lh=.001;function EM({duration:e=St.duration,bounce:t=St.bounce,velocity:n=St.velocity,mass:a=St.mass}){let s,o,u=1-t;u=xr(St.minDamping,St.maxDamping,u),e=xr(St.minDuration,St.maxDuration,In(e)),u<1?(s=f=>{const m=f*u,y=m*e,b=m-n,w=yf(f,u),x=Math.exp(-y);return Lh-b/w*x},o=f=>{const y=f*u*e,b=y*n+n,w=Math.pow(u,2)*Math.pow(f,2)*e,x=Math.exp(-y),T=yf(Math.pow(f,2),u);return(-s(f)+Lh>0?-1:1)*((b-w)*x)/T}):(s=f=>{const m=Math.exp(-f*e),y=(f-n)*e+1;return-Lh+m*y},o=f=>{const m=Math.exp(-f*e),y=(n-f)*(e*e);return m*y});const c=5/e,h=CM(s,o,c);if(e=Sn(e),isNaN(h))return{stiffness:St.stiffness,damping:St.damping,duration:e};{const f=Math.pow(h,2)*a;return{stiffness:f,damping:u*2*Math.sqrt(a*f),duration:e}}}const RM=["duration","bounce"],AM=["stiffness","damping","mass"];function Qv(e,t){return t.some(n=>e[n]!==void 0)}function LM(e){let t={velocity:St.velocity,stiffness:St.stiffness,damping:St.damping,mass:St.mass,isResolvedFromDuration:!1,...e};if(!Qv(e,AM)&&Qv(e,RM))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,a=2*Math.PI/(n*1.2),s=a*a,o=2*xr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:St.mass,stiffness:s,damping:o}}else{const n=EM({...e,velocity:0});t={...t,...n,mass:St.mass},t.isResolvedFromDuration=!0}return t}function tc(e=St.visualDuration,t=St.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:s}=n;const o=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:h,damping:f,mass:m,duration:y,velocity:b,isResolvedFromDuration:w}=LM({...n,velocity:-In(n.velocity||0)}),x=b||0,T=f/(2*Math.sqrt(h*m)),P=u-o,L=In(Math.sqrt(h/m)),D=Math.abs(P)<5;a||(a=D?St.restSpeed.granular:St.restSpeed.default),s||(s=D?St.restDelta.granular:St.restDelta.default);let M,I,K,G,W,S;if(T<1)K=yf(L,T),G=(x+T*L*P)/K,M=X=>{const _e=Math.exp(-T*L*X);return u-_e*(G*Math.sin(K*X)+P*Math.cos(K*X))},W=T*L*G+P*K,S=T*L*P-G*K,I=X=>Math.exp(-T*L*X)*(W*Math.sin(K*X)+S*Math.cos(K*X));else if(T===1){M=_e=>u-Math.exp(-L*_e)*(P+(x+L*P)*_e);const X=x+L*P;I=_e=>Math.exp(-L*_e)*(L*X*_e-x)}else{const X=L*Math.sqrt(T*T-1);M=fe=>{const ce=Math.exp(-T*L*fe),ue=Math.min(X*fe,300);return u-ce*((x+T*L*P)*Math.sinh(ue)+X*P*Math.cosh(ue))/X};const _e=(x+T*L*P)/X,oe=T*L*_e-P*X,Re=T*L*P-_e*X;I=fe=>{const ce=Math.exp(-T*L*fe),ue=Math.min(X*fe,300);return ce*(oe*Math.sinh(ue)+Re*Math.cosh(ue))}}const Z={calculatedDuration:w&&y||null,velocity:X=>Sn(I(X)),next:X=>{if(!w&&T<1){const oe=Math.exp(-T*L*X),Re=Math.sin(K*X),fe=Math.cos(K*X),ce=u-oe*(G*Re+P*fe),ue=Sn(oe*(W*Re+S*fe));return c.done=Math.abs(ue)<=a&&Math.abs(u-ce)<=s,c.value=c.done?u:ce,c}const _e=M(X);if(w)c.done=X>=y;else{const oe=Sn(I(X));c.done=Math.abs(oe)<=a&&Math.abs(u-_e)<=s}return c.value=c.done?u:_e,c},toString:()=>{const X=Math.min(Np(Z),ec),_e=$w(oe=>Z.next(X*oe).value,X,30);return X+"ms "+_e},toTransition:()=>{}};return Z}tc.applyToOptions=e=>{const t=PM(e,100,tc);return e.ease=t.ease,e.duration=Sn(t.duration),e.type="keyframes",e};const DM=5;function Hw(e,t,n){const a=Math.max(t-DM,0);return xw(n-e(a),t-a)}function vf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:a=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:u,min:c,max:h,restDelta:f=.5,restSpeed:m}){const y=e[0],b={done:!1,value:y},w=S=>c!==void 0&&S<c||h!==void 0&&S>h,x=S=>c===void 0?h:h===void 0||Math.abs(c-S)<Math.abs(h-S)?c:h;let T=n*t;const P=y+T,L=u===void 0?P:u(P);L!==P&&(T=L-y);const D=S=>-T*Math.exp(-S/a),M=S=>L+D(S),I=S=>{const Z=D(S),X=M(S);b.done=Math.abs(Z)<=f,b.value=b.done?L:X};let K,G;const W=S=>{w(b.value)&&(K=S,G=tc({keyframes:[b.value,x(b.value)],velocity:Hw(M,S,b.value),damping:s,stiffness:o,restDelta:f,restSpeed:m}))};return W(0),{calculatedDuration:null,next:S=>{let Z=!1;return!G&&K===void 0&&(Z=!0,I(S),W(S)),K!==void 0&&S>=K?G.next(S-K):(!Z&&I(S),b)}}}function MM(e,t,n){const a=[],s=n||Ma.mix||zw,o=e.length-1;for(let u=0;u<o;u++){let c=s(e[u],e[u+1]);if(t){const h=Array.isArray(t)?t[u]||jn:t;c=Wo(h,c)}a.push(c)}return a}function NM(e,t,{clamp:n=!0,ease:a,mixer:s}={}){const o=e.length;if(Tp(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=MM(t,a,s),h=c.length,f=m=>{if(u&&m<e[0])return t[0];let y=0;if(h>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const b=Do(e[y],e[y+1],m);return c[y](b)};return n?m=>f(xr(e[0],e[o-1],m)):f}function OM(e,t){const n=e[e.length-1];for(let a=1;a<=t;a++){const s=Do(0,t,a);e.push(vt(n,1,s))}}function IM(e){const t=[0];return OM(t,e.length-1),t}function jM(e,t){return e.map(n=>n*t)}function UM(e,t){return e.map(()=>t||Dw).splice(0,e.length-1)}function So({duration:e=300,keyframes:t,times:n,ease:a="easeInOut"}){const s=KD(a)?a.map(Wv):Wv(a),o={done:!1,value:t[0]},u=jM(n&&n.length===t.length?n:IM(t),e),c=NM(u,t,{ease:Array.isArray(s)?s:UM(t,s)});return{calculatedDuration:e,next:h=>(o.value=c(h),o.done=h>=e,o)}}const BM=e=>e!==null;function kc(e,{repeat:t,repeatType:n="loop"},a,s=1){const o=e.filter(BM),c=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!c||a===void 0?o[c]:a}const FM={decay:vf,inertia:vf,tween:So,keyframes:So,spring:tc};function Ww(e){typeof e.type=="string"&&(e.type=FM[e.type])}class Op{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const VM=e=>e/100;class nc extends Op{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==on.now()&&this.tick(on.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ww(t);const{type:n=So,repeat:a=0,repeatDelay:s=0,repeatType:o,velocity:u=0}=t;let{keyframes:c}=t;const h=n||So;h!==So&&typeof c[0]!="number"&&(this.mixKeyframes=Wo(VM,zw(c[0],c[1])),c=[0,100]);const f=h({...t,keyframes:c});o==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...c].reverse(),velocity:-u})),f.calculatedDuration===null&&(f.calculatedDuration=Np(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(a+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:a,totalDuration:s,mixKeyframes:o,mirroredGenerator:u,resolvedDuration:c,calculatedDuration:h}=this;if(this.startTime===null)return a.next(0);const{delay:f=0,keyframes:m,repeat:y,repeatType:b,repeatDelay:w,type:x,onUpdate:T,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const L=this.currentTime-f*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?L<0:L>s;this.currentTime=Math.max(L,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let M=this.currentTime,I=a;if(y){const S=Math.min(this.currentTime,s)/c;let Z=Math.floor(S),X=S%1;!X&&S>=1&&(X=1),X===1&&Z--,Z=Math.min(Z,y+1),Z%2&&(b==="reverse"?(X=1-X,w&&(X-=w/c)):b==="mirror"&&(I=u)),M=xr(0,1,X)*c}let K;D?(this.delayState.value=m[0],K=this.delayState):K=I.next(M),o&&!D&&(K.value=o(K.value));let{done:G}=K;!D&&h!==null&&(G=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&G);return W&&x!==vf&&(K.value=kc(m,this.options,P,this.speed)),T&&T(K.value),W&&this.finish(),K}then(t,n){return this.finished.then(t,n)}get duration(){return In(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(this.currentTime)}set time(t){t=Sn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Hw(a=>this.generator.next(a).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(on.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=In(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=SM,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=n??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(on.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function zM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ai=e=>e*180/Math.PI,bf=e=>{const t=ai(Math.atan2(e[1],e[0]));return _f(t)},$M={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:bf,rotateZ:bf,skewX:e=>ai(Math.atan(e[1])),skewY:e=>ai(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_f=e=>(e=e%360,e<0&&(e+=360),e),Xv=bf,Jv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),e0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),HM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jv,scaleY:e0,scale:e=>(Jv(e)+e0(e))/2,rotateX:e=>_f(ai(Math.atan2(e[6],e[5]))),rotateY:e=>_f(ai(Math.atan2(-e[2],e[0]))),rotateZ:Xv,rotate:Xv,skewX:e=>ai(Math.atan(e[4])),skewY:e=>ai(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wf(e){return e.includes("scale")?1:0}function kf(e,t){if(!e||e==="none")return wf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,s;if(n)a=HM,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=$M,s=c}if(!s)return wf(t);const o=a[t],u=s[1].split(",").map(KM);return typeof o=="function"?o(u):u[o]}const WM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return kf(n,t)};function KM(e){return parseFloat(e.trim())}const _s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ws=new Set(_s),t0=e=>e===bs||e===be,qM=new Set(["x","y","z"]),GM=_s.filter(e=>!qM.has(e));function YM(e){const t=[];return GM.forEach(n=>{const a=e.getValue(n);a!==void 0&&(t.push([n,a.get()]),a.set(n.startsWith("scale")?1:0))}),t}const Aa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:a})=>{const s=e.max-e.min;return a==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:a})=>{const s=e.max-e.min;return a==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>kf(t,"x"),y:(e,{transform:t})=>kf(t,"y")};Aa.translateX=Aa.x;Aa.translateY=Aa.y;const ii=new Set;let xf=!1,Sf=!1,Pf=!1;function Kw(){if(Sf){const e=Array.from(ii).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),n=new Map;t.forEach(a=>{const s=YM(a);s.length&&(n.set(a,s),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const s=n.get(a);s&&s.forEach(([o,u])=>{a.getValue(o)?.set(u)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Sf=!1,xf=!1,ii.forEach(e=>e.complete(Pf)),ii.clear()}function qw(){ii.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sf=!0)})}function ZM(){Pf=!0,qw(),Kw(),Pf=!1}class Ip{constructor(t,n,a,s,o,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=a,this.motionValue=s,this.element=o,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(ii.add(this),xf||(xf=!0,dt.read(qw),dt.resolveKeyframes(Kw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:a,motionValue:s}=this;if(t[0]===null){const o=s?.get(),u=t[t.length-1];if(o!==void 0)t[0]=o;else if(a&&n){const c=a.readValue(n,u);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=u),s&&o===void 0&&s.set(t[0])}zM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ii.delete(this)}cancel(){this.state==="scheduled"&&(ii.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const QM=e=>e.startsWith("--");function Gw(e,t,n){QM(t)?e.style.setProperty(t,n):e.style[t]=n}const XM={};function Yw(e,t){const n=kw(e);return()=>XM[t]??n()}const JM=Yw(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Zw=Yw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_o=([e,t,n,a])=>`cubic-bezier(${e}, ${t}, ${n}, ${a})`,n0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function Qw(e,t){if(e)return typeof e=="function"?Zw()?$w(e,t):"ease-out":Mw(e)?_o(e):Array.isArray(e)?e.map(n=>Qw(n,t)||n0.easeOut):n0[e]}function e2(e,t,n,{delay:a=0,duration:s=300,repeat:o=0,repeatType:u="loop",ease:c="easeOut",times:h}={},f=void 0){const m={[t]:n};h&&(m.offset=h);const y=Qw(c,s);Array.isArray(y)&&(m.easing=y);const b={delay:a,duration:s,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:o+1,direction:u==="reverse"?"alternate":"normal"};return f&&(b.pseudoElement=f),e.animate(m,b)}function Xw(e){return typeof e=="function"&&"applyToOptions"in e}function t2({type:e,...t}){return Xw(e)&&Zw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Jw extends Op{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:a,keyframes:s,pseudoElement:o,allowFlatten:u=!1,finalKeyframe:c,onComplete:h}=t;this.isPseudoElement=!!o,this.allowFlatten=u,this.options=t,Tp(typeof t.type!="string");const f=t2(t);this.animation=e2(n,a,s,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=kc(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),Gw(n,a,m),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return In(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Sn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:a,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&JM()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),a&&(this.animation.rangeEnd=a),jn):s(this)}}const ek={anticipate:Rw,backInOut:Ew,circInOut:Lw};function n2(e){return e in ek}function r2(e){typeof e.ease=="string"&&n2(e.ease)&&(e.ease=ek[e.ease])}const Dh=10;class a2 extends Jw{constructor(t){r2(t),Ww(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:a,onComplete:s,element:o,...u}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new nc({...u,autoplay:!1}),h=Math.max(Dh,on.now()-this.startTime),f=xr(0,Dh,h-Dh),m=c.sample(h).value,{name:y}=this.options;o&&y&&Gw(o,y,m),n.setWithVelocity(c.sample(Math.max(0,h-f)).value,m,f),c.stop()}}const r0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ar.test(e)||e==="0")&&!e.startsWith("url("));function i2(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function s2(e,t,n,a){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],u=r0(s,t),c=r0(o,t);return!u||!c?!1:i2(e)||(n==="spring"||Xw(n))&&a}function Tf(e){e.duration=0,e.type="keyframes"}const tk=new Set(["opacity","clipPath","filter","transform"]),o2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function l2(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&o2.test(e[t]))return!0;return!1}const u2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),c2=kw(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function d2(e){const{motionValue:t,name:n,repeatDelay:a,repeatType:s,damping:o,type:u,keyframes:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:m}=t.owner.getProps();return c2()&&n&&(tk.has(n)||u2.has(n)&&l2(c))&&(n!=="transform"||!m)&&!f&&!a&&s!=="mirror"&&o!==0&&u!=="inertia"}const h2=40;class f2 extends Op{constructor({autoplay:t=!0,delay:n=0,type:a="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:u="loop",keyframes:c,name:h,motionValue:f,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=on.now();const b={autoplay:t,delay:n,type:a,repeat:s,repeatDelay:o,repeatType:u,name:h,motionValue:f,element:m,...y},w=m?.KeyframeResolver||Ip;this.keyframeResolver=new w(c,(x,T,P)=>this.onKeyframesResolved(x,T,b,!P),h,f,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,a,s){this.keyframeResolver=void 0;const{name:o,type:u,velocity:c,delay:h,isHandoff:f,onUpdate:m}=a;this.resolvedAt=on.now();let y=!0;s2(t,o,u,c)||(y=!1,(Ma.instantAnimations||!h)&&m?.(kc(t,a,n)),t[0]=t[t.length-1],Tf(a),a.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>h2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...a,keyframes:t},x=y&&!f&&d2(w),T=w.motionValue?.owner?.current;let P;if(x)try{P=new a2({...w,element:T})}catch{P=new nc(w)}else P=new nc(w);P.finished.then(()=>{this.notifyFinished()}).catch(jn),this.pendingTimeline&&(this.stopTimeline=P.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=P}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ZM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function nk(e,t,n,a=0,s=1){const o=Array.from(e).sort((f,m)=>f.sortNodePosition(m)).indexOf(t),u=e.size,c=(u-1)*a;return typeof n=="function"?n(o,u):s===1?o*a:c-o*a}const p2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function m2(e){const t=p2.exec(e);if(!t)return[,];const[,n,a,s]=t;return[`--${n??a}`,s]}function rk(e,t,n=1){const[a,s]=m2(e);if(!a)return;const o=window.getComputedStyle(t).getPropertyValue(a);if(o){const u=o.trim();return bw(u)?parseFloat(u):u}return Ap(s)?rk(s,t,n+1):s}const g2={type:"spring",stiffness:500,damping:25,restSpeed:10},y2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),v2={type:"keyframes",duration:.8},b2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_2=(e,{keyframes:t})=>t.length>2?v2:ws.has(e)?e.startsWith("scale")?y2(t[1]):g2:b2;function ak(e,t){if(e?.inherit&&t){const{inherit:n,...a}=e;return{...t,...a}}return e}function jp(e,t){const n=e?.[t]??e?.default??e;return n!==e?ak(n,e):n}const w2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function k2(e){for(const t in e)if(!w2.has(t))return!0;return!1}const Up=(e,t,n,a={},s,o)=>u=>{const c=jp(a,e)||{},h=c.delay||a.delay||0;let{elapsed:f=0}=a;f=f-Sn(h);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:b=>{t.set(b),c.onUpdate&&c.onUpdate(b)},onComplete:()=>{u(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};k2(c)||Object.assign(m,_2(e,m)),m.duration&&(m.duration=Sn(m.duration)),m.repeatDelay&&(m.repeatDelay=Sn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Tf(m),m.delay===0&&(y=!0)),(Ma.instantAnimations||Ma.skipAnimations||s?.shouldSkipAnimations)&&(y=!0,Tf(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,y&&!o&&t.get()!==void 0){const b=kc(m.keyframes,c);if(b!==void 0){dt.update(()=>{m.onUpdate(b),m.onComplete()});return}}return c.isSync?new nc(m):new f2(m)};function a0(e){const t=[{},{}];return e?.values.forEach((n,a)=>{t[0][a]=n.get(),t[1][a]=n.getVelocity()}),t}function Bp(e,t,n,a){if(typeof t=="function"){const[s,o]=a0(a);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=a0(a);t=t(n!==void 0?n:e.custom,s,o)}return t}function si(e,t,n){const a=e.getProps();return Bp(a,t,n!==void 0?n:a.custom,e)}const ik=new Set(["width","height","top","left","right","bottom",..._s]),i0=30,x2=e=>!isNaN(parseFloat(e)),s0={current:void 0};class S2{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const s=on.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=on.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=x2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Cp);const a=this.events[t].add(n);return t==="change"?()=>{a(),dt.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,a){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return s0.current&&s0.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=on.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>i0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,i0);return xw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gs(e,t){return new S2(e,t)}const Cf=e=>Array.isArray(e);function P2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gs(n))}function T2(e){return Cf(e)?e[e.length-1]||0:e}function C2(e,t){const n=si(e,t);let{transitionEnd:a={},transition:s={},...o}=n||{};o={...o,...a};for(const u in o){const c=T2(o[u]);P2(e,u,c)}}const qt=e=>!!(e&&e.getVelocity);function E2(e){return!!(qt(e)&&e.add)}function Ef(e,t){const n=e.getValue("willChange");if(E2(n))return n.add(t);if(!n&&Ma.WillChange){const a=new Ma.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function Fp(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const R2="framerAppearId",sk="data-"+Fp(R2);function ok(e){return e.props[sk]}function A2({protectedKeys:e,needsAnimating:t},n){const a=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,a}function lk(e,t,{delay:n=0,transitionOverride:a,type:s}={}){let{transition:o,transitionEnd:u,...c}=t;const h=e.getDefaultTransition();o=o?ak(o,h):h;const f=o?.reduceMotion;a&&(o=a);const m=[],y=s&&e.animationState&&e.animationState.getState()[s];for(const b in c){const w=e.getValue(b,e.latestValues[b]??null),x=c[b];if(x===void 0||y&&A2(y,b))continue;const T={delay:n,...jp(o||{},b)},P=w.get();if(P!==void 0&&!w.isAnimating()&&!Array.isArray(x)&&x===P&&!T.velocity){dt.update(()=>w.set(x));continue}let L=!1;if(window.MotionHandoffAnimation){const I=ok(e);if(I){const K=window.MotionHandoffAnimation(I,b,dt);K!==null&&(T.startTime=K,L=!0)}}Ef(e,b);const D=f??e.shouldReduceMotion;w.start(Up(b,w,x,D&&ik.has(b)?{type:!1}:T,e,L));const M=w.animation;M&&m.push(M)}if(u){const b=()=>dt.update(()=>{u&&C2(e,u)});m.length?Promise.all(m).then(b):b()}return m}function Rf(e,t,n={}){const a=si(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(s=n.transitionOverride);const o=a?()=>Promise.all(lk(e,a,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:f=0,staggerChildren:m,staggerDirection:y}=s;return L2(e,t,h,f,m,y,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[h,f]=c==="beforeChildren"?[o,u]:[u,o];return h().then(()=>f())}else return Promise.all([o(),u(n.delay)])}function L2(e,t,n=0,a=0,s=0,o=1,u){const c=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),c.push(Rf(h,t,{...u,delay:n+(typeof a=="function"?0:a)+nk(e.variantChildren,h,a,s,o)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(c)}function D2(e,t,n={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const s=t.map(o=>Rf(e,o,n));a=Promise.all(s)}else if(typeof t=="string")a=Rf(e,t,n);else{const s=typeof t=="function"?si(e,t,n.custom):t;a=Promise.all(lk(e,s,n))}return a.then(()=>{e.notify("AnimationComplete",t)})}const M2={test:e=>e==="auto",parse:e=>e},uk=e=>t=>t.test(e),ck=[bs,be,vr,Sa,iM,aM,M2],o0=e=>ck.find(uk(e));function N2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ww(e):!0}const O2=new Set(["brightness","contrast","saturate","opacity"]);function I2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=n.match(Lp)||[];if(!a)return e;const s=n.replace(a,"");let o=O2.has(t)?1:0;return a!==n&&(o*=100),t+"("+o+s+")"}const j2=/\b([a-z-]*)\(.*?\)/gu,Af={...ar,getAnimatableNone:e=>{const t=e.match(j2);return t?t.map(I2).join(" "):e}},Lf={...ar,getAnimatableNone:e=>{const t=ar.parse(e);return ar.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},l0={...bs,transform:Math.round},U2={rotate:Sa,rotateX:Sa,rotateY:Sa,rotateZ:Sa,scale:du,scaleX:du,scaleY:du,scaleZ:du,skew:Sa,skewX:Sa,skewY:Sa,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Mo,originX:qv,originY:qv,originZ:be},Vp={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,inset:be,insetBlock:be,insetBlockStart:be,insetBlockEnd:be,insetInline:be,insetInlineStart:be,insetInlineEnd:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,paddingBlock:be,paddingBlockStart:be,paddingBlockEnd:be,paddingInline:be,paddingInlineStart:be,paddingInlineEnd:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,marginBlock:be,marginBlockStart:be,marginBlockEnd:be,marginInline:be,marginInlineStart:be,marginInlineEnd:be,fontSize:be,backgroundPositionX:be,backgroundPositionY:be,...U2,zIndex:l0,fillOpacity:Mo,strokeOpacity:Mo,numOctaves:l0},B2={...Vp,color:Lt,backgroundColor:Lt,outlineColor:Lt,fill:Lt,stroke:Lt,borderColor:Lt,borderTopColor:Lt,borderRightColor:Lt,borderBottomColor:Lt,borderLeftColor:Lt,filter:Af,WebkitFilter:Af,mask:Lf,WebkitMask:Lf},dk=e=>B2[e],F2=new Set([Af,Lf]);function hk(e,t){let n=dk(e);return F2.has(n)||(n=ar),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const V2=new Set(["auto","none","0"]);function z2(e,t,n){let a=0,s;for(;a<e.length&&!s;){const o=e[a];typeof o=="string"&&!V2.has(o)&&ms(o).values.length&&(s=e[a]),a++}if(s&&n)for(const o of t)e[o]=hk(n,s)}class $2 extends Ip{constructor(t,n,a,s,o){super(t,n,a,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let y=t[m];if(typeof y=="string"&&(y=y.trim(),Ap(y))){const b=rk(y,n.current);b!==void 0&&(t[m]=b),m===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!ik.has(a)||t.length!==2)return;const[s,o]=t,u=o0(s),c=o0(o),h=Kv(s),f=Kv(o);if(h!==f&&Aa[a]){this.needsMeasurement=!0;return}if(u!==c)if(t0(u)&&t0(c))for(let m=0;m<t.length;m++){const y=t[m];typeof y=="string"&&(t[m]=parseFloat(y))}else Aa[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,a=[];for(let s=0;s<t.length;s++)(t[s]===null||N2(t[s]))&&a.push(s);a.length&&z2(t,a,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Aa[a](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(a,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:a}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=a.length-1,u=a[o];a[o]=Aa[n](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,h])=>{t.getValue(c).set(h)}),this.resolveNoneKeyframes()}}function fk(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const s=n?.[e]??a.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(a=>a!=null)}const pk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Cu(e){return _w(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:zp}=Nw(queueMicrotask,!1),tr={x:!1,y:!1};function mk(){return tr.x||tr.y}function H2(e){return e==="x"||e==="y"?tr[e]?null:(tr[e]=!0,()=>{tr[e]=!1}):tr.x||tr.y?null:(tr.x=tr.y=!0,()=>{tr.x=tr.y=!1})}function gk(e,t){const n=fk(e),a=new AbortController,s={passive:!0,...t,signal:a.signal};return[n,s,()=>a.abort()]}function W2(e){return!(e.pointerType==="touch"||mk())}function K2(e,t,n={}){const[a,s,o]=gk(e,n);return a.forEach(u=>{let c=!1,h=!1,f;const m=()=>{u.removeEventListener("pointerleave",x)},y=P=>{f&&(f(P),f=void 0),m()},b=P=>{c=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),h&&(h=!1,y(P))},w=()=>{c=!0,window.addEventListener("pointerup",b,s),window.addEventListener("pointercancel",b,s)},x=P=>{if(P.pointerType!=="touch"){if(c){h=!0;return}y(P)}},T=P=>{if(!W2(P))return;h=!1;const L=t(u,P);typeof L=="function"&&(f=L,u.addEventListener("pointerleave",x,s))};u.addEventListener("pointerenter",T,s),u.addEventListener("pointerdown",w,s)}),o}const yk=(e,t)=>t?e===t?!0:yk(e,t.parentElement):!1,$p=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,q2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function G2(e){return q2.has(e.tagName)||e.isContentEditable===!0}const Y2=new Set(["INPUT","SELECT","TEXTAREA"]);function Z2(e){return Y2.has(e.tagName)||e.isContentEditable===!0}const Eu=new WeakSet;function u0(e){return t=>{t.key==="Enter"&&e(t)}}function Mh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Q2=(e,t)=>{const n=e.currentTarget;if(!n)return;const a=u0(()=>{if(Eu.has(n))return;Mh(n,"down");const s=u0(()=>{Mh(n,"up")}),o=()=>Mh(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",a,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",a),t)};function c0(e){return $p(e)&&!mk()}const d0=new WeakSet;function X2(e,t,n={}){const[a,s,o]=gk(e,n),u=c=>{const h=c.currentTarget;if(!c0(c)||d0.has(c))return;Eu.add(h),n.stopPropagation&&d0.add(c);const f=t(h,c),m=(w,x)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",b),Eu.has(h)&&Eu.delete(h),c0(w)&&typeof f=="function"&&f(w,{success:x})},y=w=>{m(w,h===window||h===document||n.useGlobalTarget||yk(h,w.target))},b=w=>{m(w,!1)};window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",b,s)};return a.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",u,s),Cu(c)&&(c.addEventListener("focus",f=>Q2(f,s)),!G2(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function Hp(e){return _w(e)&&"ownerSVGElement"in e}const Ru=new WeakMap;let Au;const vk=(e,t,n)=>(a,s)=>s&&s[0]?s[0][e+"Size"]:Hp(a)&&"getBBox"in a?a.getBBox()[t]:a[n],J2=vk("inline","width","offsetWidth"),eN=vk("block","height","offsetHeight");function tN({target:e,borderBoxSize:t}){Ru.get(e)?.forEach(n=>{n(e,{get width(){return J2(e,t)},get height(){return eN(e,t)}})})}function nN(e){e.forEach(tN)}function rN(){typeof ResizeObserver>"u"||(Au=new ResizeObserver(nN))}function aN(e,t){Au||rN();const n=fk(e);return n.forEach(a=>{let s=Ru.get(a);s||(s=new Set,Ru.set(a,s)),s.add(t),Au?.observe(a)}),()=>{n.forEach(a=>{const s=Ru.get(a);s?.delete(t),s?.size||Au?.unobserve(a)})}}const Lu=new Set;let is;function iN(){is=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Lu.forEach(t=>t(e))},window.addEventListener("resize",is)}function sN(e){return Lu.add(e),is||iN(),()=>{Lu.delete(e),!Lu.size&&typeof is=="function"&&(window.removeEventListener("resize",is),is=void 0)}}function h0(e,t){return typeof e=="function"?sN(e):aN(e,t)}function oN(e){return Hp(e)&&e.tagName==="svg"}const lN=[...ck,Lt,ar],uN=e=>lN.find(uk(e)),f0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ss=()=>({x:f0(),y:f0()}),p0=()=>({min:0,max:0}),It=()=>({x:p0(),y:p0()}),cN=new WeakMap;function xc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function No(e){return typeof e=="string"||Array.isArray(e)}const Wp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kp=["initial",...Wp];function Sc(e){return xc(e.animate)||Kp.some(t=>No(e[t]))}function bk(e){return!!(Sc(e)||e.variants)}function dN(e,t,n){for(const a in t){const s=t[a],o=n[a];if(qt(s))e.addValue(a,s);else if(qt(o))e.addValue(a,gs(s,{owner:e}));else if(o!==s)if(e.hasValue(a)){const u=e.getValue(a);u.liveStyle===!0?u.jump(s):u.hasAnimated||u.set(s)}else{const u=e.getStaticValue(a);e.addValue(a,gs(u!==void 0?u:s,{owner:e}))}}for(const a in n)t[a]===void 0&&e.removeValue(a);return t}const Df={current:null},_k={current:!1},hN=typeof window<"u";function fN(){if(_k.current=!0,!!hN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Df.current=e.matches;e.addEventListener("change",t),t()}else Df.current=!1}const m0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let rc={};function wk(e){rc=e}function pN(){return rc}class mN{scrapeMotionValuesFromProps(t,n,a){return{}}constructor({parent:t,props:n,presenceContext:a,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:u,visualState:c},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ip,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=on.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,dt.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=c;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=h,this.blockInitialAnimation=!!u,this.isControllingVariants=Sc(n),this.isVariantNode=bk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:y,...b}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in b){const x=b[w];f[w]!==void 0&&qt(x)&&x.set(f[w])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,cN.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,a)=>this.bindToMotionValue(a,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(_k.current||fN(),this.shouldReduceMotion=Df.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Na(this.notifyUpdate),Na(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&tk.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:c,times:h,ease:f,duration:m}=n.accelerate,y=new Jw({element:this.current,name:t,keyframes:c,times:h,ease:f,duration:Sn(m)}),b=u(y);this.valueSubscriptions.set(t,()=>{b(),y.cancel()});return}const a=ws.has(t);a&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&dt.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in rc){const n=rc[t];if(!n)continue;const{isEnabled:a,Feature:s}=n;if(!this.features[t]&&s&&a(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):It()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let a=0;a<m0.length;a++){const s=m0[a];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,u=t[o];u&&(this.propEventSubscriptions[s]=this.on(s,u))}this.prevMotionValues=dN(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const a=this.values.get(t);n!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&n!==void 0&&(a=gs(n===null?void 0:n,{owner:this}),this.addValue(t,a)),a}readValue(t,n){let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(bw(a)||ww(a))?a=parseFloat(a):!uN(a)&&ar.test(n)&&(a=hk(t,n)),this.setBaseTarget(t,qt(a)?a.get():a)),qt(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let a;if(typeof n=="string"||typeof n=="object"){const o=Bp(this.props,n,this.presenceContext?.custom);o&&(a=o[t])}if(n&&a!==void 0)return a;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!qt(s)?s:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Cp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){zp.render(this.render)}}class kk extends mN{constructor(){super(...arguments),this.KeyframeResolver=$2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const a=t.style;return a?a[n]:void 0}removeValueFromRenderState(t,{vars:n,style:a}){delete n[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ia{constructor(t){this.isMounted=!1,this.node=t}update(){}}function xk({top:e,left:t,right:n,bottom:a}){return{x:{min:t,max:n},y:{min:e,max:a}}}function gN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:a.y,right:a.x}}function Nh(e){return e===void 0||e===1}function Mf({scale:e,scaleX:t,scaleY:n}){return!Nh(e)||!Nh(t)||!Nh(n)}function ei(e){return Mf(e)||Sk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Sk(e){return g0(e.x)||g0(e.y)}function g0(e){return e&&e!=="0%"}function ac(e,t,n){const a=e-n,s=t*a;return n+s}function y0(e,t,n,a,s){return s!==void 0&&(e=ac(e,s,a)),ac(e,n,a)+t}function Nf(e,t=0,n=1,a,s){e.min=y0(e.min,t,n,a,s),e.max=y0(e.max,t,n,a,s)}function Pk(e,{x:t,y:n}){Nf(e.x,t.translate,t.scale,t.originPoint),Nf(e.y,n.translate,n.scale,n.originPoint)}const v0=.999999999999,b0=1.0000000000001;function vN(e,t,n,a=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,u;for(let c=0;c<s;c++){o=n[c],u=o.projectionDelta;const{visualElement:h}=o.options;h&&h.props.style&&h.props.style.display==="contents"||(a&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(pr(e.x,-o.scroll.offset.x),pr(e.y,-o.scroll.offset.y)),u&&(t.x*=u.x.scale,t.y*=u.y.scale,Pk(e,u)),a&&ei(o.latestValues)&&Du(e,o.latestValues,o.layout?.layoutBox))}t.x<b0&&t.x>v0&&(t.x=1),t.y<b0&&t.y>v0&&(t.y=1)}function pr(e,t){e.min+=t,e.max+=t}function _0(e,t,n,a,s=.5){const o=vt(e.min,e.max,s);Nf(e,t,n,o,a)}function w0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Du(e,t,n){const a=n??e;_0(e.x,w0(t.x,a.x),t.scaleX,t.scale,t.originX),_0(e.y,w0(t.y,a.y),t.scaleY,t.scale,t.originY)}function Tk(e,t){return xk(yN(e.getBoundingClientRect(),t))}function bN(e,t,n){const a=Tk(e,n),{scroll:s}=t;return s&&(pr(a.x,s.offset.x),pr(a.y,s.offset.y)),a}const _N={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wN=_s.length;function kN(e,t,n){let a="",s=!0;for(let o=0;o<wN;o++){const u=_s[o],c=e[u];if(c===void 0)continue;let h=!0;if(typeof c=="number")h=c===(u.startsWith("scale")?1:0);else{const f=parseFloat(c);h=u.startsWith("scale")?f===1:f===0}if(!h||n){const f=pk(c,Vp[u]);if(!h){s=!1;const m=_N[u]||u;a+=`${m}(${f}) `}n&&(t[u]=f)}}return a=a.trim(),n?a=n(t,s?"":a):s&&(a="none"),a}function qp(e,t,n){const{style:a,vars:s,transformOrigin:o}=e;let u=!1,c=!1;for(const h in t){const f=t[h];if(ws.has(h)){u=!0;continue}else if(Iw(h)){s[h]=f;continue}else{const m=pk(f,Vp[h]);h.startsWith("origin")?(c=!0,o[h]=m):a[h]=m}}if(t.transform||(u||n?a.transform=kN(t,e.transform,n):a.transform&&(a.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:m=0}=o;a.transformOrigin=`${h} ${f} ${m}`}}function Ck(e,{style:t,vars:n},a,s){const o=e.style;let u;for(u in t)o[u]=t[u];s?.applyProjectionStyles(o,a);for(u in n)o.setProperty(u,n[u])}function k0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const po={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(be.test(e))e=parseFloat(e);else return e;const n=k0(e,t.target.x),a=k0(e,t.target.y);return`${n}% ${a}%`}},xN={correct:(e,{treeScale:t,projectionDelta:n})=>{const a=e,s=ar.parse(e);if(s.length>5)return a;const o=ar.createTransformer(e),u=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,h=n.y.scale*t.y;s[0+u]/=c,s[1+u]/=h;const f=vt(c,h,.5);return typeof s[2+u]=="number"&&(s[2+u]/=f),typeof s[3+u]=="number"&&(s[3+u]/=f),o(s)}},Of={borderRadius:{...po,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:po,borderTopRightRadius:po,borderBottomLeftRadius:po,borderBottomRightRadius:po,boxShadow:xN};function Ek(e,{layout:t,layoutId:n}){return ws.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Of[e]||e==="opacity")}function Gp(e,t,n){const a=e.style,s=t?.style,o={};if(!a)return o;for(const u in a)(qt(a[u])||s&&qt(s[u])||Ek(u,e)||n?.getValue(u)?.liveStyle!==void 0)&&(o[u]=a[u]);return o}function SN(e){return window.getComputedStyle(e)}class PN extends kk{constructor(){super(...arguments),this.type="html",this.renderInstance=Ck}readValueFromInstance(t,n){if(ws.has(n))return this.projection?.isProjecting?wf(n):WM(t,n);{const a=SN(t),s=(Iw(n)?a.getPropertyValue(n):a[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Tk(t,n)}build(t,n,a){qp(t,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,n,a){return Gp(t,n,a)}}const TN={offset:"stroke-dashoffset",array:"stroke-dasharray"},CN={offset:"strokeDashoffset",array:"strokeDasharray"};function EN(e,t,n=1,a=0,s=!0){e.pathLength=1;const o=s?TN:CN;e[o.offset]=`${-a}`,e[o.array]=`${t} ${n}`}const RN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Rk(e,{attrX:t,attrY:n,attrScale:a,pathLength:s,pathSpacing:o=1,pathOffset:u=0,...c},h,f,m){if(qp(e,c,f),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:b}=e;y.transform&&(b.transform=y.transform,delete y.transform),(b.transform||y.transformOrigin)&&(b.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),b.transform&&(b.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of RN)y[w]!==void 0&&(b[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),a!==void 0&&(y.scale=a),s!==void 0&&EN(y,s,o,u,!1)}const Ak=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Lk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function AN(e,t,n,a){Ck(e,t,void 0,a);for(const s in t.attrs)e.setAttribute(Ak.has(s)?s:Fp(s),t.attrs[s])}function Dk(e,t,n){const a=Gp(e,t,n);for(const s in e)if(qt(e[s])||qt(t[s])){const o=_s.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;a[o]=e[s]}return a}class LN extends kk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ws.has(n)){const a=dk(n);return a&&a.default||0}return n=Ak.has(n)?n:Fp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,a){return Dk(t,n,a)}build(t,n,a){Rk(t,n,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,n,a,s){AN(t,n,a,s)}mount(t){this.isSVGTag=Lk(t.tagName),super.mount(t)}}const DN=Kp.length;function Mk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Mk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<DN;n++){const a=Kp[n],s=e.props[a];(No(s)||s===!1)&&(t[a]=s)}return t}function Nk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let a=0;a<n;a++)if(t[a]!==e[a])return!1;return!0}const MN=[...Wp].reverse(),NN=Wp.length;function ON(e){return t=>Promise.all(t.map(({animation:n,options:a})=>D2(e,n,a)))}function IN(e){let t=ON(e),n=x0(),a=!0,s=!1;const o=f=>(m,y)=>{const b=si(e,y,f==="exit"?e.presenceContext?.custom:void 0);if(b){const{transition:w,transitionEnd:x,...T}=b;m={...m,...T,...x}}return m};function u(f){t=f(e)}function c(f){const{props:m}=e,y=Mk(e.parent)||{},b=[],w=new Set;let x={},T=1/0;for(let L=0;L<NN;L++){const D=MN[L],M=n[D],I=m[D]!==void 0?m[D]:y[D],K=No(I),G=D===f?M.isActive:null;G===!1&&(T=L);let W=I===y[D]&&I!==m[D]&&K;if(W&&(a||s)&&e.manuallyAnimateOnMount&&(W=!1),M.protectedKeys={...x},!M.isActive&&G===null||!I&&!M.prevProp||xc(I)||typeof I=="boolean")continue;if(D==="exit"&&M.isActive&&G!==!0){M.prevResolvedValues&&(x={...x,...M.prevResolvedValues});continue}const S=jN(M.prevProp,I);let Z=S||D===f&&M.isActive&&!W&&K||L>T&&K,X=!1;const _e=Array.isArray(I)?I:[I];let oe=_e.reduce(o(D),{});G===!1&&(oe={});const{prevResolvedValues:Re={}}=M,fe={...Re,...oe},ce=H=>{Z=!0,w.has(H)&&(X=!0,w.delete(H)),M.needsAnimating[H]=!0;const Y=e.getValue(H);Y&&(Y.liveStyle=!1)};for(const H in fe){const Y=oe[H],$=Re[H];if(x.hasOwnProperty(H))continue;let N=!1;Cf(Y)&&Cf($)?N=!Nk(Y,$):N=Y!==$,N?Y!=null?ce(H):w.add(H):Y!==void 0&&w.has(H)?ce(H):M.protectedKeys[H]=!0}M.prevProp=I,M.prevResolvedValues=oe,M.isActive&&(x={...x,...oe}),(a||s)&&e.blockInitialAnimation&&(Z=!1);const ue=W&&S;Z&&(!ue||X)&&b.push(..._e.map(H=>{const Y={type:D};if(typeof H=="string"&&(a||s)&&!ue&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,N=si($,H);if($.enteringChildren&&N){const{delayChildren:q}=N.transition||{};Y.delay=nk($.enteringChildren,e,q)}}return{animation:H,options:Y}}))}if(w.size){const L={};if(typeof m.initial!="boolean"){const D=si(e,Array.isArray(m.initial)?m.initial[0]:m.initial);D&&D.transition&&(L.transition=D.transition)}w.forEach(D=>{const M=e.getBaseTarget(D),I=e.getValue(D);I&&(I.liveStyle=!0),L[D]=M??null}),b.push({animation:L})}let P=!!b.length;return a&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(P=!1),a=!1,s=!1,P?t(b):Promise.resolve()}function h(f,m){if(n[f].isActive===m)return Promise.resolve();e.variantChildren?.forEach(b=>b.animationState?.setActive(f,m)),n[f].isActive=m;const y=c(f);for(const b in n)n[b].protectedKeys={};return y}return{animateChanges:c,setActive:h,setAnimateFunction:u,getState:()=>n,reset:()=>{n=x0(),s=!0}}}function jN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Nk(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x0(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}function If(e,t){e.min=t.min,e.max=t.max}function er(e,t){If(e.x,t.x),If(e.y,t.y)}function S0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ok=1e-4,UN=1-Ok,BN=1+Ok,Ik=.01,FN=0-Ik,VN=0+Ik;function ln(e){return e.max-e.min}function zN(e,t,n){return Math.abs(e-t)<=n}function P0(e,t,n,a=.5){e.origin=a,e.originPoint=vt(t.min,t.max,e.origin),e.scale=ln(n)/ln(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=UN&&e.scale<=BN||isNaN(e.scale))&&(e.scale=1),(e.translate>=FN&&e.translate<=VN||isNaN(e.translate))&&(e.translate=0)}function Po(e,t,n,a){P0(e.x,t.x,n.x,a?a.originX:void 0),P0(e.y,t.y,n.y,a?a.originY:void 0)}function T0(e,t,n,a=0){const s=a?vt(n.min,n.max,a):n.min;e.min=s+t.min,e.max=e.min+ln(t)}function $N(e,t,n,a){T0(e.x,t.x,n.x,a?.x),T0(e.y,t.y,n.y,a?.y)}function C0(e,t,n,a=0){const s=a?vt(n.min,n.max,a):n.min;e.min=t.min-s,e.max=e.min+ln(t)}function ic(e,t,n,a){C0(e.x,t.x,n.x,a?.x),C0(e.y,t.y,n.y,a?.y)}function E0(e,t,n,a,s){return e-=t,e=ac(e,1/n,a),s!==void 0&&(e=ac(e,1/s,a)),e}function HN(e,t=0,n=1,a=.5,s,o=e,u=e){if(vr.test(t)&&(t=parseFloat(t),t=vt(u.min,u.max,t/100)-u.min),typeof t!="number")return;let c=vt(o.min,o.max,a);e===o&&(c-=t),e.min=E0(e.min,t,n,c,s),e.max=E0(e.max,t,n,c,s)}function R0(e,t,[n,a,s],o,u){HN(e,t[n],t[a],t[s],t.scale,o,u)}const WN=["x","scaleX","originX"],KN=["y","scaleY","originY"];function A0(e,t,n,a){R0(e.x,t,WN,n?n.x:void 0,a?a.x:void 0),R0(e.y,t,KN,n?n.y:void 0,a?a.y:void 0)}function L0(e){return e.translate===0&&e.scale===1}function jk(e){return L0(e.x)&&L0(e.y)}function D0(e,t){return e.min===t.min&&e.max===t.max}function qN(e,t){return D0(e.x,t.x)&&D0(e.y,t.y)}function M0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Uk(e,t){return M0(e.x,t.x)&&M0(e.y,t.y)}function N0(e){return ln(e.x)/ln(e.y)}function O0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function fr(e){return[e("x"),e("y")]}function GN(e,t,n){let a="";const s=e.x.translate/t.x,o=e.y.translate/t.y,u=n?.z||0;if((s||o||u)&&(a=`translate3d(${s}px, ${o}px, ${u}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:y,rotateY:b,skewX:w,skewY:x}=n;f&&(a=`perspective(${f}px) ${a}`),m&&(a+=`rotate(${m}deg) `),y&&(a+=`rotateX(${y}deg) `),b&&(a+=`rotateY(${b}deg) `),w&&(a+=`skewX(${w}deg) `),x&&(a+=`skewY(${x}deg) `)}const c=e.x.scale*t.x,h=e.y.scale*t.y;return(c!==1||h!==1)&&(a+=`scale(${c}, ${h})`),a||"none"}const Bk=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],YN=Bk.length,I0=e=>typeof e=="string"?parseFloat(e):e,j0=e=>typeof e=="number"||be.test(e);function ZN(e,t,n,a,s,o){s?(e.opacity=vt(0,n.opacity??1,QN(a)),e.opacityExit=vt(t.opacity??1,0,XN(a))):o&&(e.opacity=vt(t.opacity??1,n.opacity??1,a));for(let u=0;u<YN;u++){const c=Bk[u];let h=U0(t,c),f=U0(n,c);if(h===void 0&&f===void 0)continue;h||(h=0),f||(f=0),h===0||f===0||j0(h)===j0(f)?(e[c]=Math.max(vt(I0(h),I0(f),a),0),(vr.test(f)||vr.test(h))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,a))}function U0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const QN=Fk(0,.5,Aw),XN=Fk(.5,.95,jn);function Fk(e,t,n){return a=>a<e?0:a>t?1:n(Do(e,t,a))}function JN(e,t,n){const a=qt(e)?e:gs(e);return a.start(Up("",a,t,n)),a.animation}function Oo(e,t,n,a={passive:!0}){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n)}const eO=(e,t)=>e.depth-t.depth;class tO{constructor(){this.children=[],this.isDirty=!1}add(t){Pp(this.children,t),this.isDirty=!0}remove(t){Xu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eO),this.isDirty=!1,this.children.forEach(t)}}function nO(e,t){const n=on.now(),a=({timestamp:s})=>{const o=s-n;o>=t&&(Na(a),e(o-t))};return dt.setup(a,!0),()=>Na(a)}function Mu(e){return qt(e)?e.get():e}class rO{constructor(){this.members=[]}add(t){Pp(this.members,t);for(let n=this.members.length-1;n>=0;n--){const a=this.members[n];if(a===t||a===this.lead||a===this.prevLead)continue;const s=a.instance;(!s||s.isConnected===!1)&&!a.snapshot&&(Xu(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(Xu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const a=this.members[n];if(a.isPresent!==!1&&a.instance?.isConnected!==!1)return this.promote(a),!0}return!1}promote(t,n){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=a.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=a,n&&(a.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Nu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Oh=["","X","Y","Z"],aO=1e3;let iO=0;function Ih(e,t,n,a){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),a&&(a[e]=0))}function Vk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ok(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",dt,!(s||o))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&Vk(a)}function zk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:a,resetTransform:s}){return class{constructor(u={},c=t?.()){this.id=iO++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(lO),this.nodes.forEach(pO),this.nodes.forEach(mO),this.nodes.forEach(uO)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new tO)}addEventListener(u,c){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Cp),this.eventHandlers.get(u).add(c)}notifyListeners(u,...c){const h=this.eventHandlers.get(u);h&&h.notify(...c)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=Hp(u)&&!oN(u),this.instance=u;const{layoutId:c,layout:h,visualElement:f}=this.options;if(f&&!f.current&&f.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||c)&&(this.isLayoutDirty=!0),e){let m,y=0;const b=()=>this.root.updateBlockedByResize=!1;dt.read(()=>{y=window.innerWidth}),e(u,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=nO(b,250),Nu.hasAnimatedSinceResize&&(Nu.hasAnimatedSinceResize=!1,this.nodes.forEach(V0)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:b,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||_O,{onLayoutAnimationStart:T,onLayoutAnimationComplete:P}=f.getProps(),L=!this.targetLayout||!Uk(this.targetLayout,w),D=!y&&b;if(this.options.layoutRoot||this.resumeFrom||D||y&&(L||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...jp(x,"layout"),onPlay:T,onComplete:P};(f.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M),this.setAnimationOrigin(m,D)}else y||V0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Na(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gO),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:c,layout:h}=this.options;if(c===void 0&&!h)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(dO),this.nodes.forEach(B0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(F0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hO),this.nodes.forEach(fO),this.nodes.forEach(sO),this.nodes.forEach(oO)):this.nodes.forEach(F0),this.clearAllSnapshots();const c=on.now();Kt.delta=xr(0,1e3/60,c-Kt.timestamp),Kt.timestamp=c,Kt.isProcessing=!0,Ch.update.process(Kt),Ch.preRender.process(Kt),Ch.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cO),this.sharedNodes.forEach(yO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ln(this.snapshot.measuredBox.x)&&!ln(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=It()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(c=!1),c&&this.instance){const h=a(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!s)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!jk(this.projectionDelta),h=this.getTransformTemplate(),f=h?h(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;u&&this.instance&&(c||ei(this.latestValues)||m)&&(s(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const c=this.measurePageBox();let h=this.removeElementScroll(c);return u&&(h=this.removeTransform(h)),wO(h),{animationId:this.root.animationId,measuredBox:c,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return It();const c=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(kO))){const{scroll:f}=this.root;f&&(pr(c.x,f.offset.x),pr(c.y,f.offset.y))}return c}removeElementScroll(u){const c=It();if(er(c,u),this.scroll?.wasRoot)return c;for(let h=0;h<this.path.length;h++){const f=this.path[h],{scroll:m,options:y}=f;f!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&er(c,u),pr(c.x,m.offset.x),pr(c.y,m.offset.y))}return c}applyTransform(u,c=!1,h){const f=h||It();er(f,u);for(let m=0;m<this.path.length;m++){const y=this.path[m];!c&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(pr(f.x,-y.scroll.offset.x),pr(f.y,-y.scroll.offset.y)),ei(y.latestValues)&&Du(f,y.latestValues,y.layout?.layoutBox)}return ei(this.latestValues)&&Du(f,this.latestValues,this.layout?.layoutBox),f}removeTransform(u){const c=It();er(c,u);for(let h=0;h<this.path.length;h++){const f=this.path[h];if(!ei(f.latestValues))continue;let m;f.instance&&(Mf(f.latestValues)&&f.updateSnapshot(),m=It(),er(m,f.measurePageBox())),A0(c,f.latestValues,f.snapshot?.layoutBox,m)}return ei(this.latestValues)&&A0(c,this.latestValues),c}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==c;if(!(u||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=Kt.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$N(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):er(this.target,this.layout.layoutBox),Pk(this.target,this.targetDelta)):er(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mf(this.parent.latestValues)||Sk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,c,h){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),ic(this.relativeTargetOrigin,c,h,this.options.layoutAnchor||void 0),er(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),c=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(h=!1),h)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;er(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,b=this.treeScale.y;vN(this.layoutCorrected,this.treeScale,this.path,c),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=It());const{target:w}=u;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(S0(this.prevProjectionDelta.x,this.projectionDelta.x),S0(this.prevProjectionDelta.y,this.projectionDelta.y)),Po(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==b||!O0(this.projectionDelta.x,this.prevProjectionDelta.x)||!O0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ss(),this.projectionDelta=ss(),this.projectionDeltaWithTransform=ss()}setAnimationOrigin(u,c=!1){const h=this.snapshot,f=h?h.latestValues:{},m={...this.latestValues},y=ss();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const b=It(),w=h?h.source:void 0,x=this.layout?this.layout.source:void 0,T=w!==x,P=this.getStack(),L=!P||P.members.length<=1,D=!!(T&&!L&&this.options.crossfade===!0&&!this.path.some(bO));this.animationProgress=0;let M;this.mixTargetDelta=I=>{const K=I/1e3;z0(y.x,u.x,K),z0(y.y,u.y,K),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ic(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),vO(this.relativeTarget,this.relativeTargetOrigin,b,K),M&&qN(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=It()),er(M,this.relativeTarget)),T&&(this.animationValues=m,ZN(m,f,this.latestValues,K,D,L)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=K},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Na(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dt.update(()=>{Nu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gs(0)),this.motionValue.jump(0,!1),this.currentAnimation=JN(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),u.onUpdate&&u.onUpdate(c)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(aO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:c,target:h,layout:f,latestValues:m}=u;if(!(!c||!h||!f)){if(this!==u&&this.layout&&f&&$k(this.options.animationType,this.layout.layoutBox,f.layoutBox)){h=this.target||It();const y=ln(this.layout.layoutBox.x);h.x.min=u.target.x.min,h.x.max=h.x.min+y;const b=ln(this.layout.layoutBox.y);h.y.min=u.target.y.min,h.y.max=h.y.min+b}er(c,h),Du(c,m),Po(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(u,c){this.sharedNodes.has(u)||this.sharedNodes.set(u,new rO),this.sharedNodes.get(u).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:c,preserveFollowOpacity:h}={}){const f=this.getStack();f&&f.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let c=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(c=!0),!c)return;const f={};h.z&&Ih("z",u,f,this.animationValues);for(let m=0;m<Oh.length;m++)Ih(`rotate${Oh[m]}`,u,f,this.animationValues),Ih(`skew${Oh[m]}`,u,f,this.animationValues);u.render();for(const m in f)u.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);u.scheduleRender()}applyProjectionStyles(u,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Mu(c?.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Mu(c?.pointerEvents)||""),this.hasProjected&&!ei(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const m=f.animationValues||f.latestValues;this.applyTransformsToTarget();let y=GN(this.projectionDeltaWithTransform,this.treeScale,m);h&&(y=h(m,y)),u.transform=y;const{x:b,y:w}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${w.origin*100}% 0`,f.animationValues?u.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const x in Of){if(m[x]===void 0)continue;const{correct:T,applyTo:P,isCSSVariable:L}=Of[x],D=y==="none"?m[x]:T(m[x],f);if(P){const M=P.length;for(let I=0;I<M;I++)u[P[I]]=D}else L?this.options.visualElement.renderState.vars[x]=D:u[x]=D}this.options.layoutId&&(u.pointerEvents=f===this?Mu(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(B0),this.root.sharedNodes.clear()}}}function sO(e){e.updateLayout()}function oO(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:a}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")fr(m=>{const y=o?t.measuredBox[m]:t.layoutBox[m],b=ln(y);y.min=n[m].min,y.max=y.min+b});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";If(o?t.measuredBox[m]:t.layoutBox[m],n[m])}else $k(s,t.layoutBox,n)&&fr(m=>{const y=o?t.measuredBox[m]:t.layoutBox[m],b=ln(n[m]);y.max=y.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+b)});const u=ss();Po(u,n,t.layoutBox);const c=ss();o?Po(c,e.applyTransform(a,!0),t.measuredBox):Po(c,n,t.layoutBox);const h=!jk(u);let f=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:b}=m;if(y&&b){const w=e.options.layoutAnchor||void 0,x=It();ic(x,t.layoutBox,y.layoutBox,w);const T=It();ic(T,n,b.layoutBox,w),Uk(x,T)||(f=!0),m.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=x,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function lO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cO(e){e.clearSnapshot()}function B0(e){e.clearMeasurements()}function dO(e){e.isLayoutDirty=!0,e.updateLayout()}function F0(e){e.isLayoutDirty=!1}function hO(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function fO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function V0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pO(e){e.resolveTargetDelta()}function mO(e){e.calcProjection()}function gO(e){e.resetSkewAndRotation()}function yO(e){e.removeLeadSnapshot()}function z0(e,t,n){e.translate=vt(t.translate,0,n),e.scale=vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $0(e,t,n,a){e.min=vt(t.min,n.min,a),e.max=vt(t.max,n.max,a)}function vO(e,t,n,a){$0(e.x,t.x,n.x,a),$0(e.y,t.y,n.y,a)}function bO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _O={duration:.45,ease:[.4,0,.1,1]},H0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),W0=H0("applewebkit/")&&!H0("chrome/")?Math.round:jn;function K0(e){e.min=W0(e.min),e.max=W0(e.max)}function wO(e){K0(e.x),K0(e.y)}function $k(e,t,n){return e==="position"||e==="preserve-aspect"&&!zN(N0(t),N0(n),.2)}function kO(e){return e!==e.root&&e.scroll?.wasRoot}const xO=zk({attachResizeListener:(e,t)=>Oo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),jh={current:void 0},Hk=zk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!jh.current){const e=new xO({});e.mount(window),e.setOptions({layoutScroll:!0}),jh.current=e}return jh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Yp=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function q0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function SO(...e){return t=>{let n=!1;const a=e.map(s=>{const o=q0(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<a.length;s++){const o=a[s];typeof o=="function"?o():q0(e[s],null)}}}}function PO(...e){return k.useCallback(SO(...e),e)}class TO extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Cu(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=n.offsetParent,s=Cu(a)&&a.offsetWidth||0,o=Cu(a)&&a.offsetHeight||0,u=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(u.height),c.width=parseFloat(u.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=s-c.width-c.left,c.bottom=o-c.height-c.top}return null}componentDidUpdate(){}render(){return this.props.children}}function CO({children:e,isPresent:t,anchorX:n,anchorY:a,root:s,pop:o}){const u=k.useId(),c=k.useRef(null),h=k.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=k.useContext(Yp),m=e.props?.ref??e?.ref,y=PO(c,m);return k.useInsertionEffect(()=>{const{width:b,height:w,top:x,left:T,right:P,bottom:L}=h.current;if(t||o===!1||!c.current||!b||!w)return;const D=n==="left"?`left: ${T}`:`right: ${P}`,M=a==="bottom"?`bottom: ${L}`:`top: ${x}`;c.current.dataset.motionPopId=u;const I=document.createElement("style");f&&(I.nonce=f);const K=s??document.head;return K.appendChild(I),I.sheet&&I.sheet.insertRule(`
|
|
605
|
+
[data-motion-pop-id="${u}"] {
|
|
606
|
+
position: absolute !important;
|
|
607
|
+
width: ${b}px !important;
|
|
608
|
+
height: ${w}px !important;
|
|
609
|
+
${D}px !important;
|
|
610
|
+
${M}px !important;
|
|
611
|
+
}
|
|
612
|
+
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),K.contains(I)&&K.removeChild(I)}},[t]),U.jsx(TO,{isPresent:t,childRef:c,sizeRef:h,pop:o,children:o===!1?e:k.cloneElement(e,{ref:y})})}const EO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:s,presenceAffectsLayout:o,mode:u,anchorX:c,anchorY:h,root:f})=>{const m=Sp(RO),y=k.useId();let b=!0,w=k.useMemo(()=>(b=!1,{id:y,initial:t,isPresent:n,custom:s,onExitComplete:x=>{m.set(x,!0);for(const T of m.values())if(!T)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return o&&b&&(w={...w}),k.useMemo(()=>{m.forEach((x,T)=>m.set(T,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=U.jsx(CO,{pop:u==="popLayout",isPresent:n,anchorX:c,anchorY:h,root:f,children:e}),U.jsx(wc.Provider,{value:w,children:e})};function RO(){return new Map}function Wk(e=!0){const t=k.useContext(wc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:s}=t,o=k.useId();k.useEffect(()=>{if(e)return s(o)},[e]);const u=k.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,u]:[!0]}const hu=e=>e.key||"";function G0(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const AO=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:o="sync",propagate:u=!1,anchorX:c="left",anchorY:h="top",root:f})=>{const[m,y]=Wk(u),b=k.useMemo(()=>G0(e),[e]),w=u&&!m?[]:b.map(hu),x=k.useRef(!0),T=k.useRef(b),P=Sp(()=>new Map),L=k.useRef(new Set),[D,M]=k.useState(b),[I,K]=k.useState(b);vw(()=>{x.current=!1,T.current=b;for(let S=0;S<I.length;S++){const Z=hu(I[S]);w.includes(Z)?(P.delete(Z),L.current.delete(Z)):P.get(Z)!==!0&&P.set(Z,!1)}},[I,w.length,w.join("-")]);const G=[];if(b!==D){let S=[...b];for(let Z=0;Z<I.length;Z++){const X=I[Z],_e=hu(X);w.includes(_e)||(S.splice(Z,0,X),G.push(X))}return o==="wait"&&G.length&&(S=G),K(G0(S)),M(b),null}const{forceRender:W}=k.useContext(xp);return U.jsx(U.Fragment,{children:I.map(S=>{const Z=hu(S),X=u&&!m?!1:b===I||w.includes(Z),_e=()=>{if(L.current.has(Z))return;if(P.has(Z))L.current.add(Z),P.set(Z,!0);else return;let oe=!0;P.forEach(Re=>{Re||(oe=!1)}),oe&&(W?.(),K(T.current),u&&y?.(),a&&a())};return U.jsx(EO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:f,onExitComplete:X?void 0:_e,anchorX:c,anchorY:h,children:S},Z)})})},Kk=k.createContext({strict:!1}),Y0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Z0=!1;function LO(){if(Z0)return;const e={};for(const t in Y0)e[t]={isEnabled:n=>Y0[t].some(a=>!!n[a])};wk(e),Z0=!0}function qk(){return LO(),pN()}function DO(e){const t=qk();for(const n in e)t[n]={...t[n],...e[n]};wk(t)}const MO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function sc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||MO.has(e)}let Gk=e=>!sc(e);function NO(e){typeof e=="function"&&(Gk=t=>t.startsWith("on")?!sc(t):e(t))}try{NO(require("@emotion/is-prop-valid").default)}catch{}function OO(e,t,n){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||qt(e[s])||(Gk(s)||n===!0&&sc(s)||!t&&!sc(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}const Pc=k.createContext({});function IO(e,t){if(Sc(e)){const{initial:n,animate:a}=e;return{initial:n===!1||No(n)?n:void 0,animate:No(a)?a:void 0}}return e.inherit!==!1?t:{}}function jO(e){const{initial:t,animate:n}=IO(e,k.useContext(Pc));return k.useMemo(()=>({initial:t,animate:n}),[Q0(t),Q0(n)])}function Q0(e){return Array.isArray(e)?e.join(" "):e}const Zp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yk(e,t,n){for(const a in t)!qt(t[a])&&!Ek(a,n)&&(e[a]=t[a])}function UO({transformTemplate:e},t){return k.useMemo(()=>{const n=Zp();return qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BO(e,t){const n=e.style||{},a={};return Yk(a,n,e),Object.assign(a,UO(e,t)),a}function FO(e,t){const n={},a=BO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=a,n}const Zk=()=>({...Zp(),attrs:{}});function VO(e,t,n,a){const s=k.useMemo(()=>{const o=Zk();return Rk(o,t,Lk(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Yk(o,e.style,e),s.style={...o,...s.style}}return s}const zO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qp(e){return typeof e!="string"||e.includes("-")?!1:!!(zO.indexOf(e)>-1||/[A-Z]/u.test(e))}function $O(e,t,n,{latestValues:a},s,o=!1,u){const h=(u??Qp(e)?VO:FO)(t,a,s,e),f=OO(t,typeof e=="string",o),m=e!==k.Fragment?{...f,...h,ref:n}:{},{children:y}=t,b=k.useMemo(()=>qt(y)?y.get():y,[y]);return k.createElement(e,{...m,children:b})}function HO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,s){return{latestValues:WO(n,a,s,e),renderState:t()}}function WO(e,t,n,a){const s={},o=a(e,{});for(const b in o)s[b]=Mu(o[b]);let{initial:u,animate:c}=e;const h=Sc(e),f=bk(e);t&&f&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||u===!1;const y=m?c:u;if(y&&typeof y!="boolean"&&!xc(y)){const b=Array.isArray(y)?y:[y];for(let w=0;w<b.length;w++){const x=Bp(e,b[w]);if(x){const{transitionEnd:T,transition:P,...L}=x;for(const D in L){let M=L[D];if(Array.isArray(M)){const I=m?M.length-1:0;M=M[I]}M!==null&&(s[D]=M)}for(const D in T)s[D]=T[D]}}}return s}const Qk=e=>(t,n)=>{const a=k.useContext(Pc),s=k.useContext(wc),o=()=>HO(e,t,a,s);return n?o():Sp(o)},KO=Qk({scrapeMotionValuesFromProps:Gp,createRenderState:Zp}),qO=Qk({scrapeMotionValuesFromProps:Dk,createRenderState:Zk}),GO=Symbol.for("motionComponentSymbol");function YO(e,t,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const s=k.useRef(null);return k.useCallback(o=>{o&&e.onMount?.(o);const u=a.current;if(typeof u=="function")if(o){const c=u(o);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):u(o);else u&&(u.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const Xk=k.createContext({});function ts(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ZO(e,t,n,a,s,o){const{visualElement:u}=k.useContext(Pc),c=k.useContext(Kk),h=k.useContext(wc),f=k.useContext(Yp),m=f.reducedMotion,y=f.skipAnimations,b=k.useRef(null),w=k.useRef(!1);a=a||c.renderer,!b.current&&a&&(b.current=a(e,{visualState:t,parent:u,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:o}),w.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const x=b.current,T=k.useContext(Xk);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&QO(b.current,n,s,T);const P=k.useRef(!1);k.useInsertionEffect(()=>{x&&P.current&&x.update(n,h)});const L=n[sk],D=k.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return vw(()=>{w.current=!0,x&&(P.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),D.current&&x.animationState&&x.animationState.animateChanges())}),k.useEffect(()=>{x&&(!D.current&&x.animationState&&x.animationState.animateChanges(),D.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),D.current=!1),x.enteringChildren=void 0)}),x}function QO(e,t,n,a){const{layoutId:s,layout:o,drag:u,dragConstraints:c,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jk(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!u||c&&ts(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function Jk(e){if(e)return e.options.allowProjection!==!1?e.projection:Jk(e.parent)}function Uh(e,{forwardMotionProps:t=!1,type:n}={},a,s){a&&DO(a);const o=n?n==="svg":Qp(e),u=o?qO:KO;function c(f,m){let y;const b={...k.useContext(Yp),...f,layoutId:XO(f)},{isStatic:w}=b,x=jO(f),T=u(f,w);if(!w&&typeof window<"u"){JO();const P=eI(b);y=P.MeasureLayout,x.visualElement=ZO(e,T,b,s,P.ProjectionNode,o)}return U.jsxs(Pc.Provider,{value:x,children:[y&&x.visualElement?U.jsx(y,{visualElement:x.visualElement,...b}):null,$O(e,f,YO(T,x.visualElement,m),T,w,t,o)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=k.forwardRef(c);return h[GO]=e,h}function XO({layoutId:e}){const t=k.useContext(xp).id;return t&&e!==void 0?t+"-"+e:e}function JO(e,t){k.useContext(Kk).strict}function eI(e){const t=qk(),{drag:n,layout:a}=t;if(!n&&!a)return{};const s={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function tI(e,t){if(typeof Proxy>"u")return Uh;const n=new Map,a=(o,u)=>Uh(o,u,e,t),s=(o,u)=>a(o,u);return new Proxy(s,{get:(o,u)=>u==="create"?a:(n.has(u)||n.set(u,Uh(u,void 0,e,t)),n.get(u))})}const nI=(e,t)=>t.isSVG??Qp(e)?new LN(t):new PN(t,{allowProjection:e!==k.Fragment});class rI extends Ia{constructor(t){super(t),t.animationState||(t.animationState=IN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();xc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aI=0;class iI extends Ia{constructor(){super(...arguments),this.id=aI++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:o,custom:u}=this.node.getProps();if(typeof o=="string"){const c=si(this.node,o,u);if(c){const{transition:h,transitionEnd:f,...m}=c;for(const y in m)this.node.getValue(y)?.jump(m[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const sI={animation:{Feature:rI},exit:{Feature:iI}};function Go(e){return{point:{x:e.pageX,y:e.pageY}}}const oI=e=>t=>$p(t)&&e(t,Go(t));function To(e,t,n,a){return Oo(e,t,oI(n),a)}const ex=({current:e})=>e?e.ownerDocument.defaultView:null,X0=(e,t)=>Math.abs(e-t);function lI(e,t){const n=X0(e.x,t.x),a=X0(e.y,t.y);return Math.sqrt(n**2+a**2)}const J0=new Set(["auto","scroll"]);class tx{constructor(t,n,{transformPagePoint:a,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:u=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=fu(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Bh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,T=lI(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!T)return;const{point:P}=w,{timestamp:L}=Kt;this.history.push({...P,timestamp:L});const{onStart:D,onMove:M}=this.handlers;x||(D&&D(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),M&&M(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=fu(x,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,x)=>{this.end();const{onEnd:T,onSessionEnd:P,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=Bh(w.type==="pointercancel"?this.lastMoveEventInfo:fu(x,this.transformPagePoint),this.history);this.startEvent&&T&&T(w,D),P&&P(w,D)},!$p(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=u,this.contextWindow=s||window;const h=Go(t),f=fu(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=Kt;this.history=[{...m,timestamp:y}];const{onSessionStart:b}=n;b&&b(t,Bh(f,this.history)),this.removeListeners=Wo(To(this.contextWindow,"pointermove",this.handlePointerMove),To(this.contextWindow,"pointerup",this.handlePointerUp),To(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(J0.has(a.overflowX)||J0.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,s=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Na(this.updatePoint)}}function fu(e,t){return t?{point:t(e.point)}:e}function eb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bh({point:e},t){return{point:e,delta:eb(e,nx(t)),offset:eb(e,uI(t)),velocity:cI(t,.1)}}function uI(e){return e[0]}function nx(e){return e[e.length-1]}function cI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const s=nx(e);for(;n>=0&&(a=e[n],!(s.timestamp-a.timestamp>Sn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&s.timestamp-a.timestamp>Sn(t)*2&&(a=e[1]);const o=In(s.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const u={x:(s.x-a.x)/o,y:(s.y-a.y)/o};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function dI(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?vt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?vt(n,e,a.max):Math.min(e,n)),e}function tb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function hI(e,{top:t,left:n,bottom:a,right:s}){return{x:tb(e.x,n,s),y:tb(e.y,t,a)}}function nb(e,t){let n=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,a]=[a,n]),{min:n,max:a}}function fI(e,t){return{x:nb(e.x,t.x),y:nb(e.y,t.y)}}function pI(e,t){let n=.5;const a=ln(e),s=ln(t);return s>a?n=Do(t.min,t.max-a,e.min):a>s&&(n=Do(e.min,e.max-s,t.min)),xr(0,1,n)}function mI(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jf=.35;function gI(e=jf){return e===!1?e=0:e===!0&&(e=jf),{x:rb(e,"left","right"),y:rb(e,"top","bottom")}}function rb(e,t,n){return{min:ab(e,t),max:ab(e,n)}}function ab(e,t){return typeof e=="number"?e:e[t]||0}const yI=new WeakMap;class vI{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=y=>{n&&this.snapToCursor(Go(y).point),this.stopAnimation()},u=(y,b)=>{const{drag:w,dragPropagation:x,onDragStart:T}=this.getProps();if(w&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=H2(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fr(L=>{let D=this.getAxisMotionValue(L).get()||0;if(vr.test(D)){const{projection:M}=this.visualElement;if(M&&M.layout){const I=M.layout.layoutBox[L];I&&(D=ln(I)*(parseFloat(D)/100))}}this.originPoint[L]=D}),T&&dt.update(()=>T(y,b),!1,!0),Ef(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},c=(y,b)=>{this.latestPointerEvent=y,this.latestPanInfo=b;const{dragPropagation:w,dragDirectionLock:x,onDirectionLock:T,onDrag:P}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:L}=b;if(x&&this.currentDirection===null){this.currentDirection=_I(L),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",b.point,L),this.updateAxis("y",b.point,L),this.visualElement.render(),P&&dt.update(()=>P(y,b),!1,!0)},h=(y,b)=>{this.latestPointerEvent=y,this.latestPanInfo=b,this.stop(y,b),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new tx(t,{onSessionStart:o,onStart:u,onMove:c,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:ex(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!a)return;const{velocity:u}=s;this.startAnimation(u);const{onDragEnd:c}=this.getProps();c&&dt.postRender(()=>c(a,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:s}=this.getProps();if(!a||!pu(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let u=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(u=dI(u,this.constraints[t],this.elastic[t])),o.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&ts(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=hI(a.layoutBox,t):this.constraints=!1,this.elastic=gI(n),s!==this.constraints&&!ts(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&fr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=mI(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ts(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=bN(a,s.root,this.visualElement.getTransformPagePoint());let u=fI(s.layout.layoutBox,o);if(n){const c=n(gN(u));this.hasMutatedConstraints=!!c,c&&(u=xk(c))}return u}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:s,dragTransition:o,dragSnapToOrigin:u,onDragTransitionEnd:c}=this.getProps(),h=this.constraints||{},f=fr(m=>{if(!pu(m,n,this.currentDirection))return;let y=h&&h[m]||{};(u===!0||u===m)&&(y={min:0,max:0});const b=s?200:1e6,w=s?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Ef(this.visualElement,t),a.start(Up(t,a,0,n,this.visualElement,!1))}stopAnimation(){fr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),s=a[n];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){fr(n=>{const{drag:a}=this.getProps();if(!pu(n,a,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:u,max:c}=s.layout.layoutBox[n],h=o.get()||0;o.set(t[n]-vt(u,c,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!ts(n)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};fr(u=>{const c=this.getAxisMotionValue(u);if(c&&this.constraints!==!1){const h=c.get();s[u]=pI({min:h,max:h},this.constraints[u])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),fr(u=>{if(!pu(u,t,null))return;const c=this.getAxisMotionValue(u),{min:h,max:f}=this.constraints[u];c.set(vt(h,f,s[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yI.set(this.visualElement,this);const t=this.visualElement.current,n=To(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),b=f.target,w=b!==t&&Z2(b);m&&y&&!w&&this.start(f)});let a;const s=()=>{const{dragConstraints:f}=this.getProps();ts(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=bI(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,u=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dt.read(s);const c=Oo(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(fr(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=f[y].translate,b.set(b.get()+f[y].translate))}),this.visualElement.render())}));return()=>{c(),n(),u(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:u=jf,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:s,dragConstraints:o,dragElastic:u,dragMomentum:c}}}function ib(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function bI(e,t,n){const a=h0(e,ib(n)),s=h0(t,ib(n));return()=>{a(),s()}}function pu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _I(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wI extends Ia{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new vI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Fh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class kI extends Ia{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new tx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ex(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:Fh(t),onStart:Fh(n),onMove:Fh(a),onEnd:(o,u)=>{delete this.session,s&&dt.postRender(()=>s(o,u))}}}mount(){this.removePointerDownListener=To(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Vh=!1;class xI extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&s&&a.register(o),Vh&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Nu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:s,isPresent:o}=this.props,{projection:u}=a;return u&&(u.isPresent=o,t.layoutDependency!==n&&u.setOptions({...u.options,layoutDependency:n}),Vh=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?u.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?u.promote():u.relegate()||dt.postRender(()=>{const c=u.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),zp.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:s}=t;Vh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rx(e){const[t,n]=Wk(),a=k.useContext(xp);return U.jsx(xI,{...e,layoutGroup:a,switchLayoutGroup:k.useContext(Xk),isPresent:t,safeToRemove:n})}const SI={pan:{Feature:kI},drag:{Feature:wI,ProjectionNode:Hk,MeasureLayout:rx}};function sb(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=a[s];o&&dt.postRender(()=>o(t,Go(t)))}class PI extends Ia{mount(){const{current:t}=this.node;t&&(this.unmount=K2(t,(n,a)=>(sb(this.node,a,"Start"),s=>sb(this.node,s,"End"))))}unmount(){}}class TI extends Ia{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wo(Oo(this.node.current,"focus",()=>this.onFocus()),Oo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ob(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=a[s];o&&dt.postRender(()=>o(t,Go(t)))}class CI extends Ia{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=X2(t,(s,o)=>(ob(this.node,o,"Start"),(u,{success:c})=>ob(this.node,u,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Uf=new WeakMap,zh=new WeakMap,EI=e=>{const t=Uf.get(e.target);t&&t(e)},RI=e=>{e.forEach(EI)};function AI({root:e,...t}){const n=e||document;zh.has(n)||zh.set(n,{});const a=zh.get(n),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(RI,{root:e,...t})),a[s]}function LI(e,t,n){const a=AI(t);return Uf.set(e,n),a.observe(e),()=>{Uf.delete(e),a.unobserve(e)}}const DI={some:0,all:1};class MI extends Ia{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:s="some",once:o}=t,u={root:n?n.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:DI[s]},c=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),b=f?m:y;b&&b(h)};this.stopObserver=LI(this.node.current,u,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(NI(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function NI({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const OI={inView:{Feature:MI},tap:{Feature:CI},focus:{Feature:TI},hover:{Feature:PI}},II={layout:{ProjectionNode:Hk,MeasureLayout:rx}},jI={...sI,...OI,...SI,...II},$h=tI(jI,nI);function ax(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=ax(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function UI(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=ax(e))&&(a&&(a+=" "),a+=t);return a}const BI=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},FI=(e,t)=>({classGroupId:e,validator:t}),ix=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),oc="-",lb=[],VI="arbitrary..",zI=e=>{const t=HI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return $I(u);const c=u.split(oc),h=c[0]===""&&c.length>1?1:0;return sx(c,h,t)},getConflictingClassGroupIds:(u,c)=>{if(c){const h=a[u],f=n[u];return h?f?BI(f,h):h:f||lb}return n[u]||lb}}},sx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=sx(e,t+1,o);if(f)return f}const u=n.validators;if(u===null)return;const c=t===0?e.join(oc):e.slice(t).join(oc),h=u.length;for(let f=0;f<h;f++){const m=u[f];if(m.validator(c))return m.classGroupId}},$I=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?VI+a:void 0})(),HI=e=>{const{theme:t,classGroups:n}=e;return WI(n,t)},WI=(e,t)=>{const n=ix();for(const a in e){const s=e[a];Xp(s,n,a,t)}return n},Xp=(e,t,n,a)=>{const s=e.length;for(let o=0;o<s;o++){const u=e[o];KI(u,t,n,a)}},KI=(e,t,n,a)=>{if(typeof e=="string"){qI(e,t,n);return}if(typeof e=="function"){GI(e,t,n,a);return}YI(e,t,n,a)},qI=(e,t,n)=>{const a=e===""?t:ox(t,e);a.classGroupId=n},GI=(e,t,n,a)=>{if(ZI(e)){Xp(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(FI(n,e))},YI=(e,t,n,a)=>{const s=Object.entries(e),o=s.length;for(let u=0;u<o;u++){const[c,h]=s[u];Xp(h,ox(t,c),n,a)}},ox=(e,t)=>{let n=e;const a=t.split(oc),s=a.length;for(let o=0;o<s;o++){const u=a[o];let c=n.nextPart.get(u);c||(c=ix(),n.nextPart.set(u,c)),n=c}return n},ZI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,QI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(o,u)=>{n[o]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let u=n[o];if(u!==void 0)return u;if((u=a[o])!==void 0)return s(o,u),u},set(o,u){o in n?n[o]=u:s(o,u)}}},Bf="!",ub=":",XI=[],cb=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),JI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const o=[];let u=0,c=0,h=0,f;const m=s.length;for(let T=0;T<m;T++){const P=s[T];if(u===0&&c===0){if(P===ub){o.push(s.slice(h,T)),h=T+1;continue}if(P==="/"){f=T;continue}}P==="["?u++:P==="]"?u--:P==="("?c++:P===")"&&c--}const y=o.length===0?s:s.slice(h);let b=y,w=!1;y.endsWith(Bf)?(b=y.slice(0,-1),w=!0):y.startsWith(Bf)&&(b=y.slice(1),w=!0);const x=f&&f>h?f-h:void 0;return cb(o,w,b,x)};if(t){const s=t+ub,o=a;a=u=>u.startsWith(s)?o(u.slice(s.length)):cb(XI,!1,u,void 0,!0)}if(n){const s=a;a=o=>n({className:o,parseClassName:s})}return a},e4=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let o=0;o<n.length;o++){const u=n[o],c=u[0]==="[",h=t.has(u);c||h?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(u)):s.push(u)}return s.length>0&&(s.sort(),a.push(...s)),a}},t4=e=>({cache:QI(e.cacheSize),parseClassName:JI(e),sortModifiers:e4(e),...zI(e)}),n4=/\s+/,r4=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o}=t,u=[],c=e.trim().split(n4);let h="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:y,modifiers:b,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:T}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let P=!!T,L=a(P?x.substring(0,T):x);if(!L){if(!P){h=m+(h.length>0?" "+h:h);continue}if(L=a(x),!L){h=m+(h.length>0?" "+h:h);continue}P=!1}const D=b.length===0?"":b.length===1?b[0]:o(b).join(":"),M=w?D+Bf:D,I=M+L;if(u.indexOf(I)>-1)continue;u.push(I);const K=s(L,P);for(let G=0;G<K.length;++G){const W=K[G];u.push(M+W)}h=m+(h.length>0?" "+h:h)}return h},a4=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=lx(n))&&(s&&(s+=" "),s+=a);return s},lx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=lx(e[a]))&&(n&&(n+=" "),n+=t);return n},i4=(e,...t)=>{let n,a,s,o;const u=h=>{const f=t.reduce((m,y)=>y(m),e());return n=t4(f),a=n.cache.get,s=n.cache.set,o=c,c(h)},c=h=>{const f=a(h);if(f)return f;const m=r4(h,n);return s(h,m),m};return o=u,(...h)=>o(a4(...h))},s4=[],Ot=e=>{const t=n=>n[e]||s4;return t.isThemeGetter=!0,t},ux=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,o4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,l4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,u4=/\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$/,c4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,h4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ka=e=>o4.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>!!e&&Number.isInteger(Number(e)),Hh=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),Fr=e=>l4.test(e),dx=()=>!0,f4=e=>u4.test(e)&&!c4.test(e),Jp=()=>!1,p4=e=>d4.test(e),m4=e=>h4.test(e),g4=e=>!ve(e)&&!we(e),y4=e=>ja(e,px,Jp),ve=e=>ux.test(e),Ja=e=>ja(e,mx,f4),db=e=>ja(e,P4,Ge),v4=e=>ja(e,yx,dx),b4=e=>ja(e,gx,Jp),hb=e=>ja(e,hx,Jp),_4=e=>ja(e,fx,m4),mu=e=>ja(e,vx,p4),we=e=>cx.test(e),mo=e=>gi(e,mx),w4=e=>gi(e,gx),fb=e=>gi(e,hx),k4=e=>gi(e,px),x4=e=>gi(e,fx),gu=e=>gi(e,vx,!0),S4=e=>gi(e,yx,!0),ja=(e,t,n)=>{const a=ux.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},gi=(e,t,n=!1)=>{const a=cx.exec(e);return a?a[1]?t(a[1]):n:!1},hx=e=>e==="position"||e==="percentage",fx=e=>e==="image"||e==="url",px=e=>e==="length"||e==="size"||e==="bg-size",mx=e=>e==="length",P4=e=>e==="number",gx=e=>e==="family-name",yx=e=>e==="number"||e==="weight",vx=e=>e==="shadow",T4=()=>{const e=Ot("color"),t=Ot("font"),n=Ot("text"),a=Ot("font-weight"),s=Ot("tracking"),o=Ot("leading"),u=Ot("breakpoint"),c=Ot("container"),h=Ot("spacing"),f=Ot("radius"),m=Ot("shadow"),y=Ot("inset-shadow"),b=Ot("text-shadow"),w=Ot("drop-shadow"),x=Ot("blur"),T=Ot("perspective"),P=Ot("aspect"),L=Ot("ease"),D=Ot("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],K=()=>[...I(),we,ve],G=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],S=()=>[we,ve,h],Z=()=>[ka,"full","auto",...S()],X=()=>[xa,"none","subgrid",we,ve],_e=()=>["auto",{span:["full",xa,we,ve]},xa,we,ve],oe=()=>[xa,"auto",we,ve],Re=()=>["auto","min","max","fr",we,ve],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ce=()=>["start","end","center","stretch","center-safe","end-safe"],ue=()=>["auto",...S()],Me=()=>[ka,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],H=()=>[ka,"screen","full","dvw","lvw","svw","min","max","fit",...S()],Y=()=>[ka,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],$=()=>[e,we,ve],N=()=>[...I(),fb,hb,{position:[we,ve]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",k4,y4,{size:[we,ve]}],Ae=()=>[Hh,mo,Ja],Se=()=>["","none","full",f,we,ve],Ce=()=>["",Ge,mo,Ja],qe=()=>["solid","dashed","dotted","double"],Xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ue=()=>[Ge,Hh,fb,hb],jt=()=>["","none",x,we,ve],$n=()=>["none",Ge,we,ve],Tr=()=>["none",Ge,we,ve],pt=()=>[Ge,we,ve],en=()=>[ka,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[dx],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[g4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fr],shadow:[Fr],spacing:["px",Ge],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ka,ve,we,P]}],container:["container"],columns:[{columns:[Ge,ve,we,c]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:K()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[xa,"auto",we,ve]}],basis:[{basis:[ka,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,ka,"auto","initial","none",ve]}],grow:[{grow:["",Ge,we,ve]}],shrink:[{shrink:["",Ge,we,ve]}],order:[{order:[xa,"first","last","none",we,ve]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:_e()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:_e()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Re()}],"auto-rows":[{"auto-rows":Re()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...ce()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ce(),"baseline"]}],"place-self":[{"place-self":["auto",...ce()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:ue()}],mx:[{mx:ue()}],my:[{my:ue()}],ms:[{ms:ue()}],me:[{me:ue()}],mbs:[{mbs:ue()}],mbe:[{mbe:ue()}],mt:[{mt:ue()}],mr:[{mr:ue()}],mb:[{mb:ue()}],ml:[{ml:ue()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:Me()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[c,"screen",...Me()]}],"min-w":[{"min-w":[c,"screen","none",...Me()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[u]},...Me()]}],h:[{h:["screen","lh",...Me()]}],"min-h":[{"min-h":["screen","lh","none",...Me()]}],"max-h":[{"max-h":["screen","lh",...Me()]}],"font-size":[{text:["base",n,mo,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,S4,v4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hh,ve]}],"font-family":[{font:[w4,b4,t]}],"font-features":[{"font-features":[ve]}],"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:[s,we,ve]}],"line-clamp":[{"line-clamp":[Ge,"none",we,db]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",we,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",we,Ja]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Ge,"auto",we,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,ve]}],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",we,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xa,we,ve],radial:["",we,ve],conic:[xa,we,ve]},x4,_4]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Ae()}],"gradient-via-pos":[{via:Ae()}],"gradient-to-pos":[{to:Ae()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Se()}],"rounded-s":[{"rounded-s":Se()}],"rounded-e":[{"rounded-e":Se()}],"rounded-t":[{"rounded-t":Se()}],"rounded-r":[{"rounded-r":Se()}],"rounded-b":[{"rounded-b":Se()}],"rounded-l":[{"rounded-l":Se()}],"rounded-ss":[{"rounded-ss":Se()}],"rounded-se":[{"rounded-se":Se()}],"rounded-ee":[{"rounded-ee":Se()}],"rounded-es":[{"rounded-es":Se()}],"rounded-tl":[{"rounded-tl":Se()}],"rounded-tr":[{"rounded-tr":Se()}],"rounded-br":[{"rounded-br":Se()}],"rounded-bl":[{"rounded-bl":Se()}],"border-w":[{border:Ce()}],"border-w-x":[{"border-x":Ce()}],"border-w-y":[{"border-y":Ce()}],"border-w-s":[{"border-s":Ce()}],"border-w-e":[{"border-e":Ce()}],"border-w-bs":[{"border-bs":Ce()}],"border-w-be":[{"border-be":Ce()}],"border-w-t":[{"border-t":Ce()}],"border-w-r":[{"border-r":Ce()}],"border-w-b":[{"border-b":Ce()}],"border-w-l":[{"border-l":Ce()}],"divide-x":[{"divide-x":Ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...qe(),"hidden","none"]}],"divide-style":[{divide:[...qe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,we,ve]}],"outline-w":[{outline:["",Ge,mo,Ja]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,gu,mu]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,gu,mu]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Ge,Ja]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Ce()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",b,gu,mu]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Ge,we,ve]}],"mix-blend":[{"mix-blend":[...Xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Xe()}],"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":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ue()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Ue()}],"mask-image-t-to-pos":[{"mask-t-to":Ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Ue()}],"mask-image-r-to-pos":[{"mask-r-to":Ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Ue()}],"mask-image-b-to-pos":[{"mask-b-to":Ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Ue()}],"mask-image-l-to-pos":[{"mask-l-to":Ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Ue()}],"mask-image-x-to-pos":[{"mask-x-to":Ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Ue()}],"mask-image-y-to-pos":[{"mask-y-to":Ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[we,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ue()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":I()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ue()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,ve]}],filter:[{filter:["","none",we,ve]}],blur:[{blur:jt()}],brightness:[{brightness:[Ge,we,ve]}],contrast:[{contrast:[Ge,we,ve]}],"drop-shadow":[{"drop-shadow":["","none",w,gu,mu]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Ge,we,ve]}],"hue-rotate":[{"hue-rotate":[Ge,we,ve]}],invert:[{invert:["",Ge,we,ve]}],saturate:[{saturate:[Ge,we,ve]}],sepia:[{sepia:["",Ge,we,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",we,ve]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,we,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,we,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,we,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,we,ve]}],"backdrop-invert":[{"backdrop-invert":["",Ge,we,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,we,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,we,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,we,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",we,ve]}],ease:[{ease:["linear","initial",L,we,ve]}],delay:[{delay:[Ge,we,ve]}],animate:[{animate:["none",D,we,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,we,ve]}],"perspective-origin":[{"perspective-origin":K()}],rotate:[{rotate:$n()}],"rotate-x":[{"rotate-x":$n()}],"rotate-y":[{"rotate-y":$n()}],"rotate-z":[{"rotate-z":$n()}],scale:[{scale:Tr()}],"scale-x":[{"scale-x":Tr()}],"scale-y":[{"scale-y":Tr()}],"scale-z":[{"scale-z":Tr()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[we,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:K()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:en()}],"translate-x":[{"translate-x":en()}],"translate-y":[{"translate-y":en()}],"translate-z":[{"translate-z":en()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",we,ve]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",we,ve]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Ge,mo,Ja,db]}],stroke:[{stroke:["none",...$()]}],"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"]}},C4=i4(T4);function Ct(...e){return C4(UI(e))}const E4=U.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[U.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),U.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23Z",fill:"#34A853"}),U.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),U.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53Z",fill:"#EA4335"})]}),R4=U.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:U.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),A4={google:E4,github:R4},L4={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function D4(e){return L4[e]||String(e||"").replace(/-/g," ")}function M4(){_c();const{isOpen:e,closeLoginModal:t}=yw(),{enabled:n,signedIn:a,refreshUser:s,signInWithPassword:o,signUp:u,signInWithOAuth:c,getPublicAuthConfig:h}=vc(),[f,m]=k.useState("signin"),[y,b]=k.useState(""),[w,x]=k.useState(""),[T,P]=k.useState(""),[L,D]=k.useState(!1),[M,I]=k.useState(null),[K,G]=k.useState(null),[W,S]=k.useState(!1),[Z,X]=k.useState(!0),[_e,oe]=k.useState([]),[Re,fe]=k.useState(8);k.useEffect(()=>{e&&(I(null),G(null),m("signin"),b(""),x(""),P(""),S(!1))},[e]),k.useEffect(()=>{if(!e||!n){X(!1);return}let H=!0;return(async()=>{const{data:Y,error:$}=await h();if(H){if($||!Y)oe(["google","github"]);else{const N=Array.isArray(Y.oAuthProviders)?Y.oAuthProviders:[],q=Array.isArray(Y.customOAuthProviders)?Y.customOAuthProviders:[];oe([...N,...q]),typeof Y.passwordMinLength=="number"&&Y.passwordMinLength>0&&fe(Y.passwordMinLength)}X(!1)}})(),()=>{H=!1}},[e,n,h]),k.useEffect(()=>{e&&a&&t()},[e,a,t]);const ce=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),ue=k.useCallback(async H=>{I(null),D(!0);try{const{error:Y}=await c(H,ce);Y&&I(Y.message||String(Y))}finally{D(!1)}},[c,ce]),Me=k.useCallback(async H=>{H.preventDefault(),I(null),D(!0);try{if(f==="signup"){const{data:$,error:N}=await u({email:y.trim(),password:w,name:T.trim()||void 0});if(N){I(N.message||String(N));return}if($?.requireEmailVerification){G(He("login.verify_email_pending")),m("signin");return}await s();return}const{error:Y}=await o({email:y.trim(),password:w});if(Y){I(Y.message||String(Y));return}await s()}finally{D(!1)}},[f,y,w,T,u,o,s]);return k.useEffect(()=>{if(!e)return;const H=Y=>{Y.key==="Escape"&&t()};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[e,t]),n?U.jsx(AO,{children:e&&U.jsxs($h.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[U.jsx($h.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),U.jsxs($h.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 p-6 shadow-2xl",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:H=>H.stopPropagation(),children:[U.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:U.jsx(pw,{className:"h-5 w-5"})}),U.jsxs("div",{className:"text-center mb-6",children:[U.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[U.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),U.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),U.jsx("p",{className:"text-sm text-oai-gray-500",children:He("login_modal.subtitle")})]}),K&&U.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:K}),M&&U.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:M}),U.jsx("div",{className:"space-y-2.5 mb-5",children:Z?U.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900 animate-pulse"}):_e.map(H=>U.jsxs("button",{type:"button",disabled:L,onClick:()=>ue(H),className:Ct("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[A4[H]||null,He("login.oauth.continue",{provider:D4(H)})]},H))}),W?U.jsxs(U.Fragment,{children:[U.jsxs("div",{className:"relative mb-5",children:[U.jsx("div",{className:"absolute inset-0 flex items-center",children:U.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),U.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:U.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:He("login_modal.divider_email")})})]}),U.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[U.jsx("button",{type:"button",className:Ct("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",f==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signin"),I(null)},children:He("login.tab.sign_in")}),U.jsx("button",{type:"button",className:Ct("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",f==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signup"),I(null)},children:He("login.tab.sign_up")})]}),U.jsxs("form",{onSubmit:Me,className:"space-y-3",children:[f==="signup"&&U.jsxs("div",{children:[U.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:He("login.field.name")}),U.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:T,onChange:H=>P(H.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:He("login.field.name_placeholder")})]}),U.jsxs("div",{children:[U.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:He("login.field.email")}),U.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:H=>b(H.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),U.jsxs("div",{children:[U.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:He("login.field.password")}),U.jsx("input",{id:"modal-password",type:"password",autoComplete:f==="signup"?"new-password":"current-password",required:!0,minLength:f==="signup"?Re:void 0,value:w,onChange:H=>x(H.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),f==="signup"&&U.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:He("login.password_hint",{min:String(Re)})})]}),U.jsx("button",{type:"submit",disabled:L,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:He(f==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):U.jsxs(U.Fragment,{children:[U.jsxs("div",{className:"relative mb-5",children:[U.jsx("div",{className:"absolute inset-0 flex items-center",children:U.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),U.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:U.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:He("login.divider")})})]}),U.jsxs("button",{type:"button",onClick:()=>S(!0),className:Ct("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[U.jsx(mD,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),He("login_modal.continue_email")]})]})]})]})}):null}const N4={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function O4(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?N4:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||"").trim()}function u3(){return fi()}function I4(e=""){if(typeof e!="string"||e.length===0)return!1;const t=new URLSearchParams(e),n=String(t.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const j4=300*1e3,U4=720*60*1e3;function em(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function B4(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+U4<=t:!0}async function bx(e,t){const n=fi();if(!em(n)||!e)return;const a=n.replace(/\/$/,""),s=gc(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};s&&(o.apikey=s);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:o,body:JSON.stringify({period:"week",source:t})})}catch{}}async function F4(e){const t=fi();if(!em(t)||!e)return null;const n=t.replace(/\/$/,""),a=gc(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(s.apikey=a);const o=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",u=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:s,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:o})});if(!u.ok)return null;const c=await u.json().catch(()=>null),h=typeof c?.token=="string"?c.token:null,f=typeof c?.device_id=="string"?c.device_id:null;return!h||!f?null:{token:h,deviceId:f,issuedAt:typeof c?.created_at=="string"?c.created_at:new Date().toISOString()}}async function pb(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},s=n||fi();em(s)&&(a.insforgeBaseUrl=s.trim());const o=await bp(),u=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...o},body:JSON.stringify(a)}),c=await u.json().catch(()=>({}));if(!u.ok){const h=typeof c.error=="string"?c.error:`HTTP ${u.status}`;throw new Error(h)}return c}async function mb(e){const t=await e();if(!t)return null;const n=$_();if(n&&!B4(n))return n;const a=await F4(t);return a?(vA(a),a):null}async function _x(e){let t=await e();if(!t)return null;let n=await mb(async()=>t);if(!n)return t;try{return await pb({deviceToken:n.token,insforgeBaseUrl:fi()}),t}catch(a){if(!$_()||(H_(),t=await e(),!t)||(n=await mb(async()=>t),!n))throw a;return await pb({deviceToken:n.token,insforgeBaseUrl:fi()}),t}}async function V4(e){const t=bA();if(Date.now()-t<j4)return;const n=await _x(e);n&&(W_(Date.now()),await bx(n,"cloud-sync-auto"))}async function c3(e){const t=await _x(e);t&&(W_(Date.now()),await bx(t,"cloud-sync-now"))}function z4(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function $4(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||z4(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function H4(){const e=Fn(),t=vc(),n=k.useRef(!1);k.useEffect(()=>{if(!gA()||!$4(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!yA())return;let a=!1;const s=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await V4(()=>t.getAccessToken())}catch(o){console.warn("[tokentracker] cloud usage sync:",o)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(s)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function W4(){const e=k.useContext(mw);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function K4({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function q4(e){if(!e||typeof e!="object")return null;const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},n=e.profile&&typeof e.profile=="object"?e.profile:{},a=t.avatar_url||t.picture||n.avatar_url||e.avatar_url;return typeof a=="string"&&a.trim()?a.trim():null}function gb(e){const t=String(e||"").trim();if(!t)return"?";const n=t.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function yb({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){_c();const s=t==="sidebar",{enabled:o,loading:u,signedIn:c,user:h,displayName:f}=vc(),{openLoginModal:m}=yw(),y=Zf(),b=k.useMemo(()=>q4(h),[h]);if(!o)return null;if(u)return U.jsx("div",{className:Ct("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!c)return s?U.jsxs("button",{type:"button",onClick:()=>{m(),a?.()},className:Ct("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",n?"h-8 w-8 justify-center px-0":"w-full",e),"aria-label":He("header.auth.sign_in_aria"),title:n?He("header.auth.sign_in_aria"):void 0,children:[U.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:U.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&U.jsx("span",{className:"truncate flex-1 text-left",children:He("header.auth.sign_in_aria")})]}):U.jsx("button",{type:"button",onClick:m,className:Ct("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-full px-5 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":He("header.auth.sign_in_aria"),children:He("header.auth.sign_in_aria")});const w=()=>{y("/settings"),a?.()};return U.jsx("div",{className:Ct(s?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:U.jsxs("button",{type:"button",onClick:w,className:Ct(s?Ct("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-full pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":He("header.auth.open_settings"),title:s&&n?f:void 0,children:[s?U.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:b?U.jsx("img",{src:b,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer"}):U.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:gb(f)})}):b?U.jsx("img",{src:b,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer"}):U.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:gb(f)}),s?!n&&U.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:f}):U.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:f})]})})}const Ff="tt.sidebarCollapsed";function G4(){return[{id:"general",label:He("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:oD,label:He("nav.usage")},{id:"limits",to:"/limits",icon:uD,label:He("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:LD,label:He("nav.leaderboard")}]},{id:"tools",label:He("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:fD,label:He("nav.widgets")},{id:"skills",to:"/skills",icon:kD,label:He("nav.skills")},{id:"ip-check",to:"/ip-check",icon:dD,label:He("nav.ip_check")}]},{id:"account",label:He("nav.group.account"),items:[{id:"settings",to:"/settings",icon:TD,label:He("nav.settings")}]}]}function Y4(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Ff)==="1"}catch{return!1}}function Z4(){const[e,t]=k.useState(Y4),n=k.useCallback(()=>{t(a=>{const s=!a;try{typeof window<"u"&&window.localStorage.setItem(Ff,s?"1":"0")}catch{}return s})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=s=>{s.key===Ff&&t(s.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Q4(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function X4({label:e,collapsed:t,first:n}){return t?n?null:U.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):U.jsx("div",{className:Ct("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",n?"pt-2":"pt-4"),children:e})}function J4({item:e,collapsed:t,active:n,onClick:a}){const s=e.icon;return U.jsxs(dc,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Ct("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",t&&"justify-center px-0 py-2",n?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[U.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:U.jsx(s,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&U.jsx("span",{className:"truncate",children:e.label})]})}function ej({as:e="button",title:t,onClick:n,href:a,children:s,className:o,...u}){const c=Ct("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",o);return e==="a"?U.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:c,...u,children:s}):U.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:c,...u,children:s})}function tj({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const s=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;K4({prefersReducedMotion:s,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(o=>o.json()).then(o=>{o&&typeof o.stargazers_count=="number"&&a(o.stargazers_count)}).catch(()=>{})},[e]),U.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Ct("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",t?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[U.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:U.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),U.jsx("span",{children:"Star"}),n!==null&&U.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const nj=[{value:"light",label:"Light",Icon:fw},{value:"dark",label:"Dark",Icon:hw},{value:"system",label:"System",Icon:bD}];function rj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[s,o]=k.useState(!1),u=k.useRef(null),c=t==="dark"?hw:fw;return k.useEffect(()=>{if(!s)return;const h=m=>{u.current&&!u.current.contains(m.target)&&o(!1)},f=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[s]),U.jsxs("div",{ref:u,className:"relative",children:[U.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":s,"aria-haspopup":"menu",title:"Theme",onClick:()=>o(h=>!h),className:Ct("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",a?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:U.jsx(c,{className:"h-3.5 w-3.5","aria-hidden":!0})}),s&&U.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:nj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return U.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),o(!1)},className:Ct("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",y?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[U.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),U.jsx("span",{children:f})]},h)})})]})}function wx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:s,glassChrome:o=!1}){const c=Fn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=W4(),{resolvedLocale:y}=_c(),b=k.useMemo(()=>G4(),[y]);return U.jsxs(U.Fragment,{children:[U.jsx("div",{className:Ct("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?U.jsxs("div",{className:"flex items-center gap-2",children:[U.jsx("div",{className:"flex-1 min-w-0",children:U.jsx(yb,{variant:"sidebar",collapsed:e,onAfterAction:n})}),U.jsx("button",{type:"button",onClick:s,"aria-label":He("nav.close_menu"),title:He("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:U.jsx(pw,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):U.jsx(yb,{variant:"sidebar",collapsed:e,onAfterAction:n})}),U.jsx("nav",{"aria-label":He("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:b.map((w,x)=>U.jsxs("div",{className:"flex flex-col",children:[U.jsx(X4,{label:w.label,collapsed:e,first:x===0}),U.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(T=>U.jsx(J4,{item:T,collapsed:e,active:Q4(c,T.to),onClick:n},T.id))})]},w.id))}),U.jsxs("div",{className:Ct("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[U.jsx(rj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:o}),U.jsx("div",{className:"flex items-center gap-1.5",children:!e&&U.jsx(tj,{glassChrome:o})})]})]})}function aj({collapsed:e,onToggleCollapsed:t}){const n=k.useMemo(()=>typeof window>"u"?!1:mr()||iw(),[]);return U.jsx("aside",{"aria-label":He("nav.aside_label"),className:Ct("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:U.jsx(wx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function ij({open:e,onClose:t}){return k.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),k.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?U.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[U.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),U.jsx("aside",{"aria-label":He("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:U.jsx(wx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function sj({onOpenDrawer:e}){return U.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[U.jsx(ej,{title:He("nav.menu"),onClick:e,children:U.jsx(yD,{className:"h-5 w-5","aria-hidden":!0})}),U.jsxs(dc,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[U.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),U.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),U.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function oj({children:e}){const{collapsed:t,toggle:n}=Z4(),[a,s]=k.useState(!1),o=k.useCallback(()=>s(!0),[]),u=k.useCallback(()=>s(!1),[]),c=k.useMemo(()=>typeof window>"u"?!1:mr()||iw(),[]);return U.jsxs("div",{className:Ct("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",c?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[c&&U.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),U.jsxs("div",{className:"flex-1 min-h-0 flex",children:[U.jsx(aj,{collapsed:t,onToggleCollapsed:n}),U.jsx(ij,{open:a,onClose:u}),U.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:U.jsxs("div",{className:Ct("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",c?"tt-native-main-card":"rounded-2xl",!c&&"shadow-sm"),children:[U.jsx(sj,{onOpenDrawer:o}),U.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const lj=k.lazy(()=>sr(()=>import("./DashboardPage-BJVPrOly.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.DashboardPage}))),uj=k.lazy(()=>sr(()=>import("./IpCheckPage-Bqz8OFmD.js"),[])),cj=k.lazy(()=>sr(()=>import("./LandingPage-Dz7yTDPI.js"),__vite__mapDeps([7,8,4])).then(e=>({default:e.LandingPage}))),dj=k.lazy(()=>sr(()=>import("./LeaderboardPage-DX_tP5qi.js"),__vite__mapDeps([9,5,10,11])).then(e=>({default:e.LeaderboardPage}))),hj=k.lazy(()=>sr(()=>import("./LeaderboardProfilePage-BI4R73XX.js"),__vite__mapDeps([12,8,10])).then(e=>({default:e.LeaderboardProfilePage}))),fj=k.lazy(()=>sr(()=>import("./LimitsPage-D15dhSFp.js"),__vite__mapDeps([13,1,14,3,6,4])).then(e=>({default:e.LimitsPage}))),pj=k.lazy(()=>sr(()=>import("./LoginPage-CSWfDVcM.js"),[]).then(e=>({default:e.LoginPage}))),mj=k.lazy(()=>sr(()=>import("./NativeAuthCallbackPage-D6Stzae_.js"),[]).then(e=>({default:e.NativeAuthCallbackPage}))),gj=k.lazy(()=>sr(()=>import("./SettingsPage-CaPVlEzU.js"),__vite__mapDeps([15,14,16,3,17])).then(e=>({default:e.SettingsPage}))),yj=k.lazy(()=>sr(()=>import("./SkillsPage-CGH_F5Y0.js"),__vite__mapDeps([18,3,2,5,11,17])).then(e=>({default:e.SkillsPage}))),vj=k.lazy(()=>sr(()=>import("./WidgetsPage-Cjad4Q71.js"),__vite__mapDeps([19,16,3,6,4,17,11])).then(e=>({default:e.WidgetsPage})));function bj(){const{resolvedLocale:e}=_c(),t=Fn(),n=vc();H4();const a=Pn(),s=k.useMemo(()=>typeof window>"u"?!1:I4(window.location.search),[]),o=t?.pathname||"/",u=new URL(window.location.href),c=u.pathname.replace(/\/+$/,"")||"/",f=c.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=u.searchParams.get("token")||null,y=f||m,b=c==="/share"||c==="/share.html"||c.startsWith("/share/"),w=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=o.replace(/\/+$/,"")||"/",T=x.match(/^\/leaderboard\/u\/([^/]+)$/i),P=T?T[1]:null,L=x==="/leaderboard"||!!P,D=!!(n.enabled&&n.signedIn),M=w||D,I=!1,K=O4(),G=k.useMemo(()=>!n.enabled||!D?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[D,n]);let W=w||a||s?"dashboard":"landing";x==="/landing"&&(W="landing"),x==="/dashboard"&&(W="dashboard"),L&&(W="dashboard");const S=x==="/limits",Z=x==="/settings",X=x==="/skills",_e=x==="/widgets",oe=x==="/ip-check";(S||Z||X||_e||oe)&&(W="dashboard");let Re=lj;P?Re=hj:x==="/leaderboard"?Re=dj:S?Re=fj:Z?Re=gj:X?Re=yj:_e?Re=vj:oe&&(Re=uj);const ce=!b&&(x==="/dashboard"||x==="/"||x==="/leaderboard"||S||Z||X||_e||oe);let ue=null;if(x==="/auth/callback"||x==="/auth/native-callback")ue=U.jsx(mj,{});else if(x==="/login")ue=U.jsx(pj,{});else if(W==="landing")ue=U.jsx(cj,{signInUrl:"/login",signUpUrl:"/login"});else{const Me=U.jsx(Re,{baseUrl:K,auth:G,signedIn:M,sessionSoftExpired:I,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:b,publicToken:y,userId:P,signInUrl:"/login",signUpUrl:"/login"},e);ce?ue=U.jsx(oj,{children:Me}):ue=Me}return U.jsx(ND,{children:U.jsx(jD,{children:U.jsxs(UD,{children:[U.jsx(k.Suspense,{fallback:null,children:ue}),U.jsx(M4,{}),U.jsx(zL,{}),U.jsx(JL,{})]})})})}const _j=PT([{path:"*",element:U.jsx(bj,{})}]);fP.createRoot(document.getElementById("root")).render(U.jsx(zf.StrictMode,{children:U.jsx(EL,{children:U.jsx(nL,{children:U.jsx(UT,{router:_j})})})}));export{RA as $,q_ as A,He as B,W4 as C,U as D,$h as E,Bj as F,Uj as G,MD as H,Zj as I,nc as J,Dj as K,dc as L,Yp as M,Lj as N,AO as O,yw as P,vc as Q,zf as R,r3 as S,$j as T,_c as U,I4 as V,Ea as W,pw as X,qj as Y,Fj as Z,sr as _,qt as a,Mj as a0,Nj as a1,Gj as a2,jj as a3,n3 as a4,Ct as a5,yb as a6,jT as a7,Fn as a8,Zf as a9,mr as aA,_k as aB,fN as aC,Df as aD,iw as aE,a3 as aF,o3 as aG,i3 as aH,Vv as aI,u3 as aa,yA as ab,Ej as ac,c3 as ad,Rj as ae,Wj as af,Kj as ag,K4 as ah,TD as ai,e3 as aj,wj as ak,xp as al,gA as am,jv as an,Hj as ao,fw as ap,hw as aq,bD as ar,ps as as,qu as at,_p as au,SD as av,bp as aw,lP as ax,Vf as ay,s3 as az,vw as b,dn as c,Na as d,s0 as e,dt as f,G_ as g,Pn as h,NM as i,Aj as j,xA as k,t3 as l,gs as m,DA as n,MA as o,Qj as p,Ij as q,k as r,zj as s,Xj as t,Sp as u,Jj as v,Oj as w,yt as x,Vj as y,Yj as z};
|