vibe-remote 2.1.6__py3-none-any.whl
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.
- config/__init__.py +37 -0
- config/paths.py +56 -0
- config/v2_compat.py +74 -0
- config/v2_config.py +206 -0
- config/v2_sessions.py +73 -0
- config/v2_settings.py +115 -0
- core/__init__.py +0 -0
- core/controller.py +736 -0
- core/handlers/__init__.py +13 -0
- core/handlers/command_handlers.py +342 -0
- core/handlers/message_handler.py +365 -0
- core/handlers/session_handler.py +233 -0
- core/handlers/settings_handler.py +362 -0
- modules/__init__.py +0 -0
- modules/agent_router.py +58 -0
- modules/agents/__init__.py +38 -0
- modules/agents/base.py +91 -0
- modules/agents/claude_agent.py +344 -0
- modules/agents/codex_agent.py +368 -0
- modules/agents/opencode_agent.py +2155 -0
- modules/agents/service.py +41 -0
- modules/agents/subagent_router.py +136 -0
- modules/claude_client.py +154 -0
- modules/im/__init__.py +63 -0
- modules/im/base.py +323 -0
- modules/im/factory.py +60 -0
- modules/im/formatters/__init__.py +4 -0
- modules/im/formatters/base_formatter.py +639 -0
- modules/im/formatters/slack_formatter.py +127 -0
- modules/im/slack.py +2091 -0
- modules/session_manager.py +138 -0
- modules/settings_manager.py +587 -0
- vibe/__init__.py +6 -0
- vibe/__main__.py +12 -0
- vibe/_version.py +34 -0
- vibe/api.py +412 -0
- vibe/cli.py +637 -0
- vibe/runtime.py +213 -0
- vibe/service_main.py +101 -0
- vibe/templates/slack_manifest.json +65 -0
- vibe/ui/dist/assets/index-8g3mNwMK.js +35 -0
- vibe/ui/dist/assets/index-M55aMB5R.css +1 -0
- vibe/ui/dist/assets/logo-BzryTZ7u.png +0 -0
- vibe/ui/dist/index.html +17 -0
- vibe/ui/dist/logo.png +0 -0
- vibe/ui/dist/vite.svg +1 -0
- vibe/ui_server.py +346 -0
- vibe_remote-2.1.6.dist-info/METADATA +295 -0
- vibe_remote-2.1.6.dist-info/RECORD +52 -0
- vibe_remote-2.1.6.dist-info/WHEEL +4 -0
- vibe_remote-2.1.6.dist-info/entry_points.txt +2 -0
- vibe_remote-2.1.6.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))l(r);new MutationObserver(r=>{for(const c of r)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function s(r){const c={};return r.integrity&&(c.integrity=r.integrity),r.referrerPolicy&&(c.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?c.credentials="include":r.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(r){if(r.ep)return;r.ep=!0;const c=s(r);fetch(r.href,c)}})();function jS(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Sc={exports:{}},Ms={};var Sg;function NS(){if(Sg)return Ms;Sg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(l,r,c){var d=null;if(c!==void 0&&(d=""+c),r.key!==void 0&&(d=""+r.key),"key"in r){c={};for(var h in r)h!=="key"&&(c[h]=r[h])}else c=r;return r=c.ref,{$$typeof:n,type:l,key:d,ref:r!==void 0?r:null,props:c}}return Ms.Fragment=a,Ms.jsx=s,Ms.jsxs=s,Ms}var Tg;function ES(){return Tg||(Tg=1,Sc.exports=NS()),Sc.exports}var m=ES(),Tc={exports:{}},fe={};var wg;function AS(){if(wg)return fe;wg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,A={};function _(N,Y,I){this.props=N,this.context=Y,this.refs=A,this.updater=I||j}_.prototype.isReactComponent={},_.prototype.setState=function(N,Y){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,Y,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function D(){}D.prototype=_.prototype;function L(N,Y,I){this.props=N,this.context=Y,this.refs=A,this.updater=I||j}var F=L.prototype=new D;F.constructor=L,R(F,_.prototype),F.isPureReactComponent=!0;var H=Array.isArray;function Q(){}var X={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function $(N,Y,I){var te=I.ref;return{$$typeof:n,type:N,key:Y,ref:te!==void 0?te:null,props:I}}function Z(N,Y){return $(N.type,Y,N.props)}function re(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function de(N){var Y={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return Y[I]})}var W=/\/+/g;function le(N,Y){return typeof N=="object"&&N!==null&&N.key!=null?de(""+N.key):Y.toString(36)}function ie(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Q,Q):(N.status="pending",N.then(function(Y){N.status==="pending"&&(N.status="fulfilled",N.value=Y)},function(Y){N.status==="pending"&&(N.status="rejected",N.reason=Y)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function O(N,Y,I,te,me){var xe=typeof N;(xe==="undefined"||xe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(xe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case n:case a:Ee=!0;break;case v:return Ee=N._init,O(Ee(N._payload),Y,I,te,me)}}if(Ee)return me=me(N),Ee=te===""?"."+le(N,0):te,H(me)?(I="",Ee!=null&&(I=Ee.replace(W,"$&/")+"/"),O(me,Y,I,"",function(Vi){return Vi})):me!=null&&(re(me)&&(me=Z(me,I+(me.key==null||N&&N.key===me.key?"":(""+me.key).replace(W,"$&/")+"/")+Ee)),Y.push(me)),1;Ee=0;var ft=te===""?".":te+":";if(H(N))for(var Ke=0;Ke<N.length;Ke++)te=N[Ke],xe=ft+le(te,Ke),Ee+=O(te,Y,I,xe,me);else if(Ke=w(N),typeof Ke=="function")for(N=Ke.call(N),Ke=0;!(te=N.next()).done;)te=te.value,xe=ft+le(te,Ke++),Ee+=O(te,Y,I,xe,me);else if(xe==="object"){if(typeof N.then=="function")return O(ie(N),Y,I,te,me);throw Y=String(N),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function U(N,Y,I){if(N==null)return N;var te=[],me=0;return O(N,te,"","",function(xe){return Y.call(I,xe,me++)}),te}function J(N){if(N._status===-1){var Y=N._result;Y=Y(),Y.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=Y)}if(N._status===1)return N._result.default;throw N._result}var ue=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},he={map:U,forEach:function(N,Y,I){U(N,function(){Y.apply(this,arguments)},I)},count:function(N){var Y=0;return U(N,function(){Y++}),Y},toArray:function(N){return U(N,function(Y){return Y})||[]},only:function(N){if(!re(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=x,fe.Children=he,fe.Component=_,fe.Fragment=s,fe.Profiler=r,fe.PureComponent=L,fe.StrictMode=l,fe.Suspense=p,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return X.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,Y,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var te=R({},N.props),me=N.key;if(Y!=null)for(xe in Y.key!==void 0&&(me=""+Y.key),Y)!q.call(Y,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Y.ref===void 0||(te[xe]=Y[xe]);var xe=arguments.length-2;if(xe===1)te.children=I;else if(1<xe){for(var Ee=Array(xe),ft=0;ft<xe;ft++)Ee[ft]=arguments[ft+2];te.children=Ee}return $(N.type,me,te)},fe.createContext=function(N){return N={$$typeof:d,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:c,_context:N},N},fe.createElement=function(N,Y,I){var te,me={},xe=null;if(Y!=null)for(te in Y.key!==void 0&&(xe=""+Y.key),Y)q.call(Y,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(me[te]=Y[te]);var Ee=arguments.length-2;if(Ee===1)me.children=I;else if(1<Ee){for(var ft=Array(Ee),Ke=0;Ke<Ee;Ke++)ft[Ke]=arguments[Ke+2];me.children=ft}if(N&&N.defaultProps)for(te in Ee=N.defaultProps,Ee)me[te]===void 0&&(me[te]=Ee[te]);return $(N,xe,me)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:h,render:N}},fe.isValidElement=re,fe.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:J}},fe.memo=function(N,Y){return{$$typeof:g,type:N,compare:Y===void 0?null:Y}},fe.startTransition=function(N){var Y=X.T,I={};X.T=I;try{var te=N(),me=X.S;me!==null&&me(I,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(Q,ue)}catch(xe){ue(xe)}finally{Y!==null&&I.types!==null&&(Y.types=I.types),X.T=Y}},fe.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},fe.use=function(N){return X.H.use(N)},fe.useActionState=function(N,Y,I){return X.H.useActionState(N,Y,I)},fe.useCallback=function(N,Y){return X.H.useCallback(N,Y)},fe.useContext=function(N){return X.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,Y){return X.H.useDeferredValue(N,Y)},fe.useEffect=function(N,Y){return X.H.useEffect(N,Y)},fe.useEffectEvent=function(N){return X.H.useEffectEvent(N)},fe.useId=function(){return X.H.useId()},fe.useImperativeHandle=function(N,Y,I){return X.H.useImperativeHandle(N,Y,I)},fe.useInsertionEffect=function(N,Y){return X.H.useInsertionEffect(N,Y)},fe.useLayoutEffect=function(N,Y){return X.H.useLayoutEffect(N,Y)},fe.useMemo=function(N,Y){return X.H.useMemo(N,Y)},fe.useOptimistic=function(N,Y){return X.H.useOptimistic(N,Y)},fe.useReducer=function(N,Y,I){return X.H.useReducer(N,Y,I)},fe.useRef=function(N){return X.H.useRef(N)},fe.useState=function(N){return X.H.useState(N)},fe.useSyncExternalStore=function(N,Y,I){return X.H.useSyncExternalStore(N,Y,I)},fe.useTransition=function(){return X.H.useTransition()},fe.version="19.2.3",fe}var Cg;function Qo(){return Cg||(Cg=1,Tc.exports=AS()),Tc.exports}var T=Qo();const Ye=jS(T);var wc={exports:{}},Ds={},Cc={exports:{}},jc={};var jg;function RS(){return jg||(jg=1,(function(n){function a(O,U){var J=O.length;O.push(U);e:for(;0<J;){var ue=J-1>>>1,he=O[ue];if(0<r(he,U))O[ue]=U,O[J]=he,J=ue;else break e}}function s(O){return O.length===0?null:O[0]}function l(O){if(O.length===0)return null;var U=O[0],J=O.pop();if(J!==U){O[0]=J;e:for(var ue=0,he=O.length,N=he>>>1;ue<N;){var Y=2*(ue+1)-1,I=O[Y],te=Y+1,me=O[te];if(0>r(I,J))te<he&&0>r(me,I)?(O[ue]=me,O[te]=J,ue=te):(O[ue]=I,O[Y]=J,ue=Y);else if(te<he&&0>r(me,J))O[ue]=me,O[te]=J,ue=te;else break e}}return U}function r(O,U){var J=O.sortIndex-U.sortIndex;return J!==0?J:O.id-U.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],g=[],v=1,x=null,S=3,w=!1,j=!1,R=!1,A=!1,_=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function F(O){for(var U=s(g);U!==null;){if(U.callback===null)l(g);else if(U.startTime<=O)l(g),U.sortIndex=U.expirationTime,a(p,U);else break;U=s(g)}}function H(O){if(R=!1,F(O),!j)if(s(p)!==null)j=!0,Q||(Q=!0,de());else{var U=s(g);U!==null&&ie(H,U.startTime-O)}}var Q=!1,X=-1,q=5,$=-1;function Z(){return A?!0:!(n.unstable_now()-$<q)}function re(){if(A=!1,Q){var O=n.unstable_now();$=O;var U=!0;try{e:{j=!1,R&&(R=!1,D(X),X=-1),w=!0;var J=S;try{t:{for(F(O),x=s(p);x!==null&&!(x.expirationTime>O&&Z());){var ue=x.callback;if(typeof ue=="function"){x.callback=null,S=x.priorityLevel;var he=ue(x.expirationTime<=O);if(O=n.unstable_now(),typeof he=="function"){x.callback=he,F(O),U=!0;break t}x===s(p)&&l(p),F(O)}else l(p);x=s(p)}if(x!==null)U=!0;else{var N=s(g);N!==null&&ie(H,N.startTime-O),U=!1}}break e}finally{x=null,S=J,w=!1}U=void 0}}finally{U?de():Q=!1}}}var de;if(typeof L=="function")de=function(){L(re)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,le=W.port2;W.port1.onmessage=re,de=function(){le.postMessage(null)}}else de=function(){_(re,0)};function ie(O,U){X=_(function(){O(n.unstable_now())},U)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(O){switch(S){case 1:case 2:case 3:var U=3;break;default:U=S}var J=S;S=U;try{return O()}finally{S=J}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(O,U){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var J=S;S=O;try{return U()}finally{S=J}},n.unstable_scheduleCallback=function(O,U,J){var ue=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?ue+J:ue):J=ue,O){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=J+he,O={id:v++,callback:U,priorityLevel:O,startTime:J,expirationTime:he,sortIndex:-1},J>ue?(O.sortIndex=J,a(g,O),s(p)===null&&O===s(g)&&(R?(D(X),X=-1):R=!0,ie(H,J-ue))):(O.sortIndex=he,a(p,O),j||w||(j=!0,Q||(Q=!0,de()))),O},n.unstable_shouldYield=Z,n.unstable_wrapCallback=function(O){var U=S;return function(){var J=S;S=U;try{return O.apply(this,arguments)}finally{S=J}}}})(jc)),jc}var Ng;function MS(){return Ng||(Ng=1,Cc.exports=RS()),Cc.exports}var Nc={exports:{}},ut={};var Eg;function DS(){if(Eg)return ut;Eg=1;var n=Qo();function a(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var l={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},r=Symbol.for("react.portal");function c(p,g,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:x==null?null:""+x,children:p,containerInfo:g,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,ut.createPortal=function(p,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return c(p,g,null,v)},ut.flushSync=function(p){var g=d.T,v=l.p;try{if(d.T=null,l.p=2,p)return p()}finally{d.T=g,l.p=v,l.d.f()}},ut.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(p,g))},ut.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},ut.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var v=g.as,x=h(v,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?l.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:w}):v==="script"&&l.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ut.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=h(g.as,g.crossOrigin);l.d.M(p,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&l.d.M(p)},ut.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,x=h(v,g.crossOrigin);l.d.L(p,v,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ut.preloadModule=function(p,g){if(typeof p=="string")if(g){var v=h(g.as,g.crossOrigin);l.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else l.d.m(p)},ut.requestFormReset=function(p){l.d.r(p)},ut.unstable_batchedUpdates=function(p,g){return p(g)},ut.useFormState=function(p,g,v){return d.H.useFormState(p,g,v)},ut.useFormStatus=function(){return d.H.useHostTransitionStatus()},ut.version="19.2.3",ut}var Ag;function OS(){if(Ag)return Nc.exports;Ag=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Nc.exports=DS(),Nc.exports}var Rg;function _S(){if(Rg)return Ds;Rg=1;var n=MS(),a=Qo(),s=OS();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(l(188))}function g(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,o=t;;){var u=i.return;if(u===null)break;var f=u.alternate;if(f===null){if(o=u.return,o!==null){i=o;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===i)return p(u),e;if(f===o)return p(u),t;f=f.sibling}throw Error(l(188))}if(i.return!==o.return)i=u,o=f;else{for(var y=!1,b=u.child;b;){if(b===i){y=!0,i=u,o=f;break}if(b===o){y=!0,o=u,i=f;break}b=b.sibling}if(!y){for(b=f.child;b;){if(b===i){y=!0,i=f,o=u;break}if(b===o){y=!0,o=f,i=u;break}b=b.sibling}if(!y)throw Error(l(189))}}if(i.alternate!==o)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),L=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case _:return"Profiler";case A:return"StrictMode";case H:return"Suspense";case Q:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case L:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ie=Array.isArray,O=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},ue=[],he=-1;function N(e){return{current:e}}function Y(e){0>he||(e.current=ue[he],ue[he]=null,he--)}function I(e,t){he++,ue[he]=e.current,e.current=t}var te=N(null),me=N(null),xe=N(null),Ee=N(null);function ft(e,t){switch(I(xe,t),I(me,e),I(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pp(t),e=Kp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(te),I(te,e)}function Ke(){Y(te),Y(me),Y(xe)}function Vi(e){e.memoizedState!==null&&I(Ee,e);var t=te.current,i=Kp(t,e.type);t!==i&&(I(me,e),I(te,i))}function il(e){me.current===e&&(Y(te),Y(me)),Ee.current===e&&(Y(Ee),Ns._currentValue=J)}var ar,bd;function fa(e){if(ar===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ar=t&&t[1]||"",bd=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ar+e+bd}var ir=!1;function sr(e,t){if(!e||ir)return"";ir=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(B){var V=B}Reflect.construct(e,[],K)}else{try{K.call()}catch(B){V=B}e.call(K.prototype)}}else{try{throw Error()}catch(B){V=B}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(B){if(B&&V&&typeof B.stack=="string")return[B.stack,V.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),y=f[0],b=f[1];if(y&&b){var C=y.split(`
|
|
4
|
+
`),z=b.split(`
|
|
5
|
+
`);for(u=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;if(o===C.length||u===z.length)for(o=C.length-1,u=z.length-1;1<=o&&0<=u&&C[o]!==z[u];)u--;for(;1<=o&&0<=u;o--,u--)if(C[o]!==z[u]){if(o!==1||u!==1)do if(o--,u--,0>u||C[o]!==z[u]){var G=`
|
|
6
|
+
`+C[o].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=o&&0<=u);break}}}finally{ir=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?fa(i):""}function nb(e,t){switch(e.tag){case 26:case 27:case 5:return fa(e.type);case 16:return fa("Lazy");case 13:return e.child!==t&&t!==null?fa("Suspense Fallback"):fa("Suspense");case 19:return fa("SuspenseList");case 0:case 15:return sr(e.type,!1);case 11:return sr(e.type.render,!1);case 1:return sr(e.type,!0);case 31:return fa("Activity");default:return""}}function Sd(e){try{var t="",i=null;do t+=nb(e,i),i=e,e=e.return;while(e);return t}catch(o){return`
|
|
7
|
+
Error generating stack: `+o.message+`
|
|
8
|
+
`+o.stack}}var lr=Object.prototype.hasOwnProperty,or=n.unstable_scheduleCallback,rr=n.unstable_cancelCallback,ab=n.unstable_shouldYield,ib=n.unstable_requestPaint,Ct=n.unstable_now,sb=n.unstable_getCurrentPriorityLevel,Td=n.unstable_ImmediatePriority,wd=n.unstable_UserBlockingPriority,sl=n.unstable_NormalPriority,lb=n.unstable_LowPriority,Cd=n.unstable_IdlePriority,ob=n.log,rb=n.unstable_setDisableYieldValue,Ui=null,jt=null;function Ln(e){if(typeof ob=="function"&&rb(e),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(Ui,e)}catch{}}var Nt=Math.clz32?Math.clz32:fb,ub=Math.log,cb=Math.LN2;function fb(e){return e>>>=0,e===0?32:31-(ub(e)/cb|0)|0}var ll=256,ol=262144,rl=4194304;function da(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ul(e,t,i){var o=e.pendingLanes;if(o===0)return 0;var u=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=o&134217727;return b!==0?(o=b&~f,o!==0?u=da(o):(y&=b,y!==0?u=da(y):i||(i=b&~e,i!==0&&(u=da(i))))):(b=o&~f,b!==0?u=da(b):y!==0?u=da(y):i||(i=o&~e,i!==0&&(u=da(i)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,i=t&-t,f>=i||f===32&&(i&4194048)!==0)?t:u}function Bi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function db(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jd(){var e=rl;return rl<<=1,(rl&62914560)===0&&(rl=4194304),e}function ur(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Hi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hb(e,t,i,o,u,f){var y=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,C=e.expirationTimes,z=e.hiddenUpdates;for(i=y&~i;0<i;){var G=31-Nt(i),K=1<<G;b[G]=0,C[G]=-1;var V=z[G];if(V!==null)for(z[G]=null,G=0;G<V.length;G++){var B=V[G];B!==null&&(B.lane&=-536870913)}i&=~K}o!==0&&Nd(e,o,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~t))}function Nd(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Nt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function Ed(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var o=31-Nt(i),u=1<<o;u&t|e[o]&t&&(e[o]|=t),i&=~u}}function Ad(e,t){var i=t&-t;return i=(i&42)!==0?1:cr(i),(i&(e.suspendedLanes|t))!==0?0:i}function cr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rd(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:mg(e.type))}function Md(e,t){var i=U.p;try{return U.p=e,t()}finally{U.p=i}}var kn=Math.random().toString(36).slice(2),at="__reactFiber$"+kn,gt="__reactProps$"+kn,Va="__reactContainer$"+kn,dr="__reactEvents$"+kn,mb="__reactListeners$"+kn,pb="__reactHandles$"+kn,Dd="__reactResources$"+kn,qi="__reactMarker$"+kn;function hr(e){delete e[at],delete e[gt],delete e[dr],delete e[mb],delete e[pb]}function Ua(e){var t=e[at];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Va]||i[at]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Ip(e);e!==null;){if(i=e[at])return i;e=Ip(e)}return t}e=i,i=e.parentNode}return null}function Ba(e){if(e=e[at]||e[Va]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Gi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function Ha(e){var t=e[Dd];return t||(t=e[Dd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function tt(e){e[qi]=!0}var Od=new Set,_d={};function ha(e,t){qa(e,t),qa(e+"Capture",t)}function qa(e,t){for(_d[e]=t,e=0;e<t.length;e++)Od.add(t[e])}var gb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ld={},kd={};function yb(e){return lr.call(kd,e)?!0:lr.call(Ld,e)?!1:gb.test(e)?kd[e]=!0:(Ld[e]=!0,!1)}function cl(e,t,i){if(yb(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function fl(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function cn(e,t,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+o)}}function kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xb(e,t,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,f=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){i=""+y,f.call(this,y)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mr(e){if(!e._valueTracker){var t=zd(e)?"checked":"value";e._valueTracker=xb(e,t,""+e[t])}}function Vd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),o="";return e&&(o=zd(e)?e.checked?"true":"false":e.value),e=o,e!==i?(t.setValue(e),!0):!1}function dl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var vb=/[\n"\\]/g;function zt(e){return e.replace(vb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pr(e,t,i,o,u,f,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?gr(e,y,kt(t)):i!=null?gr(e,y,kt(i)):o!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+kt(b):e.removeAttribute("name")}function Ud(e,t,i,o,u,f,y,b){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){mr(e);return}i=i!=null?""+kt(i):"",t=t!=null?""+kt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=b?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),mr(e)}function gr(e,t,i){t==="number"&&dl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ga(e,t,i,o){if(e=e.options,t){t={};for(var u=0;u<i.length;u++)t["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=t.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&o&&(e[i].defaultSelected=!0)}else{for(i=""+kt(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Bd(e,t,i){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+kt(i):""}function Hd(e,t,i,o){if(t==null){if(o!=null){if(i!=null)throw Error(l(92));if(ie(o)){if(1<o.length)throw Error(l(93));o=o[0]}i=o}i==null&&(i=""),t=i}i=kt(t),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),mr(e)}function Ya(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var bb=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function qd(e,t,i){var o=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,i):typeof i!="number"||i===0||bb.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Gd(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var u in t)o=t[u],t.hasOwnProperty(u)&&i[u]!==o&&qd(e,u,o)}else for(var f in t)t.hasOwnProperty(f)&&qd(e,f,t[f])}function yr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Sb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Tb=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hl(e){return Tb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fn(){}var xr=null;function vr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pa=null,Ka=null;function Yd(e){var t=Ba(e);if(t&&(e=t.stateNode)){var i=e[gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(pr(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+zt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var o=i[t];if(o!==e&&o.form===e.form){var u=o[gt]||null;if(!u)throw Error(l(90));pr(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<i.length;t++)o=i[t],o.form===e.form&&Vd(o)}break e;case"textarea":Bd(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ga(e,!!i.multiple,t,!1)}}}var br=!1;function Pd(e,t,i){if(br)return e(t,i);br=!0;try{var o=e(t);return o}finally{if(br=!1,(Pa!==null||Ka!==null)&&(eo(),Pa&&(t=Pa,e=Ka,Ka=Pa=null,Yd(t),e)))for(t=0;t<e.length;t++)Yd(e[t])}}function Yi(e,t){var i=e.stateNode;if(i===null)return null;var o=i[gt]||null;if(o===null)return null;i=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sr=!1;if(dn)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){Sr=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{Sr=!1}var zn=null,Tr=null,ml=null;function Kd(){if(ml)return ml;var e,t=Tr,i=t.length,o,u="value"in zn?zn.value:zn.textContent,f=u.length;for(e=0;e<i&&t[e]===u[e];e++);var y=i-e;for(o=1;o<=y&&t[i-o]===u[f-o];o++);return ml=u.slice(e,1<o?1-o:void 0)}function pl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gl(){return!0}function Xd(){return!1}function yt(e){function t(i,o,u,f,y){this._reactName=i,this._targetInst=u,this.type=o,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(f):f[b]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?gl:Xd,this.isPropagationStopped=Xd,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=gl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=gl)},persist:function(){},isPersistent:gl}),t}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yl=yt(ma),Ki=x({},ma,{view:0,detail:0}),wb=yt(Ki),wr,Cr,Xi,xl=x({},Ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xi&&(Xi&&e.type==="mousemove"?(wr=e.screenX-Xi.screenX,Cr=e.screenY-Xi.screenY):Cr=wr=0,Xi=e),wr)},movementY:function(e){return"movementY"in e?e.movementY:Cr}}),Fd=yt(xl),Cb=x({},xl,{dataTransfer:0}),jb=yt(Cb),Nb=x({},Ki,{relatedTarget:0}),jr=yt(Nb),Eb=x({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),Ab=yt(Eb),Rb=x({},ma,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mb=yt(Rb),Db=x({},ma,{data:0}),$d=yt(Db),Ob={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_b={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Lb[e])?!!t[e]:!1}function Nr(){return kb}var zb=x({},Ki,{key:function(e){if(e.key){var t=Ob[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_b[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nr,charCode:function(e){return e.type==="keypress"?pl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vb=yt(zb),Ub=x({},xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qd=yt(Ub),Bb=x({},Ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nr}),Hb=yt(Bb),qb=x({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gb=yt(qb),Yb=x({},xl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pb=yt(Yb),Kb=x({},ma,{newState:0,oldState:0}),Xb=yt(Kb),Fb=[9,13,27,32],Er=dn&&"CompositionEvent"in window,Fi=null;dn&&"documentMode"in document&&(Fi=document.documentMode);var $b=dn&&"TextEvent"in window&&!Fi,Zd=dn&&(!Er||Fi&&8<Fi&&11>=Fi),Jd=" ",Id=!1;function Wd(e,t){switch(e){case"keyup":return Fb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xa=!1;function Qb(e,t){switch(e){case"compositionend":return eh(t);case"keypress":return t.which!==32?null:(Id=!0,Jd);case"textInput":return e=t.data,e===Jd&&Id?null:e;default:return null}}function Zb(e,t){if(Xa)return e==="compositionend"||!Er&&Wd(e,t)?(e=Kd(),ml=Tr=zn=null,Xa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zd&&t.locale!=="ko"?null:t.data;default:return null}}var Jb={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 th(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jb[e.type]:t==="textarea"}function nh(e,t,i,o){Pa?Ka?Ka.push(o):Ka=[o]:Pa=o,t=oo(t,"onChange"),0<t.length&&(i=new yl("onChange","change",null,i,o),e.push({event:i,listeners:t}))}var $i=null,Qi=null;function Ib(e){Up(e,0)}function vl(e){var t=Gi(e);if(Vd(t))return e}function ah(e,t){if(e==="change")return t}var ih=!1;if(dn){var Ar;if(dn){var Rr="oninput"in document;if(!Rr){var sh=document.createElement("div");sh.setAttribute("oninput","return;"),Rr=typeof sh.oninput=="function"}Ar=Rr}else Ar=!1;ih=Ar&&(!document.documentMode||9<document.documentMode)}function lh(){$i&&($i.detachEvent("onpropertychange",oh),Qi=$i=null)}function oh(e){if(e.propertyName==="value"&&vl(Qi)){var t=[];nh(t,Qi,e,vr(e)),Pd(Ib,t)}}function Wb(e,t,i){e==="focusin"?(lh(),$i=t,Qi=i,$i.attachEvent("onpropertychange",oh)):e==="focusout"&&lh()}function e1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vl(Qi)}function t1(e,t){if(e==="click")return vl(t)}function n1(e,t){if(e==="input"||e==="change")return vl(t)}function a1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:a1;function Zi(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var u=i[o];if(!lr.call(t,u)||!Et(e[u],t[u]))return!1}return!0}function rh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uh(e,t){var i=rh(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=t&&o>=t)return{node:i,offset:t-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=rh(i)}}function ch(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ch(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=dl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=dl(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var i1=dn&&"documentMode"in document&&11>=document.documentMode,Fa=null,Dr=null,Ji=null,Or=!1;function dh(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Or||Fa==null||Fa!==dl(o)||(o=Fa,"selectionStart"in o&&Mr(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ji&&Zi(Ji,o)||(Ji=o,o=oo(Dr,"onSelect"),0<o.length&&(t=new yl("onSelect","select",null,t,i),e.push({event:t,listeners:o}),t.target=Fa)))}function pa(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var $a={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionrun:pa("Transition","TransitionRun"),transitionstart:pa("Transition","TransitionStart"),transitioncancel:pa("Transition","TransitionCancel"),transitionend:pa("Transition","TransitionEnd")},_r={},hh={};dn&&(hh=document.createElement("div").style,"AnimationEvent"in window||(delete $a.animationend.animation,delete $a.animationiteration.animation,delete $a.animationstart.animation),"TransitionEvent"in window||delete $a.transitionend.transition);function ga(e){if(_r[e])return _r[e];if(!$a[e])return e;var t=$a[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in hh)return _r[e]=t[i];return e}var mh=ga("animationend"),ph=ga("animationiteration"),gh=ga("animationstart"),s1=ga("transitionrun"),l1=ga("transitionstart"),o1=ga("transitioncancel"),yh=ga("transitionend"),xh=new Map,Lr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Lr.push("scrollEnd");function Qt(e,t){xh.set(e,t),ha(t,[e])}var bl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vt=[],Qa=0,kr=0;function Sl(){for(var e=Qa,t=kr=Qa=0;t<e;){var i=Vt[t];Vt[t++]=null;var o=Vt[t];Vt[t++]=null;var u=Vt[t];Vt[t++]=null;var f=Vt[t];if(Vt[t++]=null,o!==null&&u!==null){var y=o.pending;y===null?u.next=u:(u.next=y.next,y.next=u),o.pending=u}f!==0&&vh(i,u,f)}}function Tl(e,t,i,o){Vt[Qa++]=e,Vt[Qa++]=t,Vt[Qa++]=i,Vt[Qa++]=o,kr|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function zr(e,t,i,o){return Tl(e,t,i,o),wl(e)}function ya(e,t){return Tl(e,null,null,t),wl(e)}function vh(e,t,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var u=!1,f=e.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&t!==null&&(u=31-Nt(i),e=f.hiddenUpdates,o=e[u],o===null?e[u]=[t]:o.push(t),t.lane=i|536870912),f):null}function wl(e){if(50<vs)throw vs=0,Ku=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Za={};function r1(e,t,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function At(e,t,i,o){return new r1(e,t,i,o)}function Vr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hn(e,t){var i=e.alternate;return i===null?(i=At(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function bh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Cl(e,t,i,o,u,f){var y=0;if(o=e,typeof e=="function")Vr(e)&&(y=1);else if(typeof e=="string")y=hS(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=At(31,i,t,u),e.elementType=$,e.lanes=f,e;case R:return xa(i.children,u,f,t);case A:y=8,u|=24;break;case _:return e=At(12,i,t,u|2),e.elementType=_,e.lanes=f,e;case H:return e=At(13,i,t,u),e.elementType=H,e.lanes=f,e;case Q:return e=At(19,i,t,u),e.elementType=Q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:y=10;break e;case D:y=9;break e;case F:y=11;break e;case X:y=14;break e;case q:y=16,o=null;break e}y=29,i=Error(l(130,e===null?"null":typeof e,"")),o=null}return t=At(y,i,t,u),t.elementType=e,t.type=o,t.lanes=f,t}function xa(e,t,i,o){return e=At(7,e,o,t),e.lanes=i,e}function Ur(e,t,i){return e=At(6,e,null,t),e.lanes=i,e}function Sh(e){var t=At(18,null,null,0);return t.stateNode=e,t}function Br(e,t,i){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Th=new WeakMap;function Ut(e,t){if(typeof e=="object"&&e!==null){var i=Th.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Sd(t)},Th.set(e,t),t)}return{value:e,source:t,stack:Sd(t)}}var Ja=[],Ia=0,jl=null,Ii=0,Bt=[],Ht=0,Vn=null,tn=1,nn="";function mn(e,t){Ja[Ia++]=Ii,Ja[Ia++]=jl,jl=e,Ii=t}function wh(e,t,i){Bt[Ht++]=tn,Bt[Ht++]=nn,Bt[Ht++]=Vn,Vn=e;var o=tn;e=nn;var u=32-Nt(o)-1;o&=~(1<<u),i+=1;var f=32-Nt(t)+u;if(30<f){var y=u-u%5;f=(o&(1<<y)-1).toString(32),o>>=y,u-=y,tn=1<<32-Nt(t)+u|i<<u|o,nn=f+e}else tn=1<<f|i<<u|o,nn=e}function Hr(e){e.return!==null&&(mn(e,1),wh(e,1,0))}function qr(e){for(;e===jl;)jl=Ja[--Ia],Ja[Ia]=null,Ii=Ja[--Ia],Ja[Ia]=null;for(;e===Vn;)Vn=Bt[--Ht],Bt[Ht]=null,nn=Bt[--Ht],Bt[Ht]=null,tn=Bt[--Ht],Bt[Ht]=null}function Ch(e,t){Bt[Ht++]=tn,Bt[Ht++]=nn,Bt[Ht++]=Vn,tn=t.id,nn=t.overflow,Vn=e}var it=null,ke=null,we=!1,Un=null,qt=!1,Gr=Error(l(519));function Bn(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wi(Ut(t,e)),Gr}function jh(e){var t=e.stateNode,i=e.type,o=e.memoizedProps;switch(t[at]=e,t[gt]=o,i){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(i=0;i<Ss.length;i++)be(Ss[i],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),Ud(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),Hd(t,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||o.suppressHydrationWarning===!0||Gp(t.textContent,i)?(o.popover!=null&&(be("beforetoggle",t),be("toggle",t)),o.onScroll!=null&&be("scroll",t),o.onScrollEnd!=null&&be("scrollend",t),o.onClick!=null&&(t.onclick=fn),t=!0):t=!1,t||Bn(e,!0)}function Nh(e){for(it=e.return;it;)switch(it.tag){case 5:case 31:case 13:qt=!1;return;case 27:case 3:qt=!0;return;default:it=it.return}}function Wa(e){if(e!==it)return!1;if(!we)return Nh(e),we=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||lc(e.type,e.memoizedProps)),i=!i),i&&ke&&Bn(e),Nh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ke=Jp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ke=Jp(e)}else t===27?(t=ke,Wn(e.type)?(e=fc,fc=null,ke=e):ke=t):ke=it?Yt(e.stateNode.nextSibling):null;return!0}function va(){ke=it=null,we=!1}function Yr(){var e=Un;return e!==null&&(St===null?St=e:St.push.apply(St,e),Un=null),e}function Wi(e){Un===null?Un=[e]:Un.push(e)}var Pr=N(null),ba=null,pn=null;function Hn(e,t,i){I(Pr,t._currentValue),t._currentValue=i}function gn(e){e._currentValue=Pr.current,Y(Pr)}function Kr(e,t,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===i)break;e=e.return}}function Xr(e,t,i,o){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var y=u.child;f=f.firstContext;e:for(;f!==null;){var b=f;f=u;for(var C=0;C<t.length;C++)if(b.context===t[C]){f.lanes|=i,b=f.alternate,b!==null&&(b.lanes|=i),Kr(f.return,i,e),o||(y=null);break e}f=b.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(l(341));y.lanes|=i,f=y.alternate,f!==null&&(f.lanes|=i),Kr(y,i,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function ei(e,t,i,o){e=null;for(var u=t,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(l(387));if(y=y.memoizedProps,y!==null){var b=u.type;Et(u.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(u===Ee.current){if(y=u.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Ns):e=[Ns])}u=u.return}e!==null&&Xr(t,e,i,o),t.flags|=262144}function Nl(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ba=e,pn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return Eh(ba,e)}function El(e,t){return ba===null&&Sa(e),Eh(e,t)}function Eh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},pn===null){if(e===null)throw Error(l(308));pn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pn=pn.next=t;return i}var u1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},c1=n.unstable_scheduleCallback,f1=n.unstable_NormalPriority,$e={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fr(){return{controller:new u1,data:new Map,refCount:0}}function es(e){e.refCount--,e.refCount===0&&c1(f1,function(){e.controller.abort()})}var ts=null,$r=0,ti=0,ni=null;function d1(e,t){if(ts===null){var i=ts=[];$r=0,ti=Ju(),ni={status:"pending",value:void 0,then:function(o){i.push(o)}}}return $r++,t.then(Ah,Ah),t}function Ah(){if(--$r===0&&ts!==null){ni!==null&&(ni.status="fulfilled");var e=ts;ts=null,ti=0,ni=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function h1(e,t){var i=[],o={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var u=0;u<i.length;u++)(0,i[u])(t)},function(u){for(o.status="rejected",o.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),o}var Rh=O.S;O.S=function(e,t){dp=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&d1(e,t),Rh!==null&&Rh(e,t)};var Ta=N(null);function Qr(){var e=Ta.current;return e!==null?e:_e.pooledCache}function Al(e,t){t===null?I(Ta,Ta.current):I(Ta,t.pool)}function Mh(){var e=Qr();return e===null?null:{parent:$e._currentValue,pool:e}}var ai=Error(l(460)),Zr=Error(l(474)),Rl=Error(l(542)),Ml={then:function(){}};function Dh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Oh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(fn,fn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lh(e),e;default:if(typeof t.status=="string")t.then(fn,fn);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=o}},function(o){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lh(e),e}throw Ca=t,ai}}function wa(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ca=i,ai):i}}var Ca=null;function _h(){if(Ca===null)throw Error(l(459));var e=Ca;return Ca=null,e}function Lh(e){if(e===ai||e===Rl)throw Error(l(483))}var ii=null,ns=0;function Dl(e){var t=ns;return ns+=1,ii===null&&(ii=[]),Oh(ii,e,t)}function as(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ol(e,t){throw t.$$typeof===S?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function kh(e){function t(M,E){if(e){var k=M.deletions;k===null?(M.deletions=[E],M.flags|=16):k.push(E)}}function i(M,E){if(!e)return null;for(;E!==null;)t(M,E),E=E.sibling;return null}function o(M){for(var E=new Map;M!==null;)M.key!==null?E.set(M.key,M):E.set(M.index,M),M=M.sibling;return E}function u(M,E){return M=hn(M,E),M.index=0,M.sibling=null,M}function f(M,E,k){return M.index=k,e?(k=M.alternate,k!==null?(k=k.index,k<E?(M.flags|=67108866,E):k):(M.flags|=67108866,E)):(M.flags|=1048576,E)}function y(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function b(M,E,k,P){return E===null||E.tag!==6?(E=Ur(k,M.mode,P),E.return=M,E):(E=u(E,k),E.return=M,E)}function C(M,E,k,P){var se=k.type;return se===R?G(M,E,k.props.children,P,k.key):E!==null&&(E.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===q&&wa(se)===E.type)?(E=u(E,k.props),as(E,k),E.return=M,E):(E=Cl(k.type,k.key,k.props,null,M.mode,P),as(E,k),E.return=M,E)}function z(M,E,k,P){return E===null||E.tag!==4||E.stateNode.containerInfo!==k.containerInfo||E.stateNode.implementation!==k.implementation?(E=Br(k,M.mode,P),E.return=M,E):(E=u(E,k.children||[]),E.return=M,E)}function G(M,E,k,P,se){return E===null||E.tag!==7?(E=xa(k,M.mode,P,se),E.return=M,E):(E=u(E,k),E.return=M,E)}function K(M,E,k){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Ur(""+E,M.mode,k),E.return=M,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case w:return k=Cl(E.type,E.key,E.props,null,M.mode,k),as(k,E),k.return=M,k;case j:return E=Br(E,M.mode,k),E.return=M,E;case q:return E=wa(E),K(M,E,k)}if(ie(E)||de(E))return E=xa(E,M.mode,k,null),E.return=M,E;if(typeof E.then=="function")return K(M,Dl(E),k);if(E.$$typeof===L)return K(M,El(M,E),k);Ol(M,E)}return null}function V(M,E,k,P){var se=E!==null?E.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return se!==null?null:b(M,E,""+k,P);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case w:return k.key===se?C(M,E,k,P):null;case j:return k.key===se?z(M,E,k,P):null;case q:return k=wa(k),V(M,E,k,P)}if(ie(k)||de(k))return se!==null?null:G(M,E,k,P,null);if(typeof k.then=="function")return V(M,E,Dl(k),P);if(k.$$typeof===L)return V(M,E,El(M,k),P);Ol(M,k)}return null}function B(M,E,k,P,se){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return M=M.get(k)||null,b(E,M,""+P,se);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case w:return M=M.get(P.key===null?k:P.key)||null,C(E,M,P,se);case j:return M=M.get(P.key===null?k:P.key)||null,z(E,M,P,se);case q:return P=wa(P),B(M,E,k,P,se)}if(ie(P)||de(P))return M=M.get(k)||null,G(E,M,P,se,null);if(typeof P.then=="function")return B(M,E,k,Dl(P),se);if(P.$$typeof===L)return B(M,E,k,El(E,P),se);Ol(E,P)}return null}function ne(M,E,k,P){for(var se=null,Ce=null,ae=E,ge=E=0,Te=null;ae!==null&&ge<k.length;ge++){ae.index>ge?(Te=ae,ae=null):Te=ae.sibling;var je=V(M,ae,k[ge],P);if(je===null){ae===null&&(ae=Te);break}e&&ae&&je.alternate===null&&t(M,ae),E=f(je,E,ge),Ce===null?se=je:Ce.sibling=je,Ce=je,ae=Te}if(ge===k.length)return i(M,ae),we&&mn(M,ge),se;if(ae===null){for(;ge<k.length;ge++)ae=K(M,k[ge],P),ae!==null&&(E=f(ae,E,ge),Ce===null?se=ae:Ce.sibling=ae,Ce=ae);return we&&mn(M,ge),se}for(ae=o(ae);ge<k.length;ge++)Te=B(ae,M,ge,k[ge],P),Te!==null&&(e&&Te.alternate!==null&&ae.delete(Te.key===null?ge:Te.key),E=f(Te,E,ge),Ce===null?se=Te:Ce.sibling=Te,Ce=Te);return e&&ae.forEach(function(ia){return t(M,ia)}),we&&mn(M,ge),se}function oe(M,E,k,P){if(k==null)throw Error(l(151));for(var se=null,Ce=null,ae=E,ge=E=0,Te=null,je=k.next();ae!==null&&!je.done;ge++,je=k.next()){ae.index>ge?(Te=ae,ae=null):Te=ae.sibling;var ia=V(M,ae,je.value,P);if(ia===null){ae===null&&(ae=Te);break}e&&ae&&ia.alternate===null&&t(M,ae),E=f(ia,E,ge),Ce===null?se=ia:Ce.sibling=ia,Ce=ia,ae=Te}if(je.done)return i(M,ae),we&&mn(M,ge),se;if(ae===null){for(;!je.done;ge++,je=k.next())je=K(M,je.value,P),je!==null&&(E=f(je,E,ge),Ce===null?se=je:Ce.sibling=je,Ce=je);return we&&mn(M,ge),se}for(ae=o(ae);!je.done;ge++,je=k.next())je=B(ae,M,ge,je.value,P),je!==null&&(e&&je.alternate!==null&&ae.delete(je.key===null?ge:je.key),E=f(je,E,ge),Ce===null?se=je:Ce.sibling=je,Ce=je);return e&&ae.forEach(function(CS){return t(M,CS)}),we&&mn(M,ge),se}function Oe(M,E,k,P){if(typeof k=="object"&&k!==null&&k.type===R&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case w:e:{for(var se=k.key;E!==null;){if(E.key===se){if(se=k.type,se===R){if(E.tag===7){i(M,E.sibling),P=u(E,k.props.children),P.return=M,M=P;break e}}else if(E.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===q&&wa(se)===E.type){i(M,E.sibling),P=u(E,k.props),as(P,k),P.return=M,M=P;break e}i(M,E);break}else t(M,E);E=E.sibling}k.type===R?(P=xa(k.props.children,M.mode,P,k.key),P.return=M,M=P):(P=Cl(k.type,k.key,k.props,null,M.mode,P),as(P,k),P.return=M,M=P)}return y(M);case j:e:{for(se=k.key;E!==null;){if(E.key===se)if(E.tag===4&&E.stateNode.containerInfo===k.containerInfo&&E.stateNode.implementation===k.implementation){i(M,E.sibling),P=u(E,k.children||[]),P.return=M,M=P;break e}else{i(M,E);break}else t(M,E);E=E.sibling}P=Br(k,M.mode,P),P.return=M,M=P}return y(M);case q:return k=wa(k),Oe(M,E,k,P)}if(ie(k))return ne(M,E,k,P);if(de(k)){if(se=de(k),typeof se!="function")throw Error(l(150));return k=se.call(k),oe(M,E,k,P)}if(typeof k.then=="function")return Oe(M,E,Dl(k),P);if(k.$$typeof===L)return Oe(M,E,El(M,k),P);Ol(M,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,E!==null&&E.tag===6?(i(M,E.sibling),P=u(E,k),P.return=M,M=P):(i(M,E),P=Ur(k,M.mode,P),P.return=M,M=P),y(M)):i(M,E)}return function(M,E,k,P){try{ns=0;var se=Oe(M,E,k,P);return ii=null,se}catch(ae){if(ae===ai||ae===Rl)throw ae;var Ce=At(29,ae,null,M.mode);return Ce.lanes=P,Ce.return=M,Ce}}}var ja=kh(!0),zh=kh(!1),qn=!1;function Jr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ir(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Gn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yn(e,t,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ne&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,t=wl(e),vh(e,null,i),t}return Tl(e,o,t,i),wl(e)}function is(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,Ed(e,i)}}function Wr(e,t){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var u=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?u=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?u=f=t:f=f.next=t}else u=f=t;i={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var eu=!1;function ss(){if(eu){var e=ni;if(e!==null)throw e}}function ls(e,t,i,o){eu=!1;var u=e.updateQueue;qn=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var C=b,z=C.next;C.next=null,y===null?f=z:y.next=z,y=C;var G=e.alternate;G!==null&&(G=G.updateQueue,b=G.lastBaseUpdate,b!==y&&(b===null?G.firstBaseUpdate=z:b.next=z,G.lastBaseUpdate=C))}if(f!==null){var K=u.baseState;y=0,G=z=C=null,b=f;do{var V=b.lane&-536870913,B=V!==b.lane;if(B?(Se&V)===V:(o&V)===V){V!==0&&V===ti&&(eu=!0),G!==null&&(G=G.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ne=e,oe=b;V=t;var Oe=i;switch(oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){K=ne.call(Oe,K,V);break e}K=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,V=typeof ne=="function"?ne.call(Oe,K,V):ne,V==null)break e;K=x({},K,V);break e;case 2:qn=!0}}V=b.callback,V!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[V]:B.push(V))}else B={lane:V,tag:b.tag,payload:b.payload,callback:b.callback,next:null},G===null?(z=G=B,C=K):G=G.next=B,y|=V;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;B=b,b=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);G===null&&(C=K),u.baseState=C,u.firstBaseUpdate=z,u.lastBaseUpdate=G,f===null&&(u.shared.lanes=0),$n|=y,e.lanes=y,e.memoizedState=K}}function Vh(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function Uh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Vh(i[e],t)}var si=N(null),_l=N(0);function Bh(e,t){e=jn,I(_l,e),I(si,t),jn=e|t.baseLanes}function tu(){I(_l,jn),I(si,si.current)}function nu(){jn=_l.current,Y(si),Y(_l)}var Rt=N(null),Gt=null;function Pn(e){var t=e.alternate;I(Xe,Xe.current&1),I(Rt,e),Gt===null&&(t===null||si.current!==null||t.memoizedState!==null)&&(Gt=e)}function au(e){I(Xe,Xe.current),I(Rt,e),Gt===null&&(Gt=e)}function Hh(e){e.tag===22?(I(Xe,Xe.current),I(Rt,e),Gt===null&&(Gt=e)):Kn()}function Kn(){I(Xe,Xe.current),I(Rt,Rt.current)}function Mt(e){Y(Rt),Gt===e&&(Gt=null),Y(Xe)}var Xe=N(0);function Ll(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||uc(i)||cc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yn=0,pe=null,Me=null,Qe=null,kl=!1,li=!1,Na=!1,zl=0,os=0,oi=null,m1=0;function qe(){throw Error(l(321))}function iu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Et(e[i],t[i]))return!1;return!0}function su(e,t,i,o,u,f){return yn=f,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?wm:bu,Na=!1,f=i(o,u),Na=!1,li&&(f=Gh(t,i,o,u)),qh(e),f}function qh(e){O.H=cs;var t=Me!==null&&Me.next!==null;if(yn=0,Qe=Me=pe=null,kl=!1,os=0,oi=null,t)throw Error(l(300));e===null||Ze||(e=e.dependencies,e!==null&&Nl(e)&&(Ze=!0))}function Gh(e,t,i,o){pe=e;var u=0;do{if(li&&(oi=null),os=0,li=!1,25<=u)throw Error(l(301));if(u+=1,Qe=Me=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}O.H=Cm,f=t(i,o)}while(li);return f}function p1(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?rs(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(pe.flags|=1024),t}function lu(){var e=zl!==0;return zl=0,e}function ou(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ru(e){if(kl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}kl=!1}yn=0,Qe=Me=pe=null,li=!1,os=zl=0,oi=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?pe.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Fe(){if(Me===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Qe===null?pe.memoizedState:Qe.next;if(t!==null)Qe=t,Me=e;else{if(e===null)throw pe.alternate===null?Error(l(467)):Error(l(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Qe===null?pe.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function Vl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rs(e){var t=os;return os+=1,oi===null&&(oi=[]),e=Oh(oi,e,t),t=pe,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?wm:bu),e}function Ul(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rs(e);if(e.$$typeof===L)return st(e)}throw Error(l(438,String(e)))}function uu(e){var t=null,i=pe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var o=pe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Vl(),pe.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),o=0;o<e;o++)i[o]=Z;return t.index++,i}function xn(e,t){return typeof t=="function"?t(e):t}function Bl(e){var t=Fe();return cu(t,Me,e)}function cu(e,t,i){var o=e.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=i;var u=e.baseQueue,f=o.pending;if(f!==null){if(u!==null){var y=u.next;u.next=f.next,f.next=y}t.baseQueue=u=f,o.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{t=u.next;var b=y=null,C=null,z=t,G=!1;do{var K=z.lane&-536870913;if(K!==z.lane?(Se&K)===K:(yn&K)===K){var V=z.revertLane;if(V===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),K===ti&&(G=!0);else if((yn&V)===V){z=z.next,V===ti&&(G=!0);continue}else K={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},C===null?(b=C=K,y=f):C=C.next=K,pe.lanes|=V,$n|=V;K=z.action,Na&&i(f,K),f=z.hasEagerState?z.eagerState:i(f,K)}else V={lane:K,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},C===null?(b=C=V,y=f):C=C.next=V,pe.lanes|=K,$n|=K;z=z.next}while(z!==null&&z!==t);if(C===null?y=f:C.next=b,!Et(f,e.memoizedState)&&(Ze=!0,G&&(i=ni,i!==null)))throw i;e.memoizedState=f,e.baseState=y,e.baseQueue=C,o.lastRenderedState=f}return u===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function fu(e){var t=Fe(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var o=i.dispatch,u=i.pending,f=t.memoizedState;if(u!==null){i.pending=null;var y=u=u.next;do f=e(f,y.action),y=y.next;while(y!==u);Et(f,t.memoizedState)||(Ze=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),i.lastRenderedState=f}return[f,o]}function Yh(e,t,i){var o=pe,u=Fe(),f=we;if(f){if(i===void 0)throw Error(l(407));i=i()}else i=t();var y=!Et((Me||u).memoizedState,i);if(y&&(u.memoizedState=i,Ze=!0),u=u.queue,mu(Xh.bind(null,o,u,e),[e]),u.getSnapshot!==t||y||Qe!==null&&Qe.memoizedState.tag&1){if(o.flags|=2048,ri(9,{destroy:void 0},Kh.bind(null,o,u,i,t),null),_e===null)throw Error(l(349));f||(yn&127)!==0||Ph(o,t,i)}return i}function Ph(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=pe.updateQueue,t===null?(t=Vl(),pe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Kh(e,t,i,o){t.value=i,t.getSnapshot=o,Fh(t)&&$h(e)}function Xh(e,t,i){return i(function(){Fh(t)&&$h(e)})}function Fh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Et(e,i)}catch{return!0}}function $h(e){var t=ya(e,2);t!==null&&Tt(t,e,2)}function du(e){var t=dt();if(typeof e=="function"){var i=e;if(e=i(),Na){Ln(!0);try{i()}finally{Ln(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:e},t}function Qh(e,t,i,o){return e.baseState=i,cu(e,Me,typeof o=="function"?o:xn)}function g1(e,t,i,o,u){if(Gl(e))throw Error(l(485));if(e=t.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};O.T!==null?i(!0):f.isTransition=!1,o(f),i=t.pending,i===null?(f.next=t.pending=f,Zh(t,f)):(f.next=i.next,t.pending=i.next=f)}}function Zh(e,t){var i=t.action,o=t.payload,u=e.state;if(t.isTransition){var f=O.T,y={};O.T=y;try{var b=i(u,o),C=O.S;C!==null&&C(y,b),Jh(e,t,b)}catch(z){hu(e,t,z)}finally{f!==null&&y.types!==null&&(f.types=y.types),O.T=f}}else try{f=i(u,o),Jh(e,t,f)}catch(z){hu(e,t,z)}}function Jh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Ih(e,t,o)},function(o){return hu(e,t,o)}):Ih(e,t,i)}function Ih(e,t,i){t.status="fulfilled",t.value=i,Wh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Zh(e,i)))}function hu(e,t,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=i,Wh(t),t=t.next;while(t!==o)}e.action=null}function Wh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function em(e,t){return t}function tm(e,t){if(we){var i=_e.formState;if(i!==null){e:{var o=pe;if(we){if(ke){t:{for(var u=ke,f=qt;u.nodeType!==8;){if(!f){u=null;break t}if(u=Yt(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){ke=Yt(u.nextSibling),o=u.data==="F!";break e}}Bn(o)}o=!1}o&&(t=i[0])}}return i=dt(),i.memoizedState=i.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:t},i.queue=o,i=bm.bind(null,pe,o),o.dispatch=i,o=du(!1),f=vu.bind(null,pe,!1,o.queue),o=dt(),u={state:t,dispatch:null,action:e,pending:null},o.queue=u,i=g1.bind(null,pe,u,f,i),u.dispatch=i,o.memoizedState=e,[t,i,!1]}function nm(e){var t=Fe();return am(t,Me,e)}function am(e,t,i){if(t=cu(e,t,em)[0],e=Bl(xn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=rs(t)}catch(y){throw y===ai?Rl:y}else o=t;t=Fe();var u=t.queue,f=u.dispatch;return i!==t.memoizedState&&(pe.flags|=2048,ri(9,{destroy:void 0},y1.bind(null,u,i),null)),[o,f,e]}function y1(e,t){e.action=t}function im(e){var t=Fe(),i=Me;if(i!==null)return am(t,i,e);Fe(),t=t.memoizedState,i=Fe();var o=i.queue.dispatch;return i.memoizedState=e,[t,o,!1]}function ri(e,t,i,o){return e={tag:e,create:i,deps:o,inst:t,next:null},t=pe.updateQueue,t===null&&(t=Vl(),pe.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,t.lastEffect=e),e}function sm(){return Fe().memoizedState}function Hl(e,t,i,o){var u=dt();pe.flags|=e,u.memoizedState=ri(1|t,{destroy:void 0},i,o===void 0?null:o)}function ql(e,t,i,o){var u=Fe();o=o===void 0?null:o;var f=u.memoizedState.inst;Me!==null&&o!==null&&iu(o,Me.memoizedState.deps)?u.memoizedState=ri(t,f,i,o):(pe.flags|=e,u.memoizedState=ri(1|t,f,i,o))}function lm(e,t){Hl(8390656,8,e,t)}function mu(e,t){ql(2048,8,e,t)}function x1(e){pe.flags|=4;var t=pe.updateQueue;if(t===null)t=Vl(),pe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function om(e){var t=Fe().memoizedState;return x1({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function rm(e,t){return ql(4,2,e,t)}function um(e,t){return ql(4,4,e,t)}function cm(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fm(e,t,i){i=i!=null?i.concat([e]):null,ql(4,4,cm.bind(null,t,e),i)}function pu(){}function dm(e,t){var i=Fe();t=t===void 0?null:t;var o=i.memoizedState;return t!==null&&iu(t,o[1])?o[0]:(i.memoizedState=[e,t],e)}function hm(e,t){var i=Fe();t=t===void 0?null:t;var o=i.memoizedState;if(t!==null&&iu(t,o[1]))return o[0];if(o=e(),Na){Ln(!0);try{e()}finally{Ln(!1)}}return i.memoizedState=[o,t],o}function gu(e,t,i){return i===void 0||(yn&1073741824)!==0&&(Se&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=mp(),pe.lanes|=e,$n|=e,i)}function mm(e,t,i,o){return Et(i,t)?i:si.current!==null?(e=gu(e,i,o),Et(e,t)||(Ze=!0),e):(yn&42)===0||(yn&1073741824)!==0&&(Se&261930)===0?(Ze=!0,e.memoizedState=i):(e=mp(),pe.lanes|=e,$n|=e,t)}function pm(e,t,i,o,u){var f=U.p;U.p=f!==0&&8>f?f:8;var y=O.T,b={};O.T=b,vu(e,!1,t,i);try{var C=u(),z=O.S;if(z!==null&&z(b,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=h1(C,o);us(e,t,G,_t(e))}else us(e,t,o,_t(e))}catch(K){us(e,t,{then:function(){},status:"rejected",reason:K},_t())}finally{U.p=f,y!==null&&b.types!==null&&(y.types=b.types),O.T=y}}function v1(){}function yu(e,t,i,o){if(e.tag!==5)throw Error(l(476));var u=gm(e).queue;pm(e,u,t,J,i===null?v1:function(){return ym(e),i(o)})}function gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=gm(e);t.next===null&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},_t())}function xu(){return st(Ns)}function xm(){return Fe().memoizedState}function vm(){return Fe().memoizedState}function b1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Gn(i);var o=Yn(t,e,i);o!==null&&(Tt(o,t,i),is(o,t,i)),t={cache:Fr()},e.payload=t;return}t=t.return}}function S1(e,t,i){var o=_t();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Gl(e)?Sm(t,i):(i=zr(e,t,i,o),i!==null&&(Tt(i,e,o),Tm(i,t,o)))}function bm(e,t,i){var o=_t();us(e,t,i,o)}function us(e,t,i,o){var u={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Gl(e))Sm(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var y=t.lastRenderedState,b=f(y,i);if(u.hasEagerState=!0,u.eagerState=b,Et(b,y))return Tl(e,t,u,0),_e===null&&Sl(),!1}catch{}if(i=zr(e,t,u,o),i!==null)return Tt(i,e,o),Tm(i,t,o),!0}return!1}function vu(e,t,i,o){if(o={lane:2,revertLane:Ju(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Gl(e)){if(t)throw Error(l(479))}else t=zr(e,i,o,2),t!==null&&Tt(t,e,2)}function Gl(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Sm(e,t){li=kl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Tm(e,t,i){if((i&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,Ed(e,i)}}var cs={readContext:st,use:Ul,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};cs.useEffectEvent=qe;var wm={readContext:st,use:Ul,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:lm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Hl(4194308,4,cm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){Hl(4,2,e,t)},useMemo:function(e,t){var i=dt();t=t===void 0?null:t;var o=e();if(Na){Ln(!0);try{e()}finally{Ln(!1)}}return i.memoizedState=[o,t],o},useReducer:function(e,t,i){var o=dt();if(i!==void 0){var u=i(t);if(Na){Ln(!0);try{i(t)}finally{Ln(!1)}}}else u=t;return o.memoizedState=o.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},o.queue=e,e=e.dispatch=S1.bind(null,pe,e),[o.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=du(e);var t=e.queue,i=bm.bind(null,pe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:pu,useDeferredValue:function(e,t){var i=dt();return gu(i,e,t)},useTransition:function(){var e=du(!1);return e=pm.bind(null,pe,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var o=pe,u=dt();if(we){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),_e===null)throw Error(l(349));(Se&127)!==0||Ph(o,t,i)}u.memoizedState=i;var f={value:i,getSnapshot:t};return u.queue=f,lm(Xh.bind(null,o,f,e),[e]),o.flags|=2048,ri(9,{destroy:void 0},Kh.bind(null,o,f,i,t),null),i},useId:function(){var e=dt(),t=_e.identifierPrefix;if(we){var i=nn,o=tn;i=(o&~(1<<32-Nt(o)-1)).toString(32)+i,t="_"+t+"R_"+i,i=zl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=m1++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xu,useFormState:tm,useActionState:tm,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=vu.bind(null,pe,!0,i),i.dispatch=t,[e,t]},useMemoCache:uu,useCacheRefresh:function(){return dt().memoizedState=b1.bind(null,pe)},useEffectEvent:function(e){var t=dt(),i={impl:e};return t.memoizedState=i,function(){if((Ne&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},bu={readContext:st,use:Ul,useCallback:dm,useContext:st,useEffect:mu,useImperativeHandle:fm,useInsertionEffect:rm,useLayoutEffect:um,useMemo:hm,useReducer:Bl,useRef:sm,useState:function(){return Bl(xn)},useDebugValue:pu,useDeferredValue:function(e,t){var i=Fe();return mm(i,Me.memoizedState,e,t)},useTransition:function(){var e=Bl(xn)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:Yh,useId:xm,useHostTransitionStatus:xu,useFormState:nm,useActionState:nm,useOptimistic:function(e,t){var i=Fe();return Qh(i,Me,e,t)},useMemoCache:uu,useCacheRefresh:vm};bu.useEffectEvent=om;var Cm={readContext:st,use:Ul,useCallback:dm,useContext:st,useEffect:mu,useImperativeHandle:fm,useInsertionEffect:rm,useLayoutEffect:um,useMemo:hm,useReducer:fu,useRef:sm,useState:function(){return fu(xn)},useDebugValue:pu,useDeferredValue:function(e,t){var i=Fe();return Me===null?gu(i,e,t):mm(i,Me.memoizedState,e,t)},useTransition:function(){var e=fu(xn)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:Yh,useId:xm,useHostTransitionStatus:xu,useFormState:im,useActionState:im,useOptimistic:function(e,t){var i=Fe();return Me!==null?Qh(i,Me,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:uu,useCacheRefresh:vm};Cm.useEffectEvent=om;function Su(e,t,i,o){t=e.memoizedState,i=i(o,t),i=i==null?t:x({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Tu={enqueueSetState:function(e,t,i){e=e._reactInternals;var o=_t(),u=Gn(o);u.payload=t,i!=null&&(u.callback=i),t=Yn(e,u,o),t!==null&&(Tt(t,e,o),is(t,e,o))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var o=_t(),u=Gn(o);u.tag=1,u.payload=t,i!=null&&(u.callback=i),t=Yn(e,u,o),t!==null&&(Tt(t,e,o),is(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),o=Gn(i);o.tag=2,t!=null&&(o.callback=t),t=Yn(e,o,i),t!==null&&(Tt(t,e,i),is(t,e,i))}};function jm(e,t,i,o,u,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,y):t.prototype&&t.prototype.isPureReactComponent?!Zi(i,o)||!Zi(u,f):!0}function Nm(e,t,i,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,o),t.state!==e&&Tu.enqueueReplaceState(t,t.state,null)}function Ea(e,t){var i=t;if("ref"in t){i={};for(var o in t)o!=="ref"&&(i[o]=t[o])}if(e=e.defaultProps){i===t&&(i=x({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function Em(e){bl(e)}function Am(e){console.error(e)}function Rm(e){bl(e)}function Yl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Mm(e,t,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function wu(e,t,i){return i=Gn(i),i.tag=3,i.payload={element:null},i.callback=function(){Yl(e,t)},i}function Dm(e){return e=Gn(e),e.tag=3,e}function Om(e,t,i,o){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var f=o.value;e.payload=function(){return u(f)},e.callback=function(){Mm(t,i,o)}}var y=i.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Mm(t,i,o),typeof u!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})})}function T1(e,t,i,o,u){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=i.alternate,t!==null&&ei(t,i,u,!0),i=Rt.current,i!==null){switch(i.tag){case 31:case 13:return Gt===null?to():i.alternate===null&&Ge===0&&(Ge=3),i.flags&=-257,i.flags|=65536,i.lanes=u,o===Ml?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([o]):t.add(o),$u(e,o,u)),!1;case 22:return i.flags|=65536,o===Ml?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([o]):i.add(o)),$u(e,o,u)),!1}throw Error(l(435,i.tag))}return $u(e,o,u),to(),!1}if(we)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,o!==Gr&&(e=Error(l(422),{cause:o}),Wi(Ut(e,i)))):(o!==Gr&&(t=Error(l(423),{cause:o}),Wi(Ut(t,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,o=Ut(o,i),u=wu(e.stateNode,o,u),Wr(e,u),Ge!==4&&(Ge=2)),!1;var f=Error(l(520),{cause:o});if(f=Ut(f,i),xs===null?xs=[f]:xs.push(f),Ge!==4&&(Ge=2),t===null)return!0;o=Ut(o,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=wu(i.stateNode,o,e),Wr(i,e),!1;case 1:if(t=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Qn===null||!Qn.has(f))))return i.flags|=65536,u&=-u,i.lanes|=u,u=Dm(u),Om(u,e,i,o),Wr(i,u),!1}i=i.return}while(i!==null);return!1}var Cu=Error(l(461)),Ze=!1;function lt(e,t,i,o){t.child=e===null?zh(t,null,i,o):ja(t,e.child,i,o)}function _m(e,t,i,o,u){i=i.render;var f=t.ref;if("ref"in o){var y={};for(var b in o)b!=="ref"&&(y[b]=o[b])}else y=o;return Sa(t),o=su(e,t,i,y,f,u),b=lu(),e!==null&&!Ze?(ou(e,t,u),vn(e,t,u)):(we&&b&&Hr(t),t.flags|=1,lt(e,t,o,u),t.child)}function Lm(e,t,i,o,u){if(e===null){var f=i.type;return typeof f=="function"&&!Vr(f)&&f.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=f,km(e,t,f,o,u)):(e=Cl(i.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ou(e,u)){var y=f.memoizedProps;if(i=i.compare,i=i!==null?i:Zi,i(y,o)&&e.ref===t.ref)return vn(e,t,u)}return t.flags|=1,e=hn(f,o),e.ref=t.ref,e.return=t,t.child=e}function km(e,t,i,o,u){if(e!==null){var f=e.memoizedProps;if(Zi(f,o)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=o=f,Ou(e,u))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,vn(e,t,u)}return ju(e,t,i,o,u)}function zm(e,t,i,o){var u=o.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,e!==null){for(o=t.child=e.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;o=u&~f}else o=0,t.child=null;return Vm(e,t,f,i,o)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Al(t,f!==null?f.cachePool:null),f!==null?Bh(t,f):tu(),Hh(t);else return o=t.lanes=536870912,Vm(e,t,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(Al(t,f.cachePool),Bh(t,f),Kn(),t.memoizedState=null):(e!==null&&Al(t,null),tu(),Kn());return lt(e,t,u,i),t.child}function fs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vm(e,t,i,o,u){var f=Qr();return f=f===null?null:{parent:$e._currentValue,pool:f},t.memoizedState={baseLanes:i,cachePool:f},e!==null&&Al(t,null),tu(),Hh(t),e!==null&&ei(e,t,o,!0),t.childLanes=u,null}function Pl(e,t){return t=Xl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Um(e,t,i){return ja(t,e.child,null,i),e=Pl(t,t.pendingProps),e.flags|=2,Mt(t),t.memoizedState=null,e}function w1(e,t,i){var o=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(o.mode==="hidden")return e=Pl(t,o),t.lanes=536870912,fs(null,e);if(au(t),(e=ke)?(e=Zp(e,qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:tn,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},i=Sh(e),i.return=t,t.child=i,it=t,ke=null)):e=null,e===null)throw Bn(t);return t.lanes=536870912,null}return Pl(t,o)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(au(t),u)if(t.flags&256)t.flags&=-257,t=Um(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Ze||ei(e,t,i,!1),u=(i&e.childLanes)!==0,Ze||u){if(o=_e,o!==null&&(y=Ad(o,i),y!==0&&y!==f.retryLane))throw f.retryLane=y,ya(e,y),Tt(o,e,y),Cu;to(),t=Um(e,t,i)}else e=f.treeContext,ke=Yt(y.nextSibling),it=t,we=!0,Un=null,qt=!1,e!==null&&Ch(t,e),t=Pl(t,o),t.flags|=4096;return t}return e=hn(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Kl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function ju(e,t,i,o,u){return Sa(t),i=su(e,t,i,o,void 0,u),o=lu(),e!==null&&!Ze?(ou(e,t,u),vn(e,t,u)):(we&&o&&Hr(t),t.flags|=1,lt(e,t,i,u),t.child)}function Bm(e,t,i,o,u,f){return Sa(t),t.updateQueue=null,i=Gh(t,o,i,u),qh(e),o=lu(),e!==null&&!Ze?(ou(e,t,f),vn(e,t,f)):(we&&o&&Hr(t),t.flags|=1,lt(e,t,i,f),t.child)}function Hm(e,t,i,o,u){if(Sa(t),t.stateNode===null){var f=Za,y=i.contextType;typeof y=="object"&&y!==null&&(f=st(y)),f=new i(o,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Tu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=o,f.state=t.memoizedState,f.refs={},Jr(t),y=i.contextType,f.context=typeof y=="object"&&y!==null?st(y):Za,f.state=t.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(Su(t,i,y,o),f.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&Tu.enqueueReplaceState(f,f.state,null),ls(t,o,f,u),ss(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){f=t.stateNode;var b=t.memoizedProps,C=Ea(i,b);f.props=C;var z=f.context,G=i.contextType;y=Za,typeof G=="object"&&G!==null&&(y=st(G));var K=i.getDerivedStateFromProps;G=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,G||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b||z!==y)&&Nm(t,f,o,y),qn=!1;var V=t.memoizedState;f.state=V,ls(t,o,f,u),ss(),z=t.memoizedState,b||V!==z||qn?(typeof K=="function"&&(Su(t,i,K,o),z=t.memoizedState),(C=qn||jm(t,i,C,o,V,z,y))?(G||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=z),f.props=o,f.state=z,f.context=y,o=C):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{f=t.stateNode,Ir(e,t),y=t.memoizedProps,G=Ea(i,y),f.props=G,K=t.pendingProps,V=f.context,z=i.contextType,C=Za,typeof z=="object"&&z!==null&&(C=st(z)),b=i.getDerivedStateFromProps,(z=typeof b=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==K||V!==C)&&Nm(t,f,o,C),qn=!1,V=t.memoizedState,f.state=V,ls(t,o,f,u),ss();var B=t.memoizedState;y!==K||V!==B||qn||e!==null&&e.dependencies!==null&&Nl(e.dependencies)?(typeof b=="function"&&(Su(t,i,b,o),B=t.memoizedState),(G=qn||jm(t,i,G,o,V,B,C)||e!==null&&e.dependencies!==null&&Nl(e.dependencies))?(z||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,B,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,B,C)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=B),f.props=o,f.state=B,f.context=C,o=G):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),o=!1)}return f=o,Kl(e,t),o=(t.flags&128)!==0,f||o?(f=t.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&o?(t.child=ja(t,e.child,null,u),t.child=ja(t,null,i,u)):lt(e,t,i,u),t.memoizedState=f.state,e=t.child):e=vn(e,t,u),e}function qm(e,t,i,o){return va(),t.flags|=256,lt(e,t,i,o),t.child}var Nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Eu(e){return{baseLanes:e,cachePool:Mh()}}function Au(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ot),e}function Gm(e,t,i){var o=t.pendingProps,u=!1,f=(t.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(u?Pn(t):Kn(),(e=ke)?(e=Zp(e,qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:tn,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},i=Sh(e),i.return=t,t.child=i,it=t,ke=null)):e=null,e===null)throw Bn(t);return cc(e)?t.lanes=32:t.lanes=536870912,null}var b=o.children;return o=o.fallback,u?(Kn(),u=t.mode,b=Xl({mode:"hidden",children:b},u),o=xa(o,u,i,null),b.return=t,o.return=t,b.sibling=o,t.child=b,o=t.child,o.memoizedState=Eu(i),o.childLanes=Au(e,y,i),t.memoizedState=Nu,fs(null,o)):(Pn(t),Ru(t,b))}var C=e.memoizedState;if(C!==null&&(b=C.dehydrated,b!==null)){if(f)t.flags&256?(Pn(t),t.flags&=-257,t=Mu(e,t,i)):t.memoizedState!==null?(Kn(),t.child=e.child,t.flags|=128,t=null):(Kn(),b=o.fallback,u=t.mode,o=Xl({mode:"visible",children:o.children},u),b=xa(b,u,i,null),b.flags|=2,o.return=t,b.return=t,o.sibling=b,t.child=o,ja(t,e.child,null,i),o=t.child,o.memoizedState=Eu(i),o.childLanes=Au(e,y,i),t.memoizedState=Nu,t=fs(null,o));else if(Pn(t),cc(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var z=y.dgst;y=z,o=Error(l(419)),o.stack="",o.digest=y,Wi({value:o,source:null,stack:null}),t=Mu(e,t,i)}else if(Ze||ei(e,t,i,!1),y=(i&e.childLanes)!==0,Ze||y){if(y=_e,y!==null&&(o=Ad(y,i),o!==0&&o!==C.retryLane))throw C.retryLane=o,ya(e,o),Tt(y,e,o),Cu;uc(b)||to(),t=Mu(e,t,i)}else uc(b)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,ke=Yt(b.nextSibling),it=t,we=!0,Un=null,qt=!1,e!==null&&Ch(t,e),t=Ru(t,o.children),t.flags|=4096);return t}return u?(Kn(),b=o.fallback,u=t.mode,C=e.child,z=C.sibling,o=hn(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,z!==null?b=hn(z,b):(b=xa(b,u,i,null),b.flags|=2),b.return=t,o.return=t,o.sibling=b,t.child=o,fs(null,o),o=t.child,b=e.child.memoizedState,b===null?b=Eu(i):(u=b.cachePool,u!==null?(C=$e._currentValue,u=u.parent!==C?{parent:C,pool:C}:u):u=Mh(),b={baseLanes:b.baseLanes|i,cachePool:u}),o.memoizedState=b,o.childLanes=Au(e,y,i),t.memoizedState=Nu,fs(e.child,o)):(Pn(t),i=e.child,e=i.sibling,i=hn(i,{mode:"visible",children:o.children}),i.return=t,i.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=i,t.memoizedState=null,i)}function Ru(e,t){return t=Xl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xl(e,t){return e=At(22,e,null,t),e.lanes=0,e}function Mu(e,t,i){return ja(t,e.child,null,i),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ym(e,t,i){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Kr(e.return,t,i)}function Du(e,t,i,o,u,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:u,treeForkCount:f}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=i,y.tailMode=u,y.treeForkCount=f)}function Pm(e,t,i){var o=t.pendingProps,u=o.revealOrder,f=o.tail;o=o.children;var y=Xe.current,b=(y&2)!==0;if(b?(y=y&1|2,t.flags|=128):y&=1,I(Xe,y),lt(e,t,o,i),o=we?Ii:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ym(e,i,t);else if(e.tag===19)Ym(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(i=t.child,u=null;i!==null;)e=i.alternate,e!==null&&Ll(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),Du(t,!1,u,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Ll(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}Du(t,!0,i,null,f,o);break;case"together":Du(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function vn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),$n|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ei(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=hn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=hn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ou(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Nl(e)))}function C1(e,t,i){switch(t.tag){case 3:ft(t,t.stateNode.containerInfo),Hn(t,$e,e.memoizedState.cache),va();break;case 27:case 5:Vi(t);break;case 4:ft(t,t.stateNode.containerInfo);break;case 10:Hn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,au(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Pn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Gm(e,t,i):(Pn(t),e=vn(e,t,i),e!==null?e.sibling:null);Pn(t);break;case 19:var u=(e.flags&128)!==0;if(o=(i&t.childLanes)!==0,o||(ei(e,t,i,!1),o=(i&t.childLanes)!==0),u){if(o)return Pm(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),I(Xe,Xe.current),o)break;return null;case 22:return t.lanes=0,zm(e,t,i,t.pendingProps);case 24:Hn(t,$e,e.memoizedState.cache)}return vn(e,t,i)}function Km(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!Ou(e,i)&&(t.flags&128)===0)return Ze=!1,C1(e,t,i);Ze=(e.flags&131072)!==0}else Ze=!1,we&&(t.flags&1048576)!==0&&wh(t,Ii,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e=="function")Vr(e)?(o=Ea(e,o),t.tag=1,t=Hm(null,t,e,o,i)):(t.tag=0,t=ju(null,t,e,o,i));else{if(e!=null){var u=e.$$typeof;if(u===F){t.tag=11,t=_m(null,t,e,o,i);break e}else if(u===X){t.tag=14,t=Lm(null,t,e,o,i);break e}}throw t=le(e)||e,Error(l(306,t,""))}}return t;case 0:return ju(e,t,t.type,t.pendingProps,i);case 1:return o=t.type,u=Ea(o,t.pendingProps),Hm(e,t,o,u,i);case 3:e:{if(ft(t,t.stateNode.containerInfo),e===null)throw Error(l(387));o=t.pendingProps;var f=t.memoizedState;u=f.element,Ir(e,t),ls(t,o,null,i);var y=t.memoizedState;if(o=y.cache,Hn(t,$e,o),o!==f.cache&&Xr(t,[$e],i,!0),ss(),o=y.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=qm(e,t,o,i);break e}else if(o!==u){u=Ut(Error(l(424)),t),Wi(u),t=qm(e,t,o,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ke=Yt(e.firstChild),it=t,we=!0,Un=null,qt=!0,i=zh(t,null,o,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(va(),o===u){t=vn(e,t,i);break e}lt(e,t,o,i)}t=t.child}return t;case 26:return Kl(e,t),e===null?(i=ng(t.type,null,t.pendingProps,null))?t.memoizedState=i:we||(i=t.type,e=t.pendingProps,o=ro(xe.current).createElement(i),o[at]=t,o[gt]=e,ot(o,i,e),tt(o),t.stateNode=o):t.memoizedState=ng(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Vi(t),e===null&&we&&(o=t.stateNode=Wp(t.type,t.pendingProps,xe.current),it=t,qt=!0,u=ke,Wn(t.type)?(fc=u,ke=Yt(o.firstChild)):ke=u),lt(e,t,t.pendingProps.children,i),Kl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((u=o=ke)&&(o=eS(o,t.type,t.pendingProps,qt),o!==null?(t.stateNode=o,it=t,ke=Yt(o.firstChild),qt=!1,u=!0):u=!1),u||Bn(t)),Vi(t),u=t.type,f=t.pendingProps,y=e!==null?e.memoizedProps:null,o=f.children,lc(u,f)?o=null:y!==null&&lc(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=su(e,t,p1,null,null,i),Ns._currentValue=u),Kl(e,t),lt(e,t,o,i),t.child;case 6:return e===null&&we&&((e=i=ke)&&(i=tS(i,t.pendingProps,qt),i!==null?(t.stateNode=i,it=t,ke=null,e=!0):e=!1),e||Bn(t)),null;case 13:return Gm(e,t,i);case 4:return ft(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ja(t,null,o,i):lt(e,t,o,i),t.child;case 11:return _m(e,t,t.type,t.pendingProps,i);case 7:return lt(e,t,t.pendingProps,i),t.child;case 8:return lt(e,t,t.pendingProps.children,i),t.child;case 12:return lt(e,t,t.pendingProps.children,i),t.child;case 10:return o=t.pendingProps,Hn(t,t.type,o.value),lt(e,t,o.children,i),t.child;case 9:return u=t.type._context,o=t.pendingProps.children,Sa(t),u=st(u),o=o(u),t.flags|=1,lt(e,t,o,i),t.child;case 14:return Lm(e,t,t.type,t.pendingProps,i);case 15:return km(e,t,t.type,t.pendingProps,i);case 19:return Pm(e,t,i);case 31:return w1(e,t,i);case 22:return zm(e,t,i,t.pendingProps);case 24:return Sa(t),o=st($e),e===null?(u=Qr(),u===null&&(u=_e,f=Fr(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=i),u=f),t.memoizedState={parent:o,cache:u},Jr(t),Hn(t,$e,u)):((e.lanes&i)!==0&&(Ir(e,t),ls(t,null,null,i),ss()),u=e.memoizedState,f=t.memoizedState,u.parent!==o?(u={parent:o,cache:o},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Hn(t,$e,o)):(o=f.cache,Hn(t,$e,o),o!==u.cache&&Xr(t,[$e],i,!0))),lt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function bn(e){e.flags|=4}function _u(e,t,i,o,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(xp())e.flags|=8192;else throw Ca=Ml,Zr}else e.flags&=-16777217}function Xm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!og(t))if(xp())e.flags|=8192;else throw Ca=Ml,Zr}function Fl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jd():536870912,e.lanes|=t,di|=t)}function ds(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags&65011712,o|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=i,t}function j1(e,t,i){var o=t.pendingProps;switch(qr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return i=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),gn($e),Ke(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Wa(t)?bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Yr())),ze(t),null;case 26:var u=t.type,f=t.memoizedState;return e===null?(bn(t),f!==null?(ze(t),Xm(t,f)):(ze(t),_u(t,u,null,o,i))):f?f!==e.memoizedState?(bn(t),ze(t),Xm(t,f)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&bn(t),ze(t),_u(t,u,e,o,i)),null;case 27:if(il(t),i=xe.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&bn(t);else{if(!o){if(t.stateNode===null)throw Error(l(166));return ze(t),null}e=te.current,Wa(t)?jh(t):(e=Wp(u,o,i),t.stateNode=e,bn(t))}return ze(t),null;case 5:if(il(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&bn(t);else{if(!o){if(t.stateNode===null)throw Error(l(166));return ze(t),null}if(f=te.current,Wa(t))jh(t);else{var y=ro(xe.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?y.createElement(u,{is:o.is}):y.createElement(u)}}f[at]=t,f[gt]=o;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=f;e:switch(ot(f,u,o),u){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&bn(t)}}return ze(t),_u(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&bn(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(l(166));if(e=xe.current,Wa(t)){if(e=t.stateNode,i=t.memoizedProps,o=null,u=it,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}e[at]=t,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||Gp(e.nodeValue,i)),e||Bn(t,!0)}else e=ro(e).createTextNode(o),e[at]=t,t.stateNode=e}return ze(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(o=Wa(t),i!==null){if(e===null){if(!o)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[at]=t}else va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else i=Yr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Mt(t),t):(Mt(t),null);if((t.flags&128)!==0)throw Error(l(558))}return ze(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Wa(t),o!==null&&o.dehydrated!==null){if(e===null){if(!u)throw Error(l(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(l(317));u[at]=t}else va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),u=!1}else u=Yr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Mt(t),t):(Mt(t),null)}return Mt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=t.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==u&&(o.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Fl(t,t.updateQueue),ze(t),null);case 4:return Ke(),e===null&&tc(t.stateNode.containerInfo),ze(t),null;case 10:return gn(t.type),ze(t),null;case 19:if(Y(Xe),o=t.memoizedState,o===null)return ze(t),null;if(u=(t.flags&128)!==0,f=o.rendering,f===null)if(u)ds(o,!1);else{if(Ge!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ll(e),f!==null){for(t.flags|=128,ds(o,!1),e=f.updateQueue,t.updateQueue=e,Fl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)bh(i,e),i=i.sibling;return I(Xe,Xe.current&1|2),we&&mn(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Ct()>Il&&(t.flags|=128,u=!0,ds(o,!1),t.lanes=4194304)}else{if(!u)if(e=Ll(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Fl(t,e),ds(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!we)return ze(t),null}else 2*Ct()-o.renderingStartTime>Il&&i!==536870912&&(t.flags|=128,u=!0,ds(o,!1),t.lanes=4194304);o.isBackwards?(f.sibling=t.child,t.child=f):(e=o.last,e!==null?e.sibling=f:t.child=f,o.last=f)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,I(Xe,u?i&1|2:i&1),we&&mn(t,o.treeForkCount),e):(ze(t),null);case 22:case 23:return Mt(t),nu(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(i&536870912)!==0&&(t.flags&128)===0&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),i=t.updateQueue,i!==null&&Fl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==i&&(t.flags|=2048),e!==null&&Y(Ta),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),gn($e),ze(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function N1(e,t){switch(qr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gn($e),Ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return il(t),null;case 31:if(t.memoizedState!==null){if(Mt(t),t.alternate===null)throw Error(l(340));va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Xe),null;case 4:return Ke(),null;case 10:return gn(t.type),null;case 22:case 23:return Mt(t),nu(),e!==null&&Y(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gn($e),null;case 25:return null;default:return null}}function Fm(e,t){switch(qr(t),t.tag){case 3:gn($e),Ke();break;case 26:case 27:case 5:il(t);break;case 4:Ke();break;case 31:t.memoizedState!==null&&Mt(t);break;case 13:Mt(t);break;case 19:Y(Xe);break;case 10:gn(t.type);break;case 22:case 23:Mt(t),nu(),e!==null&&Y(Ta);break;case 24:gn($e)}}function hs(e,t){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var u=o.next;i=u;do{if((i.tag&e)===e){o=void 0;var f=i.create,y=i.inst;o=f(),y.destroy=o}i=i.next}while(i!==u)}}catch(b){Re(t,t.return,b)}}function Xn(e,t,i){try{var o=t.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var f=u.next;o=f;do{if((o.tag&e)===e){var y=o.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,u=t;var C=i,z=b;try{z()}catch(G){Re(u,C,G)}}}o=o.next}while(o!==f)}}catch(G){Re(t,t.return,G)}}function $m(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Uh(t,i)}catch(o){Re(e,e.return,o)}}}function Qm(e,t,i){i.props=Ea(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){Re(e,t,o)}}function ms(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(u){Re(e,t,u)}}function an(e,t){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(u){Re(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Re(e,t,u)}else i.current=null}function Zm(e){var t=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(u){Re(e,e.return,u)}}function Lu(e,t,i){try{var o=e.stateNode;$1(o,e.type,i,t),o[gt]=t}catch(u){Re(e,e.return,u)}}function Jm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wn(e.type)||e.tag===4}function ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Wn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zu(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=fn));else if(o!==4&&(o===27&&Wn(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(zu(e,t,i),e=e.sibling;e!==null;)zu(e,t,i),e=e.sibling}function $l(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(o!==4&&(o===27&&Wn(e.type)&&(i=e.stateNode),e=e.child,e!==null))for($l(e,t,i),e=e.sibling;e!==null;)$l(e,t,i),e=e.sibling}function Im(e){var t=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ot(t,o,i),t[at]=e,t[gt]=i}catch(f){Re(e,e.return,f)}}var Sn=!1,Je=!1,Vu=!1,Wm=typeof WeakSet=="function"?WeakSet:Set,nt=null;function E1(e,t){if(e=e.containerInfo,ic=go,e=fh(e),Mr(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var u=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,b=-1,C=-1,z=0,G=0,K=e,V=null;t:for(;;){for(var B;K!==i||u!==0&&K.nodeType!==3||(b=y+u),K!==f||o!==0&&K.nodeType!==3||(C=y+o),K.nodeType===3&&(y+=K.nodeValue.length),(B=K.firstChild)!==null;)V=K,K=B;for(;;){if(K===e)break t;if(V===i&&++z===u&&(b=y),V===f&&++G===o&&(C=y),(B=K.nextSibling)!==null)break;K=V,V=K.parentNode}K=B}i=b===-1||C===-1?null:{start:b,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(sc={focusedElem:e,selectionRange:i},go=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){switch(t=nt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)u=e[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,i=t,u=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var ne=Ea(i.type,u);e=o.getSnapshotBeforeUpdate(ne,f),o.__reactInternalSnapshotBeforeUpdate=e}catch(oe){Re(i,i.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)rc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}}function ep(e,t,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:wn(e,i),o&4&&hs(5,i);break;case 1:if(wn(e,i),o&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(y){Re(i,i.return,y)}else{var u=Ea(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Re(i,i.return,y)}}o&64&&$m(i),o&512&&ms(i,i.return);break;case 3:if(wn(e,i),o&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Uh(e,t)}catch(y){Re(i,i.return,y)}}break;case 27:t===null&&o&4&&Im(i);case 26:case 5:wn(e,i),t===null&&o&4&&Zm(i),o&512&&ms(i,i.return);break;case 12:wn(e,i);break;case 31:wn(e,i),o&4&&ap(e,i);break;case 13:wn(e,i),o&4&&ip(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=z1.bind(null,i),nS(e,i))));break;case 22:if(o=i.memoizedState!==null||Sn,!o){t=t!==null&&t.memoizedState!==null||Je,u=Sn;var f=Je;Sn=o,(Je=t)&&!f?Cn(e,i,(i.subtreeFlags&8772)!==0):wn(e,i),Sn=u,Je=f}break;case 30:break;default:wn(e,i)}}function tp(e){var t=e.alternate;t!==null&&(e.alternate=null,tp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&hr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ue=null,xt=!1;function Tn(e,t,i){for(i=i.child;i!==null;)np(e,t,i),i=i.sibling}function np(e,t,i){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(Ui,i)}catch{}switch(i.tag){case 26:Je||an(i,t),Tn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Je||an(i,t);var o=Ue,u=xt;Wn(i.type)&&(Ue=i.stateNode,xt=!1),Tn(e,t,i),ws(i.stateNode),Ue=o,xt=u;break;case 5:Je||an(i,t);case 6:if(o=Ue,u=xt,Ue=null,Tn(e,t,i),Ue=o,xt=u,Ue!==null)if(xt)try{(Ue.nodeType===9?Ue.body:Ue.nodeName==="HTML"?Ue.ownerDocument.body:Ue).removeChild(i.stateNode)}catch(f){Re(i,t,f)}else try{Ue.removeChild(i.stateNode)}catch(f){Re(i,t,f)}break;case 18:Ue!==null&&(xt?(e=Ue,$p(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),bi(e)):$p(Ue,i.stateNode));break;case 4:o=Ue,u=xt,Ue=i.stateNode.containerInfo,xt=!0,Tn(e,t,i),Ue=o,xt=u;break;case 0:case 11:case 14:case 15:Xn(2,i,t),Je||Xn(4,i,t),Tn(e,t,i);break;case 1:Je||(an(i,t),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Qm(i,t,o)),Tn(e,t,i);break;case 21:Tn(e,t,i);break;case 22:Je=(o=Je)||i.memoizedState!==null,Tn(e,t,i),Je=o;break;default:Tn(e,t,i)}}function ap(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bi(e)}catch(i){Re(t,t.return,i)}}}function ip(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bi(e)}catch(i){Re(t,t.return,i)}}function A1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wm),t;default:throw Error(l(435,e.tag))}}function Ql(e,t){var i=A1(e);t.forEach(function(o){if(!i.has(o)){i.add(o);var u=V1.bind(null,e,o);o.then(u,u)}})}function vt(e,t){var i=t.deletions;if(i!==null)for(var o=0;o<i.length;o++){var u=i[o],f=e,y=t,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(Wn(b.type)){Ue=b.stateNode,xt=!1;break e}break;case 5:Ue=b.stateNode,xt=!1;break e;case 3:case 4:Ue=b.stateNode.containerInfo,xt=!0;break e}b=b.return}if(Ue===null)throw Error(l(160));np(f,y,u),Ue=null,xt=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sp(t,e),t=t.sibling}var Zt=null;function sp(e,t){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vt(t,e),bt(e),o&4&&(Xn(3,e,e.return),hs(3,e),Xn(5,e,e.return));break;case 1:vt(t,e),bt(e),o&512&&(Je||i===null||an(i,i.return)),o&64&&Sn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var u=Zt;if(vt(t,e),bt(e),o&512&&(Je||i===null||an(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(o){case"title":f=u.getElementsByTagName("title")[0],(!f||f[qi]||f[at]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(o),u.head.insertBefore(f,u.querySelector("head > title"))),ot(f,o,i),f[at]=e,tt(f),o=f;break e;case"link":var y=sg("link","href",u).get(o+(i.href||""));if(y){for(var b=0;b<y.length;b++)if(f=y[b],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){y.splice(b,1);break t}}f=u.createElement(o),ot(f,o,i),u.head.appendChild(f);break;case"meta":if(y=sg("meta","content",u).get(o+(i.content||""))){for(b=0;b<y.length;b++)if(f=y[b],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){y.splice(b,1);break t}}f=u.createElement(o),ot(f,o,i),u.head.appendChild(f);break;default:throw Error(l(468,o))}f[at]=e,tt(f),o=f}e.stateNode=o}else lg(u,e.type,e.stateNode);else e.stateNode=ig(u,o,e.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?lg(u,e.type,e.stateNode):ig(u,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Lu(e,e.memoizedProps,i.memoizedProps)}break;case 27:vt(t,e),bt(e),o&512&&(Je||i===null||an(i,i.return)),i!==null&&o&4&&Lu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(vt(t,e),bt(e),o&512&&(Je||i===null||an(i,i.return)),e.flags&32){u=e.stateNode;try{Ya(u,"")}catch(ne){Re(e,e.return,ne)}}o&4&&e.stateNode!=null&&(u=e.memoizedProps,Lu(e,u,i!==null?i.memoizedProps:u)),o&1024&&(Vu=!0);break;case 6:if(vt(t,e),bt(e),o&4){if(e.stateNode===null)throw Error(l(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(ne){Re(e,e.return,ne)}}break;case 3:if(fo=null,u=Zt,Zt=uo(t.containerInfo),vt(t,e),Zt=u,bt(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{bi(t.containerInfo)}catch(ne){Re(e,e.return,ne)}Vu&&(Vu=!1,lp(e));break;case 4:o=Zt,Zt=uo(e.stateNode.containerInfo),vt(t,e),bt(e),Zt=o;break;case 12:vt(t,e),bt(e);break;case 31:vt(t,e),bt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ql(e,o)));break;case 13:vt(t,e),bt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Jl=Ct()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ql(e,o)));break;case 22:u=e.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,z=Sn,G=Je;if(Sn=z||u,Je=G||C,vt(t,e),Je=G,Sn=z,bt(e),o&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(i===null||C||Sn||Je||Aa(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){C=i=t;try{if(f=C.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=C.stateNode;var K=C.memoizedProps.style,V=K!=null&&K.hasOwnProperty("display")?K.display:null;b.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(ne){Re(C,C.return,ne)}}}else if(t.tag===6){if(i===null){C=t;try{C.stateNode.nodeValue=u?"":C.memoizedProps}catch(ne){Re(C,C.return,ne)}}}else if(t.tag===18){if(i===null){C=t;try{var B=C.stateNode;u?Qp(B,!0):Qp(C.stateNode,!1)}catch(ne){Re(C,C.return,ne)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,Ql(e,i))));break;case 19:vt(t,e),bt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ql(e,o)));break;case 30:break;case 21:break;default:vt(t,e),bt(e)}}function bt(e){var t=e.flags;if(t&2){try{for(var i,o=e.return;o!==null;){if(Jm(o)){i=o;break}o=o.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var u=i.stateNode,f=ku(e);$l(e,f,u);break;case 5:var y=i.stateNode;i.flags&32&&(Ya(y,""),i.flags&=-33);var b=ku(e);$l(e,b,y);break;case 3:case 4:var C=i.stateNode.containerInfo,z=ku(e);zu(e,z,C);break;default:throw Error(l(161))}}catch(G){Re(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;lp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ep(e,t.alternate,t),t=t.sibling}function Aa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Xn(4,t,t.return),Aa(t);break;case 1:an(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Qm(t,t.return,i),Aa(t);break;case 27:ws(t.stateNode);case 26:case 5:an(t,t.return),Aa(t);break;case 22:t.memoizedState===null&&Aa(t);break;case 30:Aa(t);break;default:Aa(t)}e=e.sibling}}function Cn(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,u=e,f=t,y=f.flags;switch(f.tag){case 0:case 11:case 15:Cn(u,f,i),hs(4,f);break;case 1:if(Cn(u,f,i),o=f,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(z){Re(o,o.return,z)}if(o=f,u=o.updateQueue,u!==null){var b=o.stateNode;try{var C=u.shared.hiddenCallbacks;if(C!==null)for(u.shared.hiddenCallbacks=null,u=0;u<C.length;u++)Vh(C[u],b)}catch(z){Re(o,o.return,z)}}i&&y&64&&$m(f),ms(f,f.return);break;case 27:Im(f);case 26:case 5:Cn(u,f,i),i&&o===null&&y&4&&Zm(f),ms(f,f.return);break;case 12:Cn(u,f,i);break;case 31:Cn(u,f,i),i&&y&4&&ap(u,f);break;case 13:Cn(u,f,i),i&&y&4&&ip(u,f);break;case 22:f.memoizedState===null&&Cn(u,f,i),ms(f,f.return);break;case 30:break;default:Cn(u,f,i)}t=t.sibling}}function Uu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&es(i))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&es(e))}function Jt(e,t,i,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)op(e,t,i,o),t=t.sibling}function op(e,t,i,o){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,i,o),u&2048&&hs(9,t);break;case 1:Jt(e,t,i,o);break;case 3:Jt(e,t,i,o),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&es(e)));break;case 12:if(u&2048){Jt(e,t,i,o),e=t.stateNode;try{var f=t.memoizedProps,y=f.id,b=f.onPostCommit;typeof b=="function"&&b(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Re(t,t.return,C)}}else Jt(e,t,i,o);break;case 31:Jt(e,t,i,o);break;case 13:Jt(e,t,i,o);break;case 23:break;case 22:f=t.stateNode,y=t.alternate,t.memoizedState!==null?f._visibility&2?Jt(e,t,i,o):ps(e,t):f._visibility&2?Jt(e,t,i,o):(f._visibility|=2,ui(e,t,i,o,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Uu(y,t);break;case 24:Jt(e,t,i,o),u&2048&&Bu(t.alternate,t);break;default:Jt(e,t,i,o)}}function ui(e,t,i,o,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,y=t,b=i,C=o,z=y.flags;switch(y.tag){case 0:case 11:case 15:ui(f,y,b,C,u),hs(8,y);break;case 23:break;case 22:var G=y.stateNode;y.memoizedState!==null?G._visibility&2?ui(f,y,b,C,u):ps(f,y):(G._visibility|=2,ui(f,y,b,C,u)),u&&z&2048&&Uu(y.alternate,y);break;case 24:ui(f,y,b,C,u),u&&z&2048&&Bu(y.alternate,y);break;default:ui(f,y,b,C,u)}t=t.sibling}}function ps(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,o=t,u=o.flags;switch(o.tag){case 22:ps(i,o),u&2048&&Uu(o.alternate,o);break;case 24:ps(i,o),u&2048&&Bu(o.alternate,o);break;default:ps(i,o)}t=t.sibling}}var gs=8192;function ci(e,t,i){if(e.subtreeFlags&gs)for(e=e.child;e!==null;)rp(e,t,i),e=e.sibling}function rp(e,t,i){switch(e.tag){case 26:ci(e,t,i),e.flags&gs&&e.memoizedState!==null&&mS(i,Zt,e.memoizedState,e.memoizedProps);break;case 5:ci(e,t,i);break;case 3:case 4:var o=Zt;Zt=uo(e.stateNode.containerInfo),ci(e,t,i),Zt=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=gs,gs=16777216,ci(e,t,i),gs=o):ci(e,t,i));break;default:ci(e,t,i)}}function up(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ys(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var o=t[i];nt=o,fp(o,e)}up(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cp(e),e=e.sibling}function cp(e){switch(e.tag){case 0:case 11:case 15:ys(e),e.flags&2048&&Xn(9,e,e.return);break;case 3:ys(e);break;case 12:ys(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zl(e)):ys(e);break;default:ys(e)}}function Zl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var o=t[i];nt=o,fp(o,e)}up(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xn(8,t,t.return),Zl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Zl(t));break;default:Zl(t)}e=e.sibling}}function fp(e,t){for(;nt!==null;){var i=nt;switch(i.tag){case 0:case 11:case 15:Xn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:es(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,nt=o;else e:for(i=e;nt!==null;){o=nt;var u=o.sibling,f=o.return;if(tp(o),o===i){nt=null;break e}if(u!==null){u.return=f,nt=u;break e}nt=f}}}var R1={getCacheForType:function(e){var t=st($e),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return st($e).controller.signal}},M1=typeof WeakMap=="function"?WeakMap:Map,Ne=0,_e=null,ve=null,Se=0,Ae=0,Dt=null,Fn=!1,fi=!1,Hu=!1,jn=0,Ge=0,$n=0,Ra=0,qu=0,Ot=0,di=0,xs=null,St=null,Gu=!1,Jl=0,dp=0,Il=1/0,Wl=null,Qn=null,We=0,Zn=null,hi=null,Nn=0,Yu=0,Pu=null,hp=null,vs=0,Ku=null;function _t(){return(Ne&2)!==0&&Se!==0?Se&-Se:O.T!==null?Ju():Rd()}function mp(){if(Ot===0)if((Se&536870912)===0||we){var e=ol;ol<<=1,(ol&3932160)===0&&(ol=262144),Ot=e}else Ot=536870912;return e=Rt.current,e!==null&&(e.flags|=32),Ot}function Tt(e,t,i){(e===_e&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(mi(e,0),Jn(e,Se,Ot,!1)),Hi(e,i),((Ne&2)===0||e!==_e)&&(e===_e&&((Ne&2)===0&&(Ra|=i),Ge===4&&Jn(e,Se,Ot,!1)),sn(e))}function pp(e,t,i){if((Ne&6)!==0)throw Error(l(327));var o=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Bi(e,t),u=o?_1(e,t):Fu(e,t,!0),f=o;do{if(u===0){fi&&!o&&Jn(e,t,0,!1);break}else{if(i=e.current.alternate,f&&!D1(i)){u=Fu(e,t,!1),f=!1;continue}if(u===2){if(f=t,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var b=e;u=xs;var C=b.current.memoizedState.isDehydrated;if(C&&(mi(b,y).flags|=256),y=Fu(b,y,!1),y!==2){if(Hu&&!C){b.errorRecoveryDisabledLanes|=f,Ra|=f,u=4;break e}f=St,St=u,f!==null&&(St===null?St=f:St.push.apply(St,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){mi(e,0),Jn(e,t,0,!0);break}e:{switch(o=e,f=u,f){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:Jn(o,t,Ot,!Fn);break e;case 2:St=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(u=Jl+300-Ct(),10<u)){if(Jn(o,t,Ot,!Fn),ul(o,0,!0)!==0)break e;Nn=t,o.timeoutHandle=Xp(gp.bind(null,o,i,St,Wl,Gu,t,Ot,Ra,di,Fn,f,"Throttled",-0,0),u);break e}gp(o,i,St,Wl,Gu,t,Ot,Ra,di,Fn,f,null,-0,0)}}break}while(!0);sn(e)}function gp(e,t,i,o,u,f,y,b,C,z,G,K,V,B){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fn},rp(t,f,K);var ne=(f&62914560)===f?Jl-Ct():(f&4194048)===f?dp-Ct():0;if(ne=pS(K,ne),ne!==null){Nn=f,e.cancelPendingCommit=ne(Cp.bind(null,e,t,f,i,o,u,y,b,C,G,K,null,V,B)),Jn(e,f,y,!z);return}}Cp(e,t,f,i,o,u,y,b,C)}function D1(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var u=i[o],f=u.getSnapshot;u=u.value;try{if(!Et(f(),u))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jn(e,t,i,o){t&=~qu,t&=~Ra,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var u=t;0<u;){var f=31-Nt(u),y=1<<f;o[f]=-1,u&=~y}i!==0&&Nd(e,i,t)}function eo(){return(Ne&6)===0?(bs(0),!1):!0}function Xu(){if(ve!==null){if(Ae===0)var e=ve.return;else e=ve,pn=ba=null,ru(e),ii=null,ns=0,e=ve;for(;e!==null;)Fm(e.alternate,e),e=e.return;ve=null}}function mi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,J1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Nn=0,Xu(),_e=e,ve=i=hn(e.current,null),Se=t,Ae=0,Dt=null,Fn=!1,fi=Bi(e,t),Hu=!1,di=Ot=qu=Ra=$n=Ge=0,St=xs=null,Gu=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var u=31-Nt(o),f=1<<u;t|=e[u],o&=~f}return jn=t,Sl(),i}function yp(e,t){pe=null,O.H=cs,t===ai||t===Rl?(t=_h(),Ae=3):t===Zr?(t=_h(),Ae=4):Ae=t===Cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Dt=t,ve===null&&(Ge=1,Yl(e,Ut(t,e.current)))}function xp(){var e=Rt.current;return e===null?!0:(Se&4194048)===Se?Gt===null:(Se&62914560)===Se||(Se&536870912)!==0?e===Gt:!1}function vp(){var e=O.H;return O.H=cs,e===null?cs:e}function bp(){var e=O.A;return O.A=R1,e}function to(){Ge=4,Fn||(Se&4194048)!==Se&&Rt.current!==null||(fi=!0),($n&134217727)===0&&(Ra&134217727)===0||_e===null||Jn(_e,Se,Ot,!1)}function Fu(e,t,i){var o=Ne;Ne|=2;var u=vp(),f=bp();(_e!==e||Se!==t)&&(Wl=null,mi(e,t)),t=!1;var y=Ge;e:do try{if(Ae!==0&&ve!==null){var b=ve,C=Dt;switch(Ae){case 8:Xu(),y=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var z=Ae;if(Ae=0,Dt=null,pi(e,b,C,z),i&&fi){y=0;break e}break;default:z=Ae,Ae=0,Dt=null,pi(e,b,C,z)}}O1(),y=Ge;break}catch(G){yp(e,G)}while(!0);return t&&e.shellSuspendCounter++,pn=ba=null,Ne=o,O.H=u,O.A=f,ve===null&&(_e=null,Se=0,Sl()),y}function O1(){for(;ve!==null;)Sp(ve)}function _1(e,t){var i=Ne;Ne|=2;var o=vp(),u=bp();_e!==e||Se!==t?(Wl=null,Il=Ct()+500,mi(e,t)):fi=Bi(e,t);e:do try{if(Ae!==0&&ve!==null){t=ve;var f=Dt;t:switch(Ae){case 1:Ae=0,Dt=null,pi(e,t,f,1);break;case 2:case 9:if(Dh(f)){Ae=0,Dt=null,Tp(t);break}t=function(){Ae!==2&&Ae!==9||_e!==e||(Ae=7),sn(e)},f.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:Dh(f)?(Ae=0,Dt=null,Tp(t)):(Ae=0,Dt=null,pi(e,t,f,7));break;case 5:var y=null;switch(ve.tag){case 26:y=ve.memoizedState;case 5:case 27:var b=ve;if(y?og(y):b.stateNode.complete){Ae=0,Dt=null;var C=b.sibling;if(C!==null)ve=C;else{var z=b.return;z!==null?(ve=z,no(z)):ve=null}break t}}Ae=0,Dt=null,pi(e,t,f,5);break;case 6:Ae=0,Dt=null,pi(e,t,f,6);break;case 8:Xu(),Ge=6;break e;default:throw Error(l(462))}}L1();break}catch(G){yp(e,G)}while(!0);return pn=ba=null,O.H=o,O.A=u,Ne=i,ve!==null?0:(_e=null,Se=0,Sl(),Ge)}function L1(){for(;ve!==null&&!ab();)Sp(ve)}function Sp(e){var t=Km(e.alternate,e,jn);e.memoizedProps=e.pendingProps,t===null?no(e):ve=t}function Tp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Bm(i,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=Bm(i,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:ru(t);default:Fm(i,t),t=ve=bh(t,jn),t=Km(i,t,jn)}e.memoizedProps=e.pendingProps,t===null?no(e):ve=t}function pi(e,t,i,o){pn=ba=null,ru(t),ii=null,ns=0;var u=t.return;try{if(T1(e,u,t,i,Se)){Ge=1,Yl(e,Ut(i,e.current)),ve=null;return}}catch(f){if(u!==null)throw ve=u,f;Ge=1,Yl(e,Ut(i,e.current)),ve=null;return}t.flags&32768?(we||o===1?e=!0:fi||(Se&536870912)!==0?e=!1:(Fn=e=!0,(o===2||o===9||o===3||o===6)&&(o=Rt.current,o!==null&&o.tag===13&&(o.flags|=16384))),wp(t,e)):no(t)}function no(e){var t=e;do{if((t.flags&32768)!==0){wp(t,Fn);return}e=t.return;var i=j1(t.alternate,t,jn);if(i!==null){ve=i;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Ge===0&&(Ge=5)}function wp(e,t){do{var i=N1(e.alternate,e);if(i!==null){i.flags&=32767,ve=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=i}while(e!==null);Ge=6,ve=null}function Cp(e,t,i,o,u,f,y,b,C){e.cancelPendingCommit=null;do ao();while(We!==0);if((Ne&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(f=t.lanes|t.childLanes,f|=kr,hb(e,i,f,y,b,C),e===_e&&(ve=_e=null,Se=0),hi=t,Zn=e,Nn=i,Yu=f,Pu=u,hp=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,U1(sl,function(){return Rp(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=O.T,O.T=null,u=U.p,U.p=2,y=Ne,Ne|=4;try{E1(e,t,i)}finally{Ne=y,U.p=u,O.T=o}}We=1,jp(),Np(),Ep()}}function jp(){if(We===1){We=0;var e=Zn,t=hi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=O.T,O.T=null;var o=U.p;U.p=2;var u=Ne;Ne|=4;try{sp(t,e);var f=sc,y=fh(e.containerInfo),b=f.focusedElem,C=f.selectionRange;if(y!==b&&b&&b.ownerDocument&&ch(b.ownerDocument.documentElement,b)){if(C!==null&&Mr(b)){var z=C.start,G=C.end;if(G===void 0&&(G=z),"selectionStart"in b)b.selectionStart=z,b.selectionEnd=Math.min(G,b.value.length);else{var K=b.ownerDocument||document,V=K&&K.defaultView||window;if(V.getSelection){var B=V.getSelection(),ne=b.textContent.length,oe=Math.min(C.start,ne),Oe=C.end===void 0?oe:Math.min(C.end,ne);!B.extend&&oe>Oe&&(y=Oe,Oe=oe,oe=y);var M=uh(b,oe),E=uh(b,Oe);if(M&&E&&(B.rangeCount!==1||B.anchorNode!==M.node||B.anchorOffset!==M.offset||B.focusNode!==E.node||B.focusOffset!==E.offset)){var k=K.createRange();k.setStart(M.node,M.offset),B.removeAllRanges(),oe>Oe?(B.addRange(k),B.extend(E.node,E.offset)):(k.setEnd(E.node,E.offset),B.addRange(k))}}}}for(K=[],B=b;B=B.parentNode;)B.nodeType===1&&K.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<K.length;b++){var P=K[b];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}go=!!ic,sc=ic=null}finally{Ne=u,U.p=o,O.T=i}}e.current=t,We=2}}function Np(){if(We===2){We=0;var e=Zn,t=hi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=O.T,O.T=null;var o=U.p;U.p=2;var u=Ne;Ne|=4;try{ep(e,t.alternate,t)}finally{Ne=u,U.p=o,O.T=i}}We=3}}function Ep(){if(We===4||We===3){We=0,ib();var e=Zn,t=hi,i=Nn,o=hp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?We=5:(We=0,hi=Zn=null,Ap(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Qn=null),fr(i),t=t.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(Ui,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=O.T,u=U.p,U.p=2,O.T=null;try{for(var f=e.onRecoverableError,y=0;y<o.length;y++){var b=o[y];f(b.value,{componentStack:b.stack})}}finally{O.T=t,U.p=u}}(Nn&3)!==0&&ao(),sn(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===Ku?vs++:(vs=0,Ku=e):vs=0,bs(0)}}function Ap(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,es(t)))}function ao(){return jp(),Np(),Ep(),Rp()}function Rp(){if(We!==5)return!1;var e=Zn,t=Yu;Yu=0;var i=fr(Nn),o=O.T,u=U.p;try{U.p=32>i?32:i,O.T=null,i=Pu,Pu=null;var f=Zn,y=Nn;if(We=0,hi=Zn=null,Nn=0,(Ne&6)!==0)throw Error(l(331));var b=Ne;if(Ne|=4,cp(f.current),op(f,f.current,y,i),Ne=b,bs(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(Ui,f)}catch{}return!0}finally{U.p=u,O.T=o,Ap(e,t)}}function Mp(e,t,i){t=Ut(i,t),t=wu(e.stateNode,t,2),e=Yn(e,t,2),e!==null&&(Hi(e,2),sn(e))}function Re(e,t,i){if(e.tag===3)Mp(e,e,i);else for(;t!==null;){if(t.tag===3){Mp(t,e,i);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Qn===null||!Qn.has(o))){e=Ut(i,e),i=Dm(2),o=Yn(t,i,2),o!==null&&(Om(i,o,t,e),Hi(o,2),sn(o));break}}t=t.return}}function $u(e,t,i){var o=e.pingCache;if(o===null){o=e.pingCache=new M1;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(i)||(Hu=!0,u.add(i),e=k1.bind(null,e,t,i),t.then(e,e))}function k1(e,t,i){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,_e===e&&(Se&i)===i&&(Ge===4||Ge===3&&(Se&62914560)===Se&&300>Ct()-Jl?(Ne&2)===0&&mi(e,0):qu|=i,di===Se&&(di=0)),sn(e)}function Dp(e,t){t===0&&(t=jd()),e=ya(e,t),e!==null&&(Hi(e,t),sn(e))}function z1(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Dp(e,i)}function V1(e,t){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(t),Dp(e,i)}function U1(e,t){return or(e,t)}var io=null,gi=null,Qu=!1,so=!1,Zu=!1,In=0;function sn(e){e!==gi&&e.next===null&&(gi===null?io=gi=e:gi=gi.next=e),so=!0,Qu||(Qu=!0,H1())}function bs(e,t){if(!Zu&&so){Zu=!0;do for(var i=!1,o=io;o!==null;){if(e!==0){var u=o.pendingLanes;if(u===0)var f=0;else{var y=o.suspendedLanes,b=o.pingedLanes;f=(1<<31-Nt(42|e)+1)-1,f&=u&~(y&~b),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,kp(o,f))}else f=Se,f=ul(o,o===_e?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Bi(o,f)||(i=!0,kp(o,f));o=o.next}while(i);Zu=!1}}function B1(){Op()}function Op(){so=Qu=!1;var e=0;In!==0&&Z1()&&(e=In);for(var t=Ct(),i=null,o=io;o!==null;){var u=o.next,f=_p(o,t);f===0?(o.next=null,i===null?io=u:i.next=u,u===null&&(gi=i)):(i=o,(e!==0||(f&3)!==0)&&(so=!0)),o=u}We!==0&&We!==5||bs(e),In!==0&&(In=0)}function _p(e,t){for(var i=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Nt(f),b=1<<y,C=u[y];C===-1?((b&i)===0||(b&o)!==0)&&(u[y]=db(b,t)):C<=t&&(e.expiredLanes|=b),f&=~b}if(t=_e,i=Se,i=ul(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&rr(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Bi(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(o!==null&&rr(o),fr(i)){case 2:case 8:i=wd;break;case 32:i=sl;break;case 268435456:i=Cd;break;default:i=sl}return o=Lp.bind(null,e),i=or(i,o),e.callbackPriority=t,e.callbackNode=i,t}return o!==null&&o!==null&&rr(o),e.callbackPriority=2,e.callbackNode=null,2}function Lp(e,t){if(We!==0&&We!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ao()&&e.callbackNode!==i)return null;var o=Se;return o=ul(e,e===_e?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(pp(e,o,t),_p(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?Lp.bind(null,e):null)}function kp(e,t){if(ao())return null;pp(e,t,!0)}function H1(){I1(function(){(Ne&6)!==0?or(Td,B1):Op()})}function Ju(){if(In===0){var e=ti;e===0&&(e=ll,ll<<=1,(ll&261888)===0&&(ll=256)),In=e}return In}function zp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:hl(""+e)}function Vp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function q1(e,t,i,o,u){if(t==="submit"&&i&&i.stateNode===u){var f=zp((u[gt]||null).action),y=o.submitter;y&&(t=(t=y[gt]||null)?zp(t.formAction):y.getAttribute("formAction"),t!==null&&(f=t,y=null));var b=new yl("action","action",null,o,u);e.push({event:b,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(In!==0){var C=y?Vp(u,y):new FormData(u);yu(i,{pending:!0,data:C,method:u.method,action:f},null,C)}}else typeof f=="function"&&(b.preventDefault(),C=y?Vp(u,y):new FormData(u),yu(i,{pending:!0,data:C,method:u.method,action:f},f,C))},currentTarget:u}]})}}for(var Iu=0;Iu<Lr.length;Iu++){var Wu=Lr[Iu],G1=Wu.toLowerCase(),Y1=Wu[0].toUpperCase()+Wu.slice(1);Qt(G1,"on"+Y1)}Qt(mh,"onAnimationEnd"),Qt(ph,"onAnimationIteration"),Qt(gh,"onAnimationStart"),Qt("dblclick","onDoubleClick"),Qt("focusin","onFocus"),Qt("focusout","onBlur"),Qt(s1,"onTransitionRun"),Qt(l1,"onTransitionStart"),Qt(o1,"onTransitionCancel"),Qt(yh,"onTransitionEnd"),qa("onMouseEnter",["mouseout","mouseover"]),qa("onMouseLeave",["mouseout","mouseover"]),qa("onPointerEnter",["pointerout","pointerover"]),qa("onPointerLeave",["pointerout","pointerover"]),ha("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ha("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ha("onBeforeInput",["compositionend","keypress","textInput","paste"]),ha("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ha("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ha("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ss="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(" "),P1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ss));function Up(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],u=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var y=o.length-1;0<=y;y--){var b=o[y],C=b.instance,z=b.currentTarget;if(b=b.listener,C!==f&&u.isPropagationStopped())break e;f=b,u.currentTarget=z;try{f(u)}catch(G){bl(G)}u.currentTarget=null,f=C}else for(y=0;y<o.length;y++){if(b=o[y],C=b.instance,z=b.currentTarget,b=b.listener,C!==f&&u.isPropagationStopped())break e;f=b,u.currentTarget=z;try{f(u)}catch(G){bl(G)}u.currentTarget=null,f=C}}}}function be(e,t){var i=t[dr];i===void 0&&(i=t[dr]=new Set);var o=e+"__bubble";i.has(o)||(Bp(t,e,2,!1),i.add(o))}function ec(e,t,i){var o=0;t&&(o|=4),Bp(i,e,o,t)}var lo="_reactListening"+Math.random().toString(36).slice(2);function tc(e){if(!e[lo]){e[lo]=!0,Od.forEach(function(i){i!=="selectionchange"&&(P1.has(i)||ec(i,!1,e),ec(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lo]||(t[lo]=!0,ec("selectionchange",!1,t))}}function Bp(e,t,i,o){switch(mg(t)){case 2:var u=xS;break;case 8:u=vS;break;default:u=gc}i=u.bind(null,t,i,e),u=void 0,!Sr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,i,{capture:!0,passive:u}):e.addEventListener(t,i,!0):u!==void 0?e.addEventListener(t,i,{passive:u}):e.addEventListener(t,i,!1)}function nc(e,t,i,o,u){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var b=o.stateNode.containerInfo;if(b===u)break;if(y===4)for(y=o.return;y!==null;){var C=y.tag;if((C===3||C===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;b!==null;){if(y=Ua(b),y===null)return;if(C=y.tag,C===5||C===6||C===26||C===27){o=f=y;continue e}b=b.parentNode}}o=o.return}Pd(function(){var z=f,G=vr(i),K=[];e:{var V=xh.get(e);if(V!==void 0){var B=yl,ne=e;switch(e){case"keypress":if(pl(i)===0)break e;case"keydown":case"keyup":B=Vb;break;case"focusin":ne="focus",B=jr;break;case"focusout":ne="blur",B=jr;break;case"beforeblur":case"afterblur":B=jr;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=jb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Hb;break;case mh:case ph:case gh:B=Ab;break;case yh:B=Gb;break;case"scroll":case"scrollend":B=wb;break;case"wheel":B=Pb;break;case"copy":case"cut":case"paste":B=Mb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Qd;break;case"toggle":case"beforetoggle":B=Xb}var oe=(t&4)!==0,Oe=!oe&&(e==="scroll"||e==="scrollend"),M=oe?V!==null?V+"Capture":null:V;oe=[];for(var E=z,k;E!==null;){var P=E;if(k=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||k===null||M===null||(P=Yi(E,M),P!=null&&oe.push(Ts(E,P,k))),Oe)break;E=E.return}0<oe.length&&(V=new B(V,ne,null,i,G),K.push({event:V,listeners:oe}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",V&&i!==xr&&(ne=i.relatedTarget||i.fromElement)&&(Ua(ne)||ne[Va]))break e;if((B||V)&&(V=G.window===G?G:(V=G.ownerDocument)?V.defaultView||V.parentWindow:window,B?(ne=i.relatedTarget||i.toElement,B=z,ne=ne?Ua(ne):null,ne!==null&&(Oe=c(ne),oe=ne.tag,ne!==Oe||oe!==5&&oe!==27&&oe!==6)&&(ne=null)):(B=null,ne=z),B!==ne)){if(oe=Fd,P="onMouseLeave",M="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Qd,P="onPointerLeave",M="onPointerEnter",E="pointer"),Oe=B==null?V:Gi(B),k=ne==null?V:Gi(ne),V=new oe(P,E+"leave",B,i,G),V.target=Oe,V.relatedTarget=k,P=null,Ua(G)===z&&(oe=new oe(M,E+"enter",ne,i,G),oe.target=k,oe.relatedTarget=Oe,P=oe),Oe=P,B&&ne)t:{for(oe=K1,M=B,E=ne,k=0,P=M;P;P=oe(P))k++;P=0;for(var se=E;se;se=oe(se))P++;for(;0<k-P;)M=oe(M),k--;for(;0<P-k;)E=oe(E),P--;for(;k--;){if(M===E||E!==null&&M===E.alternate){oe=M;break t}M=oe(M),E=oe(E)}oe=null}else oe=null;B!==null&&Hp(K,V,B,oe,!1),ne!==null&&Oe!==null&&Hp(K,Oe,ne,oe,!0)}}e:{if(V=z?Gi(z):window,B=V.nodeName&&V.nodeName.toLowerCase(),B==="select"||B==="input"&&V.type==="file")var Ce=ah;else if(th(V))if(ih)Ce=n1;else{Ce=e1;var ae=Wb}else B=V.nodeName,!B||B.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?z&&yr(z.elementType)&&(Ce=ah):Ce=t1;if(Ce&&(Ce=Ce(e,z))){nh(K,Ce,i,G);break e}ae&&ae(e,V,z),e==="focusout"&&z&&V.type==="number"&&z.memoizedProps.value!=null&&gr(V,"number",V.value)}switch(ae=z?Gi(z):window,e){case"focusin":(th(ae)||ae.contentEditable==="true")&&(Fa=ae,Dr=z,Ji=null);break;case"focusout":Ji=Dr=Fa=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,dh(K,i,G);break;case"selectionchange":if(i1)break;case"keydown":case"keyup":dh(K,i,G)}var ge;if(Er)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Xa?Wd(e,i)&&(Te="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Te="onCompositionStart");Te&&(Zd&&i.locale!=="ko"&&(Xa||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Xa&&(ge=Kd()):(zn=G,Tr="value"in zn?zn.value:zn.textContent,Xa=!0)),ae=oo(z,Te),0<ae.length&&(Te=new $d(Te,e,null,i,G),K.push({event:Te,listeners:ae}),ge?Te.data=ge:(ge=eh(i),ge!==null&&(Te.data=ge)))),(ge=$b?Qb(e,i):Zb(e,i))&&(Te=oo(z,"onBeforeInput"),0<Te.length&&(ae=new $d("onBeforeInput","beforeinput",null,i,G),K.push({event:ae,listeners:Te}),ae.data=ge)),q1(K,e,z,i,G)}Up(K,t)})}function Ts(e,t,i){return{instance:e,listener:t,currentTarget:i}}function oo(e,t){for(var i=t+"Capture",o=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=Yi(e,i),u!=null&&o.unshift(Ts(e,u,f)),u=Yi(e,t),u!=null&&o.push(Ts(e,u,f))),e.tag===3)return o;e=e.return}return[]}function K1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hp(e,t,i,o,u){for(var f=t._reactName,y=[];i!==null&&i!==o;){var b=i,C=b.alternate,z=b.stateNode;if(b=b.tag,C!==null&&C===o)break;b!==5&&b!==26&&b!==27||z===null||(C=z,u?(z=Yi(i,f),z!=null&&y.unshift(Ts(i,z,C))):u||(z=Yi(i,f),z!=null&&y.push(Ts(i,z,C)))),i=i.return}y.length!==0&&e.push({event:t,listeners:y})}var X1=/\r\n?/g,F1=/\u0000|\uFFFD/g;function qp(e){return(typeof e=="string"?e:""+e).replace(X1,`
|
|
9
|
+
`).replace(F1,"")}function Gp(e,t){return t=qp(t),qp(e)===t}function De(e,t,i,o,u,f){switch(i){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Ya(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Ya(e,""+o);break;case"className":fl(e,"class",o);break;case"tabIndex":fl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":fl(e,i,o);break;case"style":Gd(e,o,f);break;case"data":if(t!=="object"){fl(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=hl(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(t!=="input"&&De(e,t,"name",u.name,u,null),De(e,t,"formEncType",u.formEncType,u,null),De(e,t,"formMethod",u.formMethod,u,null),De(e,t,"formTarget",u.formTarget,u,null)):(De(e,t,"encType",u.encType,u,null),De(e,t,"method",u.method,u,null),De(e,t,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=hl(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=fn);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(i=o.__html,i!=null){if(u.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}i=hl(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""+o):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":be("beforetoggle",e),be("toggle",e),cl(e,"popover",o);break;case"xlinkActuate":cn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":cn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":cn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":cn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":cn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":cn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":cn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":cn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":cn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":cl(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Sb.get(i)||i,cl(e,i,o))}}function ac(e,t,i,o,u,f){switch(i){case"style":Gd(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(i=o.__html,i!=null){if(u.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof o=="string"?Ya(e,o):(typeof o=="number"||typeof o=="bigint")&&Ya(e,""+o);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_d.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),t=i.slice(2,u?i.length-7:void 0),f=e[gt]||null,f=f!=null?f[i]:null,typeof f=="function"&&e.removeEventListener(t,f,u),typeof o=="function")){typeof f!="function"&&f!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,o,u);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):cl(e,i,o)}}}function ot(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var o=!1,u=!1,f;for(f in i)if(i.hasOwnProperty(f)){var y=i[f];if(y!=null)switch(f){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:De(e,t,f,y,i,null)}}u&&De(e,t,"srcSet",i.srcSet,i,null),o&&De(e,t,"src",i.src,i,null);return;case"input":be("invalid",e);var b=f=y=u=null,C=null,z=null;for(o in i)if(i.hasOwnProperty(o)){var G=i[o];if(G!=null)switch(o){case"name":u=G;break;case"type":y=G;break;case"checked":C=G;break;case"defaultChecked":z=G;break;case"value":f=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(l(137,t));break;default:De(e,t,o,G,i,null)}}Ud(e,f,b,C,z,y,u,!1);return;case"select":be("invalid",e),o=y=f=null;for(u in i)if(i.hasOwnProperty(u)&&(b=i[u],b!=null))switch(u){case"value":f=b;break;case"defaultValue":y=b;break;case"multiple":o=b;default:De(e,t,u,b,i,null)}t=f,i=y,e.multiple=!!o,t!=null?Ga(e,!!o,t,!1):i!=null&&Ga(e,!!o,i,!0);return;case"textarea":be("invalid",e),f=u=o=null;for(y in i)if(i.hasOwnProperty(y)&&(b=i[y],b!=null))switch(y){case"value":o=b;break;case"defaultValue":u=b;break;case"children":f=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(l(91));break;default:De(e,t,y,b,i,null)}Hd(e,o,u,f);return;case"option":for(C in i)i.hasOwnProperty(C)&&(o=i[C],o!=null)&&(C==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":De(e,t,C,o,i,null));return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(o=0;o<Ss.length;o++)be(Ss[o],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in i)if(i.hasOwnProperty(z)&&(o=i[z],o!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:De(e,t,z,o,i,null)}return;default:if(yr(t)){for(G in i)i.hasOwnProperty(G)&&(o=i[G],o!==void 0&&ac(e,t,G,o,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(o=i[b],o!=null&&De(e,t,b,o,i,null))}function $1(e,t,i,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,y=null,b=null,C=null,z=null,G=null;for(B in i){var K=i[B];if(i.hasOwnProperty(B)&&K!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":C=K;default:o.hasOwnProperty(B)||De(e,t,B,null,o,K)}}for(var V in o){var B=o[V];if(K=i[V],o.hasOwnProperty(V)&&(B!=null||K!=null))switch(V){case"type":f=B;break;case"name":u=B;break;case"checked":z=B;break;case"defaultChecked":G=B;break;case"value":y=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(l(137,t));break;default:B!==K&&De(e,t,V,B,o,K)}}pr(e,y,b,C,z,G,f,u);return;case"select":B=y=b=V=null;for(f in i)if(C=i[f],i.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":B=C;default:o.hasOwnProperty(f)||De(e,t,f,null,o,C)}for(u in o)if(f=o[u],C=i[u],o.hasOwnProperty(u)&&(f!=null||C!=null))switch(u){case"value":V=f;break;case"defaultValue":b=f;break;case"multiple":y=f;default:f!==C&&De(e,t,u,f,o,C)}t=b,i=y,o=B,V!=null?Ga(e,!!i,V,!1):!!o!=!!i&&(t!=null?Ga(e,!!i,t,!0):Ga(e,!!i,i?[]:"",!1));return;case"textarea":B=V=null;for(b in i)if(u=i[b],i.hasOwnProperty(b)&&u!=null&&!o.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:De(e,t,b,null,o,u)}for(y in o)if(u=o[y],f=i[y],o.hasOwnProperty(y)&&(u!=null||f!=null))switch(y){case"value":V=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(l(91));break;default:u!==f&&De(e,t,y,u,o,f)}Bd(e,V,B);return;case"option":for(var ne in i)V=i[ne],i.hasOwnProperty(ne)&&V!=null&&!o.hasOwnProperty(ne)&&(ne==="selected"?e.selected=!1:De(e,t,ne,null,o,V));for(C in o)V=o[C],B=i[C],o.hasOwnProperty(C)&&V!==B&&(V!=null||B!=null)&&(C==="selected"?e.selected=V&&typeof V!="function"&&typeof V!="symbol":De(e,t,C,V,o,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in i)V=i[oe],i.hasOwnProperty(oe)&&V!=null&&!o.hasOwnProperty(oe)&&De(e,t,oe,null,o,V);for(z in o)if(V=o[z],B=i[z],o.hasOwnProperty(z)&&V!==B&&(V!=null||B!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(l(137,t));break;default:De(e,t,z,V,o,B)}return;default:if(yr(t)){for(var Oe in i)V=i[Oe],i.hasOwnProperty(Oe)&&V!==void 0&&!o.hasOwnProperty(Oe)&&ac(e,t,Oe,void 0,o,V);for(G in o)V=o[G],B=i[G],!o.hasOwnProperty(G)||V===B||V===void 0&&B===void 0||ac(e,t,G,V,o,B);return}}for(var M in i)V=i[M],i.hasOwnProperty(M)&&V!=null&&!o.hasOwnProperty(M)&&De(e,t,M,null,o,V);for(K in o)V=o[K],B=i[K],!o.hasOwnProperty(K)||V===B||V==null&&B==null||De(e,t,K,V,o,B)}function Yp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Q1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var u=i[o],f=u.transferSize,y=u.initiatorType,b=u.duration;if(f&&b&&Yp(y)){for(y=0,b=u.responseEnd,o+=1;o<i.length;o++){var C=i[o],z=C.startTime;if(z>b)break;var G=C.transferSize,K=C.initiatorType;G&&Yp(K)&&(C=C.responseEnd,y+=G*(C<b?1:(b-z)/(C-z)))}if(--o,t+=8*(f+y)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ic=null,sc=null;function ro(e){return e.nodeType===9?e:e.ownerDocument}function Pp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oc=null;function Z1(){var e=window.event;return e&&e.type==="popstate"?e===oc?!1:(oc=e,!0):(oc=null,!1)}var Xp=typeof setTimeout=="function"?setTimeout:void 0,J1=typeof clearTimeout=="function"?clearTimeout:void 0,Fp=typeof Promise=="function"?Promise:void 0,I1=typeof queueMicrotask=="function"?queueMicrotask:typeof Fp<"u"?function(e){return Fp.resolve(null).then(e).catch(W1)}:Xp;function W1(e){setTimeout(function(){throw e})}function Wn(e){return e==="head"}function $p(e,t){var i=t,o=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(u),bi(t);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")ws(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ws(i);for(var f=i.firstChild;f;){var y=f.nextSibling,b=f.nodeName;f[qi]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=y}}else i==="body"&&ws(e.ownerDocument.body);i=u}while(i);bi(t)}function Qp(e,t){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function rc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":rc(i),hr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function eS(e,t,i,o){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[qi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Yt(e.nextSibling),e===null)break}return null}function tS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Yt(e.nextSibling),e===null))return null;return e}function Zp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Yt(e.nextSibling),e===null))return null;return e}function uc(e){return e.data==="$?"||e.data==="$~"}function cc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function nS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var o=function(){t(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Yt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var fc=null;function Jp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Yt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Ip(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Wp(e,t,i){switch(t=ro(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function ws(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);hr(e)}var Pt=new Map,eg=new Set;function uo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var En=U.d;U.d={f:aS,r:iS,D:sS,C:lS,L:oS,m:rS,X:cS,S:uS,M:fS};function aS(){var e=En.f(),t=eo();return e||t}function iS(e){var t=Ba(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):En.r(e)}var yi=typeof document>"u"?null:document;function tg(e,t,i){var o=yi;if(o&&typeof t=="string"&&t){var u=zt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),eg.has(u)||(eg.add(u),e={rel:e,crossOrigin:i,href:t},o.querySelector(u)===null&&(t=o.createElement("link"),ot(t,"link",e),tt(t),o.head.appendChild(t)))}}function sS(e){En.D(e),tg("dns-prefetch",e,null)}function lS(e,t){En.C(e,t),tg("preconnect",e,t)}function oS(e,t,i){En.L(e,t,i);var o=yi;if(o&&e&&t){var u='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+zt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+zt(i.imageSizes)+'"]')):u+='[href="'+zt(e)+'"]';var f=u;switch(t){case"style":f=xi(e);break;case"script":f=vi(e)}Pt.has(f)||(e=x({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Pt.set(f,e),o.querySelector(u)!==null||t==="style"&&o.querySelector(Cs(f))||t==="script"&&o.querySelector(js(f))||(t=o.createElement("link"),ot(t,"link",e),tt(t),o.head.appendChild(t)))}}function rS(e,t){En.m(e,t);var i=yi;if(i&&e){var o=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+zt(o)+'"][href="'+zt(e)+'"]',f=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=vi(e)}if(!Pt.has(f)&&(e=x({rel:"modulepreload",href:e},t),Pt.set(f,e),i.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(js(f)))return}o=i.createElement("link"),ot(o,"link",e),tt(o),i.head.appendChild(o)}}}function uS(e,t,i){En.S(e,t,i);var o=yi;if(o&&e){var u=Ha(o).hoistableStyles,f=xi(e);t=t||"default";var y=u.get(f);if(!y){var b={loading:0,preload:null};if(y=o.querySelector(Cs(f)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Pt.get(f))&&dc(e,i);var C=y=o.createElement("link");tt(C),ot(C,"link",e),C._p=new Promise(function(z,G){C.onload=z,C.onerror=G}),C.addEventListener("load",function(){b.loading|=1}),C.addEventListener("error",function(){b.loading|=2}),b.loading|=4,co(y,t,o)}y={type:"stylesheet",instance:y,count:1,state:b},u.set(f,y)}}}function cS(e,t){En.X(e,t);var i=yi;if(i&&e){var o=Ha(i).hoistableScripts,u=vi(e),f=o.get(u);f||(f=i.querySelector(js(u)),f||(e=x({src:e,async:!0},t),(t=Pt.get(u))&&hc(e,t),f=i.createElement("script"),tt(f),ot(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(u,f))}}function fS(e,t){En.M(e,t);var i=yi;if(i&&e){var o=Ha(i).hoistableScripts,u=vi(e),f=o.get(u);f||(f=i.querySelector(js(u)),f||(e=x({src:e,async:!0,type:"module"},t),(t=Pt.get(u))&&hc(e,t),f=i.createElement("script"),tt(f),ot(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(u,f))}}function ng(e,t,i,o){var u=(u=xe.current)?uo(u):null;if(!u)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=xi(i.href),i=Ha(u).hoistableStyles,o=i.get(t),o||(o={type:"style",instance:null,count:0,state:null},i.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=xi(i.href);var f=Ha(u).hoistableStyles,y=f.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=u.querySelector(Cs(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Pt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Pt.set(e,i),f||dS(u,e,i,y.state))),t&&o===null)throw Error(l(528,""));return y}if(t&&o!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=vi(i),i=Ha(u).hoistableScripts,o=i.get(t),o||(o={type:"script",instance:null,count:0,state:null},i.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function xi(e){return'href="'+zt(e)+'"'}function Cs(e){return'link[rel="stylesheet"]['+e+"]"}function ag(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function dS(e,t,i,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),ot(t,"link",i),tt(t),e.head.appendChild(t))}function vi(e){return'[src="'+zt(e)+'"]'}function js(e){return"script[async]"+e}function ig(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+zt(i.href)+'"]');if(o)return t.instance=o,tt(o),o;var u=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),tt(o),ot(o,"style",u),co(o,i.precedence,e),t.instance=o;case"stylesheet":u=xi(i.href);var f=e.querySelector(Cs(u));if(f)return t.state.loading|=4,t.instance=f,tt(f),f;o=ag(i),(u=Pt.get(u))&&dc(o,u),f=(e.ownerDocument||e).createElement("link"),tt(f);var y=f;return y._p=new Promise(function(b,C){y.onload=b,y.onerror=C}),ot(f,"link",o),t.state.loading|=4,co(f,i.precedence,e),t.instance=f;case"script":return f=vi(i.src),(u=e.querySelector(js(f)))?(t.instance=u,tt(u),u):(o=i,(u=Pt.get(f))&&(o=x({},i),hc(o,u)),e=e.ownerDocument||e,u=e.createElement("script"),tt(u),ot(u,"link",o),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,co(o,i.precedence,e));return t.instance}function co(e,t,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,f=u,y=0;y<o.length;y++){var b=o[y];if(b.dataset.precedence===t)f=b;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function dc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function hc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fo=null;function sg(e,t,i){if(fo===null){var o=new Map,u=fo=new Map;u.set(i,o)}else u=fo,o=u.get(i),o||(o=new Map,u.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var f=i[u];if(!(f[qi]||f[at]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(t)||"";y=e+y;var b=o.get(y);b?b.push(f):o.set(y,[f])}}return o}function lg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function hS(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function og(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mS(e,t,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=xi(o.href),f=t.querySelector(Cs(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ho.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=f,tt(f);return}f=t.ownerDocument||t,o=ag(o),(u=Pt.get(u))&&dc(o,u),f=f.createElement("link"),tt(f);var y=f;y._p=new Promise(function(b,C){y.onload=b,y.onerror=C}),ot(f,"link",o),i.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ho.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var mc=0;function pS(e,t){return e.stylesheets&&e.count===0&&po(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&po(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&mc===0&&(mc=62500*Q1());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&po(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>mc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function ho(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)po(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mo=null;function po(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mo=new Map,t.forEach(gS,e),mo=null,ho.call(e))}function gS(e,t){if(!(t.state.loading&4)){var i=mo.get(e);if(i)var o=i.get(null);else{i=new Map,mo.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var y=u[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(i.set(y.dataset.precedence,y),o=y)}o&&i.set(null,o)}u=t.instance,y=u.getAttribute("data-precedence"),f=i.get(y)||o,f===o&&i.set(null,u),i.set(y,u),this.count++,o=ho.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Ns={$$typeof:L,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function yS(e,t,i,o,u,f,y,b,C){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ur(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ur(0),this.hiddenUpdates=ur(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function rg(e,t,i,o,u,f,y,b,C,z,G,K){return e=new yS(e,t,i,y,C,z,G,K,b),t=1,f===!0&&(t|=24),f=At(3,null,null,t),e.current=f,f.stateNode=e,t=Fr(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:t},Jr(f),e}function ug(e){return e?(e=Za,e):Za}function cg(e,t,i,o,u,f){u=ug(u),o.context===null?o.context=u:o.pendingContext=u,o=Gn(t),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=Yn(e,o,t),i!==null&&(Tt(i,e,t),is(i,e,t))}function fg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function pc(e,t){fg(e,t),(e=e.alternate)&&fg(e,t)}function dg(e){if(e.tag===13||e.tag===31){var t=ya(e,67108864);t!==null&&Tt(t,e,67108864),pc(e,67108864)}}function hg(e){if(e.tag===13||e.tag===31){var t=_t();t=cr(t);var i=ya(e,t);i!==null&&Tt(i,e,t),pc(e,t)}}var go=!0;function xS(e,t,i,o){var u=O.T;O.T=null;var f=U.p;try{U.p=2,gc(e,t,i,o)}finally{U.p=f,O.T=u}}function vS(e,t,i,o){var u=O.T;O.T=null;var f=U.p;try{U.p=8,gc(e,t,i,o)}finally{U.p=f,O.T=u}}function gc(e,t,i,o){if(go){var u=yc(o);if(u===null)nc(e,t,o,yo,i),pg(e,o);else if(SS(u,e,t,i,o))o.stopPropagation();else if(pg(e,o),t&4&&-1<bS.indexOf(e)){for(;u!==null;){var f=Ba(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=da(f.pendingLanes);if(y!==0){var b=f;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var C=1<<31-Nt(y);b.entanglements[1]|=C,y&=~C}sn(f),(Ne&6)===0&&(Il=Ct()+500,bs(0))}}break;case 31:case 13:b=ya(f,2),b!==null&&Tt(b,f,2),eo(),pc(f,2)}if(f=yc(o),f===null&&nc(e,t,o,yo,i),f===u)break;u=f}u!==null&&o.stopPropagation()}else nc(e,t,o,null,i)}}function yc(e){return e=vr(e),xc(e)}var yo=null;function xc(e){if(yo=null,e=Ua(e),e!==null){var t=c(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=d(t),e!==null)return e;e=null}else if(i===31){if(e=h(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yo=e,null}function mg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sb()){case Td:return 2;case wd:return 8;case sl:case lb:return 32;case Cd:return 268435456;default:return 32}default:return 32}}var vc=!1,ea=null,ta=null,na=null,Es=new Map,As=new Map,aa=[],bS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function pg(e,t){switch(e){case"focusin":case"focusout":ea=null;break;case"dragenter":case"dragleave":ta=null;break;case"mouseover":case"mouseout":na=null;break;case"pointerover":case"pointerout":Es.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(t.pointerId)}}function Rs(e,t,i,o,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[u]},t!==null&&(t=Ba(t),t!==null&&dg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function SS(e,t,i,o,u){switch(t){case"focusin":return ea=Rs(ea,e,t,i,o,u),!0;case"dragenter":return ta=Rs(ta,e,t,i,o,u),!0;case"mouseover":return na=Rs(na,e,t,i,o,u),!0;case"pointerover":var f=u.pointerId;return Es.set(f,Rs(Es.get(f)||null,e,t,i,o,u)),!0;case"gotpointercapture":return f=u.pointerId,As.set(f,Rs(As.get(f)||null,e,t,i,o,u)),!0}return!1}function gg(e){var t=Ua(e.target);if(t!==null){var i=c(t);if(i!==null){if(t=i.tag,t===13){if(t=d(i),t!==null){e.blockedOn=t,Md(e.priority,function(){hg(i)});return}}else if(t===31){if(t=h(i),t!==null){e.blockedOn=t,Md(e.priority,function(){hg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=yc(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);xr=o,i.target.dispatchEvent(o),xr=null}else return t=Ba(i),t!==null&&dg(t),e.blockedOn=i,!1;t.shift()}return!0}function yg(e,t,i){xo(e)&&i.delete(t)}function TS(){vc=!1,ea!==null&&xo(ea)&&(ea=null),ta!==null&&xo(ta)&&(ta=null),na!==null&&xo(na)&&(na=null),Es.forEach(yg),As.forEach(yg)}function vo(e,t){e.blockedOn===t&&(e.blockedOn=null,vc||(vc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,TS)))}var bo=null;function xg(e){bo!==e&&(bo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){bo===e&&(bo=null);for(var t=0;t<e.length;t+=3){var i=e[t],o=e[t+1],u=e[t+2];if(typeof o!="function"){if(xc(o||i)===null)continue;break}var f=Ba(i);f!==null&&(e.splice(t,3),t-=3,yu(f,{pending:!0,data:u,method:i.method,action:o},o,u))}}))}function bi(e){function t(C){return vo(C,e)}ea!==null&&vo(ea,e),ta!==null&&vo(ta,e),na!==null&&vo(na,e),Es.forEach(t),As.forEach(t);for(var i=0;i<aa.length;i++){var o=aa[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<aa.length&&(i=aa[0],i.blockedOn===null);)gg(i),i.blockedOn===null&&aa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var u=i[o],f=i[o+1],y=u[gt]||null;if(typeof f=="function")y||xg(i);else if(y){var b=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[gt]||null)b=y.formAction;else if(xc(u)!==null)continue}else b=y.action;typeof b=="function"?i[o+1]=b:(i.splice(o,3),o-=3),xg(i)}}}function vg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function bc(e){this._internalRoot=e}So.prototype.render=bc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,o=_t();cg(i,o,e,t,null,null)},So.prototype.unmount=bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cg(e.current,2,null,e,null,null),eo(),t[Va]=null}};function So(e){this._internalRoot=e}So.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rd();e={blockedOn:null,target:e,priority:t};for(var i=0;i<aa.length&&t!==0&&t<aa[i].priority;i++);aa.splice(i,0,e),i===0&&gg(e)}};var bg=a.version;if(bg!=="19.2.3")throw Error(l(527,bg,"19.2.3"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var wS={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{Ui=To.inject(wS),jt=To}catch{}}return Ds.createRoot=function(e,t){if(!r(e))throw Error(l(299));var i=!1,o="",u=Em,f=Am,y=Rm;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=rg(e,1,!1,null,null,i,o,null,u,f,y,vg),e[Va]=t.current,tc(e),new bc(t)},Ds.hydrateRoot=function(e,t,i){if(!r(e))throw Error(l(299));var o=!1,u="",f=Em,y=Am,b=Rm,C=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),t=rg(e,1,!0,t,i??null,o,u,C,f,y,b,vg),t.context=ug(null),i=t.current,o=_t(),o=cr(o),u=Gn(o),u.callback=null,Yn(i,u,o),i=o,t.current.lanes=i,Hi(t,i),sn(t),e[Va]=t.current,tc(e),new So(t)},Ds.version="19.2.3",Ds}var Mg;function LS(){if(Mg)return wc.exports;Mg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),wc.exports=_S(),wc.exports}var kS=LS();const ce=n=>typeof n=="string",Os=()=>{let n,a;const s=new Promise((l,r)=>{n=l,a=r});return s.resolve=n,s.reject=a,s},Dg=n=>n==null?"":""+n,zS=(n,a,s)=>{n.forEach(l=>{a[l]&&(s[l]=a[l])})},VS=/###/g,Og=n=>n&&n.indexOf("###")>-1?n.replace(VS,"."):n,_g=n=>!n||ce(n),Us=(n,a,s)=>{const l=ce(a)?a.split("."):a;let r=0;for(;r<l.length-1;){if(_g(n))return{};const c=Og(l[r]);!n[c]&&s&&(n[c]=new s),Object.prototype.hasOwnProperty.call(n,c)?n=n[c]:n={},++r}return _g(n)?{}:{obj:n,k:Og(l[r])}},Lg=(n,a,s)=>{const{obj:l,k:r}=Us(n,a,Object);if(l!==void 0||a.length===1){l[r]=s;return}let c=a[a.length-1],d=a.slice(0,a.length-1),h=Us(n,d,Object);for(;h.obj===void 0&&d.length;)c=`${d[d.length-1]}.${c}`,d=d.slice(0,d.length-1),h=Us(n,d,Object),h?.obj&&typeof h.obj[`${h.k}.${c}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${c}`]=s},US=(n,a,s,l)=>{const{obj:r,k:c}=Us(n,a,Object);r[c]=r[c]||[],r[c].push(s)},zo=(n,a)=>{const{obj:s,k:l}=Us(n,a);if(s&&Object.prototype.hasOwnProperty.call(s,l))return s[l]},BS=(n,a,s)=>{const l=zo(n,s);return l!==void 0?l:zo(a,s)},Ax=(n,a,s)=>{for(const l in a)l!=="__proto__"&&l!=="constructor"&&(l in n?ce(n[l])||n[l]instanceof String||ce(a[l])||a[l]instanceof String?s&&(n[l]=a[l]):Ax(n[l],a[l],s):n[l]=a[l]);return n},Si=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var HS={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const qS=n=>ce(n)?n.replace(/[&<>"'\/]/g,a=>HS[a]):n;class GS{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const s=this.regExpMap.get(a);if(s!==void 0)return s;const l=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,l),this.regExpQueue.push(a),l}}const YS=[" ",",","?","!",";"],PS=new GS(20),KS=(n,a,s)=>{a=a||"",s=s||"";const l=YS.filter(d=>a.indexOf(d)<0&&s.indexOf(d)<0);if(l.length===0)return!0;const r=PS.getRegExp(`(${l.map(d=>d==="?"?"\\?":d).join("|")})`);let c=!r.test(n);if(!c){const d=n.indexOf(s);d>0&&!r.test(n.substring(0,d))&&(c=!0)}return c},nf=(n,a,s=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const l=a.split(s);let r=n;for(let c=0;c<l.length;){if(!r||typeof r!="object")return;let d,h="";for(let p=c;p<l.length;++p)if(p!==c&&(h+=s),h+=l[p],d=r[h],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&p<l.length-1)continue;c+=p-c+1;break}r=d}return r},Ks=n=>n?.replace("_","-"),XS={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class Vo{constructor(a,s={}){this.init(a,s)}init(a,s={}){this.prefix=s.prefix||"i18next:",this.logger=a||XS,this.options=s,this.debug=s.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,s,l,r){return r&&!this.debug?null:(ce(a[0])&&(a[0]=`${l}${this.prefix} ${a[0]}`),this.logger[s](a))}create(a){return new Vo(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new Vo(this.logger,a)}}var ln=new Vo;class Zo{constructor(){this.observers={}}on(a,s){return a.split(" ").forEach(l=>{this.observers[l]||(this.observers[l]=new Map);const r=this.observers[l].get(s)||0;this.observers[l].set(s,r+1)}),this}off(a,s){if(this.observers[a]){if(!s){delete this.observers[a];return}this.observers[a].delete(s)}}emit(a,...s){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([r,c])=>{for(let d=0;d<c;d++)r(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,c])=>{for(let d=0;d<c;d++)r.apply(r,[a,...s])})}}class kg extends Zo{constructor(a,s={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const s=this.options.ns.indexOf(a);s>-1&&this.options.ns.splice(s,1)}getResource(a,s,l,r={}){const c=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,d=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;a.indexOf(".")>-1?h=a.split("."):(h=[a,s],l&&(Array.isArray(l)?h.push(...l):ce(l)&&c?h.push(...l.split(c)):h.push(l)));const p=zo(this.data,h);return!p&&!s&&!l&&a.indexOf(".")>-1&&(a=h[0],s=h[1],l=h.slice(2).join(".")),p||!d||!ce(l)?p:nf(this.data?.[a]?.[s],l,c)}addResource(a,s,l,r,c={silent:!1}){const d=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let h=[a,s];l&&(h=h.concat(d?l.split(d):l)),a.indexOf(".")>-1&&(h=a.split("."),r=s,s=h[1]),this.addNamespaces(s),Lg(this.data,h,r),c.silent||this.emit("added",a,s,l,r)}addResources(a,s,l,r={silent:!1}){for(const c in l)(ce(l[c])||Array.isArray(l[c]))&&this.addResource(a,s,c,l[c],{silent:!0});r.silent||this.emit("added",a,s,l)}addResourceBundle(a,s,l,r,c,d={silent:!1,skipCopy:!1}){let h=[a,s];a.indexOf(".")>-1&&(h=a.split("."),r=l,l=s,s=h[1]),this.addNamespaces(s);let p=zo(this.data,h)||{};d.skipCopy||(l=JSON.parse(JSON.stringify(l))),r?Ax(p,l,c):p={...p,...l},Lg(this.data,h,p),d.silent||this.emit("added",a,s,l)}removeResourceBundle(a,s){this.hasResourceBundle(a,s)&&delete this.data[a][s],this.removeNamespaces(s),this.emit("removed",a,s)}hasResourceBundle(a,s){return this.getResource(a,s)!==void 0}getResourceBundle(a,s){return s||(s=this.options.defaultNS),this.getResource(a,s)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const s=this.getDataByLanguage(a);return!!(s&&Object.keys(s)||[]).find(r=>s[r]&&Object.keys(s[r]).length>0)}toJSON(){return this.data}}var Rx={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,s,l,r){return n.forEach(c=>{a=this.processors[c]?.process(a,s,l,r)??a}),a}};const Mx=Symbol("i18next/PATH_KEY");function FS(){const n=[],a=Object.create(null);let s;return a.get=(l,r)=>(s?.revoke?.(),r===Mx?n:(n.push(r),s=Proxy.revocable(l,a),s.proxy)),Proxy.revocable(Object.create(null),a).proxy}function af(n,a){const{[Mx]:s}=n(FS());return s.join(a?.keySeparator??".")}const zg={},Ec=n=>!ce(n)&&typeof n!="boolean"&&typeof n!="number";class Uo extends Zo{constructor(a,s={}){super(),zS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ln.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,s={interpolation:{}}){const l={...s};if(a==null)return!1;const r=this.resolve(a,l);if(r?.res===void 0)return!1;const c=Ec(r.res);return!(l.returnObjects===!1&&c)}extractFromKey(a,s){let l=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let c=s.ns||this.options.defaultNS||[];const d=l&&a.indexOf(l)>-1,h=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!KS(a,l,r);if(d&&!h){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:ce(c)?[c]:c};const g=a.split(l);(l!==r||l===r&&this.options.ns.indexOf(g[0])>-1)&&(c=g.shift()),a=g.join(r)}return{key:a,namespaces:ce(c)?[c]:c}}translate(a,s,l){let r=typeof s=="object"?{...s}:s;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),a==null)return"";typeof a=="function"&&(a=af(a,{...this.options,...r})),Array.isArray(a)||(a=[String(a)]);const c=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,d=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(a[a.length-1],r),g=p[p.length-1];let v=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=r.lng||this.language,S=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return S?c?{res:`${g}${v}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:g,usedParams:this.getUsedParamsDetails(r)}:`${g}${v}${h}`:c?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:g,usedParams:this.getUsedParamsDetails(r)}:h;const w=this.resolve(a,r);let j=w?.res;const R=w?.usedKey||h,A=w?.exactUsedKey||h,_=["[object Number]","[object Function]","[object RegExp]"],D=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,F=r.count!==void 0&&!ce(r.count),H=Uo.hasDefaultValue(r),Q=F?this.pluralResolver.getSuffix(x,r.count,r):"",X=r.ordinal&&F?this.pluralResolver.getSuffix(x,r.count,{ordinal:!1}):"",q=F&&!r.ordinal&&r.count===0,$=q&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${Q}`]||r[`defaultValue${X}`]||r.defaultValue;let Z=j;L&&!j&&H&&(Z=$);const re=Ec(Z),de=Object.prototype.toString.apply(Z);if(L&&Z&&re&&_.indexOf(de)<0&&!(ce(D)&&Array.isArray(Z))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,Z,{...r,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return c?(w.res=W,w.usedParams=this.getUsedParamsDetails(r),w):W}if(d){const W=Array.isArray(Z),le=W?[]:{},ie=W?A:R;for(const O in Z)if(Object.prototype.hasOwnProperty.call(Z,O)){const U=`${ie}${d}${O}`;H&&!j?le[O]=this.translate(U,{...r,defaultValue:Ec($)?$[O]:void 0,joinArrays:!1,ns:p}):le[O]=this.translate(U,{...r,joinArrays:!1,ns:p}),le[O]===U&&(le[O]=Z[O])}j=le}}else if(L&&ce(D)&&Array.isArray(j))j=j.join(D),j&&(j=this.extendTranslation(j,a,r,l));else{let W=!1,le=!1;!this.isValidLookup(j)&&H&&(W=!0,j=$),this.isValidLookup(j)||(le=!0,j=h);const O=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&le?void 0:j,U=H&&$!==j&&this.options.updateMissing;if(le||W||U){if(this.logger.log(U?"updateKey":"missingKey",x,g,h,U?$:j),d){const N=this.resolve(h,{...r,keySeparator:!1});N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let J=[];const ue=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ue&&ue[0])for(let N=0;N<ue.length;N++)J.push(ue[N]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(r.lng||this.language):J.push(r.lng||this.language);const he=(N,Y,I)=>{const te=H&&I!==j?I:O;this.options.missingKeyHandler?this.options.missingKeyHandler(N,g,Y,te,U,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(N,g,Y,te,U,r),this.emit("missingKey",N,g,Y,j)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?J.forEach(N=>{const Y=this.pluralResolver.getSuffixes(N,r);q&&r[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(I=>{he([N],h+I,r[`defaultValue${I}`]||$)})}):he(J,h,$))}j=this.extendTranslation(j,a,r,w,l),le&&j===h&&this.options.appendNamespaceToMissingKey&&(j=`${g}${v}${h}`),(le||W)&&this.options.parseMissingKeyHandler&&(j=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${v}${h}`:h,W?j:void 0,r))}return c?(w.res=j,w.usedParams=this.getUsedParamsDetails(r),w):j}extendTranslation(a,s,l,r,c){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const p=ce(a)&&(l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(p){const x=a.match(this.interpolator.nestingRegexp);g=x&&x.length}let v=l.replace&&!ce(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,l.lng||this.language||r.usedLng,l),p){const x=a.match(this.interpolator.nestingRegexp),S=x&&x.length;g<S&&(l.nest=!1)}!l.lng&&r&&r.res&&(l.lng=this.language||r.usedLng),l.nest!==!1&&(a=this.interpolator.nest(a,(...x)=>c?.[0]===x[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${s[0]}`),null):this.translate(...x,s),l)),l.interpolation&&this.interpolator.reset()}const d=l.postProcess||this.options.postProcess,h=ce(d)?[d]:d;return a!=null&&h?.length&&l.applyPostProcessor!==!1&&(a=Rx.handle(h,a,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),a}resolve(a,s={}){let l,r,c,d,h;return ce(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(l))return;const g=this.extractFromKey(p,s),v=g.key;r=v;let x=g.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=s.count!==void 0&&!ce(s.count),w=S&&!s.ordinal&&s.count===0,j=s.context!==void 0&&(ce(s.context)||typeof s.context=="number")&&s.context!=="",R=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);x.forEach(A=>{this.isValidLookup(l)||(h=A,!zg[`${R[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(zg[`${R[0]}-${A}`]=!0,this.logger.warn(`key "${r}" for languages "${R.join(", ")}" won't get resolved as namespace "${h}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),R.forEach(_=>{if(this.isValidLookup(l))return;d=_;const D=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(D,v,_,A,s);else{let F;S&&(F=this.pluralResolver.getSuffix(_,s.count,s));const H=`${this.options.pluralSeparator}zero`,Q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(s.ordinal&&F.indexOf(Q)===0&&D.push(v+F.replace(Q,this.options.pluralSeparator)),D.push(v+F),w&&D.push(v+H)),j){const X=`${v}${this.options.contextSeparator||"_"}${s.context}`;D.push(X),S&&(s.ordinal&&F.indexOf(Q)===0&&D.push(X+F.replace(Q,this.options.pluralSeparator)),D.push(X+F),w&&D.push(X+H))}}let L;for(;L=D.pop();)this.isValidLookup(l)||(c=L,l=this.getResource(_,A,L,s))}))})}),{res:l,usedKey:r,exactUsedKey:c,usedLng:d,usedNS:h}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,s,l,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,s,l,r):this.resourceStore.getResource(a,s,l,r)}getUsedParamsDetails(a={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=a.replace&&!ce(a.replace);let r=l?a.replace:a;if(l&&typeof a.count<"u"&&(r.count=a.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!l){r={...r};for(const c of s)delete r[c]}return r}static hasDefaultValue(a){const s="defaultValue";for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)&&s===l.substring(0,s.length)&&a[l]!==void 0)return!0;return!1}}class Vg{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ln.create("languageUtils")}getScriptPartFromCode(a){if(a=Ks(a),!a||a.indexOf("-")<0)return null;const s=a.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(a){if(a=Ks(a),!a||a.indexOf("-")<0)return a;const s=a.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(a){if(ce(a)&&a.indexOf("-")>-1){let s;try{s=Intl.getCanonicalLocales(a)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let s;return a.forEach(l=>{if(s)return;const r=this.formatLanguageCode(l);(!this.options.supportedLngs||this.isSupportedCode(r))&&(s=r)}),!s&&this.options.supportedLngs&&a.forEach(l=>{if(s)return;const r=this.getScriptPartFromCode(l);if(this.isSupportedCode(r))return s=r;const c=this.getLanguagePartFromCode(l);if(this.isSupportedCode(c))return s=c;s=this.options.supportedLngs.find(d=>{if(d===c)return d;if(!(d.indexOf("-")<0&&c.indexOf("-")<0)&&(d.indexOf("-")>0&&c.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===c||d.indexOf(c)===0&&c.length>1))return d})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(a,s){if(!a)return[];if(typeof a=="function"&&(a=a(s)),ce(a)&&(a=[a]),Array.isArray(a))return a;if(!s)return a.default||[];let l=a[s];return l||(l=a[this.getScriptPartFromCode(s)]),l||(l=a[this.formatLanguageCode(s)]),l||(l=a[this.getLanguagePartFromCode(s)]),l||(l=a.default),l||[]}toResolveHierarchy(a,s){const l=this.getFallbackCodes((s===!1?[]:s)||this.options.fallbackLng||[],a),r=[],c=d=>{d&&(this.isSupportedCode(d)?r.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return ce(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(a))):ce(a)&&c(this.formatLanguageCode(a)),l.forEach(d=>{r.indexOf(d)<0&&c(this.formatLanguageCode(d))}),r}}const Ug={zero:0,one:1,two:2,few:3,many:4,other:5},Bg={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class $S{constructor(a,s={}){this.languageUtils=a,this.options=s,this.logger=ln.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,s={}){const l=Ks(a==="dev"?"en":a),r=s.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:l,type:r});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let d;try{d=new Intl.PluralRules(l,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Bg;if(!a.match(/-|_/))return Bg;const p=this.languageUtils.getLanguagePartFromCode(a);d=this.getRule(p,s)}return this.pluralRulesCache[c]=d,d}needsPlural(a,s={}){let l=this.getRule(a,s);return l||(l=this.getRule("dev",s)),l?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,s,l={}){return this.getSuffixes(a,l).map(r=>`${s}${r}`)}getSuffixes(a,s={}){let l=this.getRule(a,s);return l||(l=this.getRule("dev",s)),l?l.resolvedOptions().pluralCategories.sort((r,c)=>Ug[r]-Ug[c]).map(r=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(a,s,l={}){const r=this.getRule(a,l);return r?`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${r.select(s)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",s,l))}}const Hg=(n,a,s,l=".",r=!0)=>{let c=BS(n,a,s);return!c&&r&&ce(s)&&(c=nf(n,s,l),c===void 0&&(c=nf(a,s,l))),c},Ac=n=>n.replace(/\$/g,"$$$$");class qg{constructor(a={}){this.logger=ln.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(s=>s),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:s,escapeValue:l,useRawValueToEscape:r,prefix:c,prefixEscaped:d,suffix:h,suffixEscaped:p,formatSeparator:g,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:w,nestingSuffix:j,nestingSuffixEscaped:R,nestingOptionsSeparator:A,maxReplaces:_,alwaysFormat:D}=a.interpolation;this.escape=s!==void 0?s:qS,this.escapeValue=l!==void 0?l:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=c?Si(c):d||"{{",this.suffix=h?Si(h):p||"}}",this.formatSeparator=g||",",this.unescapePrefix=v?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=S?Si(S):w||Si("$t("),this.nestingSuffix=j?Si(j):R||Si(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=_||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(s,l)=>s?.source===l?(s.lastIndex=0,s):new RegExp(l,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(a,s,l,r){let c,d,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=w=>{if(w.indexOf(this.formatSeparator)<0){const _=Hg(s,p,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,l,{...r,...s,interpolationkey:w}):_}const j=w.split(this.formatSeparator),R=j.shift().trim(),A=j.join(this.formatSeparator).trim();return this.format(Hg(s,p,R,this.options.keySeparator,this.options.ignoreJSONStructure),A,l,{...r,...s,interpolationkey:R})};this.resetRegExp();const v=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Ac(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Ac(this.escape(w)):Ac(w)}].forEach(w=>{for(h=0;c=w.regex.exec(a);){const j=c[1].trim();if(d=g(j),d===void 0)if(typeof v=="function"){const A=v(a,c,r);d=ce(A)?A:""}else if(r&&Object.prototype.hasOwnProperty.call(r,j))d="";else if(x){d=c[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${a}`),d="";else!ce(d)&&!this.useRawValueToEscape&&(d=Dg(d));const R=w.safeValue(d);if(a=a.replace(c[0],R),x?(w.regex.lastIndex+=d.length,w.regex.lastIndex-=c[0].length):w.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,s,l={}){let r,c,d;const h=(p,g)=>{const v=this.nestingOptionsSeparator;if(p.indexOf(v)<0)return p;const x=p.split(new RegExp(`${v}[ ]*{`));let S=`{${x[1]}`;p=x[0],S=this.interpolate(S,d);const w=S.match(/'/g),j=S.match(/"/g);((w?.length??0)%2===0&&!j||j.length%2!==0)&&(S=S.replace(/'/g,'"'));try{d=JSON.parse(S),g&&(d={...g,...d})}catch(R){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,R),`${p}${v}${S}`}return d.defaultValue&&d.defaultValue.indexOf(this.prefix)>-1&&delete d.defaultValue,p};for(;r=this.nestingRegexp.exec(a);){let p=[];d={...l},d=d.replace&&!ce(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const g=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(g!==-1&&(p=r[1].slice(g).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),r[1]=r[1].slice(0,g)),c=s(h.call(this,r[1].trim(),d),d),c&&r[0]===a&&!ce(c))return c;ce(c)||(c=Dg(c)),c||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${a}`),c=""),p.length&&(c=p.reduce((v,x)=>this.format(v,x,l.lng,{...l,interpolationkey:r[1].trim()}),c.trim())),a=a.replace(r[0],c),this.regexp.lastIndex=0}return a}}const QS=n=>{let a=n.toLowerCase().trim();const s={};if(n.indexOf("(")>-1){const l=n.split("(");a=l[0].toLowerCase().trim();const r=l[1].substring(0,l[1].length-1);a==="currency"&&r.indexOf(":")<0?s.currency||(s.currency=r.trim()):a==="relativetime"&&r.indexOf(":")<0?s.range||(s.range=r.trim()):r.split(";").forEach(d=>{if(d){const[h,...p]=d.split(":"),g=p.join(":").trim().replace(/^'+|'+$/g,""),v=h.trim();s[v]||(s[v]=g),g==="false"&&(s[v]=!1),g==="true"&&(s[v]=!0),isNaN(g)||(s[v]=parseInt(g,10))}})}return{formatName:a,formatOptions:s}},Gg=n=>{const a={};return(s,l,r)=>{let c=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(c={...c,[r.interpolationkey]:void 0});const d=l+JSON.stringify(c);let h=a[d];return h||(h=n(Ks(l),r),a[d]=h),h(s)}},ZS=n=>(a,s,l)=>n(Ks(s),l)(a);class JS{constructor(a={}){this.logger=ln.create("formatter"),this.options=a,this.init(a)}init(a,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const l=s.cacheInBuiltFormats?Gg:ZS;this.formats={number:l((r,c)=>{const d=new Intl.NumberFormat(r,{...c});return h=>d.format(h)}),currency:l((r,c)=>{const d=new Intl.NumberFormat(r,{...c,style:"currency"});return h=>d.format(h)}),datetime:l((r,c)=>{const d=new Intl.DateTimeFormat(r,{...c});return h=>d.format(h)}),relativetime:l((r,c)=>{const d=new Intl.RelativeTimeFormat(r,{...c});return h=>d.format(h,c.range||"day")}),list:l((r,c)=>{const d=new Intl.ListFormat(r,{...c});return h=>d.format(h)})}}add(a,s){this.formats[a.toLowerCase().trim()]=s}addCached(a,s){this.formats[a.toLowerCase().trim()]=Gg(s)}format(a,s,l,r={}){const c=s.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(h=>h.indexOf(")")>-1)){const h=c.findIndex(p=>p.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,h)].join(this.formatSeparator)}return c.reduce((h,p)=>{const{formatName:g,formatOptions:v}=QS(p);if(this.formats[g]){let x=h;try{const S=r?.formatParams?.[r.interpolationkey]||{},w=S.locale||S.lng||r.locale||r.lng||l;x=this.formats[g](h,w,{...v,...r,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${g}`);return h},a)}}const IS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class WS extends Zo{constructor(a,s,l,r={}){super(),this.backend=a,this.store=s,this.services=l,this.languageUtils=l.languageUtils,this.options=r,this.logger=ln.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(l,r.backend,r)}queueLoad(a,s,l,r){const c={},d={},h={},p={};return a.forEach(g=>{let v=!0;s.forEach(x=>{const S=`${g}|${x}`;!l.reload&&this.store.hasResourceBundle(g,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?d[S]===void 0&&(d[S]=!0):(this.state[S]=1,v=!1,d[S]===void 0&&(d[S]=!0),c[S]===void 0&&(c[S]=!0),p[x]===void 0&&(p[x]=!0)))}),v||(h[g]=!0)}),(Object.keys(c).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(c),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(a,s,l){const r=a.split("|"),c=r[0],d=r[1];s&&this.emit("failedLoading",c,d,s),!s&&l&&this.store.addResourceBundle(c,d,l,void 0,void 0,{skipCopy:!0}),this.state[a]=s?-1:2,s&&l&&(this.state[a]=0);const h={};this.queue.forEach(p=>{US(p.loaded,[c],d),IS(p,a),s&&p.errors.push(s),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(g=>{h[g]||(h[g]={});const v=p.loaded[g];v.length&&v.forEach(x=>{h[g][x]===void 0&&(h[g][x]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(a,s,l,r=0,c=this.retryTimeout,d){if(!a.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:s,fcName:l,tried:r,wait:c,callback:d});return}this.readingCalls++;const h=(g,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(g&&v&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,a,s,l,r+1,c*2,d)},c);return}d(g,v)},p=this.backend[l].bind(this.backend);if(p.length===2){try{const g=p(a,s);g&&typeof g.then=="function"?g.then(v=>h(null,v)).catch(h):h(null,g)}catch(g){h(g)}return}return p(a,s,h)}prepareLoading(a,s,l={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();ce(a)&&(a=this.languageUtils.toResolveHierarchy(a)),ce(s)&&(s=[s]);const c=this.queueLoad(a,s,l,r);if(!c.toLoad.length)return c.pending.length||r(),null;c.toLoad.forEach(d=>{this.loadOne(d)})}load(a,s,l){this.prepareLoading(a,s,{},l)}reload(a,s,l){this.prepareLoading(a,s,{reload:!0},l)}loadOne(a,s=""){const l=a.split("|"),r=l[0],c=l[1];this.read(r,c,"read",void 0,void 0,(d,h)=>{d&&this.logger.warn(`${s}loading namespace ${c} for language ${r} failed`,d),!d&&h&&this.logger.log(`${s}loaded namespace ${c} for language ${r}`,h),this.loaded(a,d,h)})}saveMissing(a,s,l,r,c,d={},h=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${l}" as the namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if(this.backend?.create){const p={...d,isUpdate:c},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(a,s,l,r,p):v=g(a,s,l,r),v&&typeof v.then=="function"?v.then(x=>h(null,x)).catch(h):h(null,v)}catch(v){h(v)}else g(a,s,l,r,h,p)}!a||!a[0]||this.store.addResource(a[0],s,l,r)}}}const Rc=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),ce(n[1])&&(a.defaultValue=n[1]),ce(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const s=n[3]||n[2];Object.keys(s).forEach(l=>{a[l]=s[l]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Yg=n=>(ce(n.ns)&&(n.ns=[n.ns]),ce(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ce(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),wo=()=>{},e2=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(s=>{typeof n[s]=="function"&&(n[s]=n[s].bind(n))})};class Bs extends Zo{constructor(a={},s){if(super(),this.options=Yg(a),this.services={},this.logger=ln,this.modules={external:[]},e2(this),s&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,s),this;setTimeout(()=>{this.init(a,s)},0)}}init(a={},s){this.isInitializing=!0,typeof a=="function"&&(s=a,a={}),a.defaultNS==null&&a.ns&&(ce(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const l=Rc();this.options={...l,...this.options,...Yg(a)},this.options.interpolation={...l.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler);const r=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?ln.init(r(this.modules.logger),this.options):ln.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=JS;const v=new Vg(this.options);this.store=new kg(this.options.resources,this.options);const x=this.services;x.logger=ln,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new $S(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==l.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),g&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(x.formatter=r(g),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new qg(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new WS(r(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(w,...j)=>{this.emit(w,...j)}),this.modules.languageDetector&&(x.languageDetector=r(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=r(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Uo(this.services,this.options),this.translator.on("*",(w,...j)=>{this.emit(w,...j)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,s||(s=wo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...v)=>this.store[g](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...v)=>(this.store[g](...v),this)});const h=Os(),p=()=>{const g=(v,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),s(v,x)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(a,s=wo){let l=s;const r=ce(a)?a:this.language;if(typeof a=="function"&&(l=a),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const c=[],d=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(g=>{g!=="cimode"&&c.indexOf(g)<0&&c.push(g)})};r?d(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>d(p)),this.options.preload?.forEach?.(h=>d(h)),this.services.backendConnector.load(c,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(h)})}else l(null)}reloadResources(a,s,l){const r=Os();return typeof a=="function"&&(l=a,a=void 0),typeof s=="function"&&(l=s,s=void 0),a||(a=this.languages),s||(s=this.options.ns),l||(l=wo),this.services.backendConnector.reload(a,s,c=>{r.resolve(),l(c)}),r}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Rx.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let s=0;s<this.languages.length;s++){const l=this.languages[s];if(!(["cimode","dev"].indexOf(l)>-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,s){this.isLanguageChangingTo=a;const l=Os();this.emit("languageChanging",a);const r=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},c=(h,p)=>{p?this.isLanguageChangingTo===a&&(r(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,l.resolve((...g)=>this.t(...g)),s&&s(h,(...g)=>this.t(...g))},d=h=>{!a&&!h&&this.services.languageDetector&&(h=[]);const p=ce(h)?h:h&&h[0],g=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(ce(h)?[h]:h);g&&(this.language||r(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,v=>{c(v,g)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(a),l}getFixedT(a,s,l){const r=(c,d,...h)=>{let p;typeof d!="object"?p=this.options.overloadTranslationOptionHandler([c,d].concat(h)):p={...d},p.lng=p.lng||r.lng,p.lngs=p.lngs||r.lngs,p.ns=p.ns||r.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||l||r.keyPrefix);const g=this.options.keySeparator||".";let v;return p.keyPrefix&&Array.isArray(c)?v=c.map(x=>(typeof x=="function"&&(x=af(x,{...this.options,...d})),`${p.keyPrefix}${g}${x}`)):(typeof c=="function"&&(c=af(c,{...this.options,...d})),v=p.keyPrefix?`${p.keyPrefix}${g}${c}`:c),this.t(v,p)};return ce(a)?r.lng=a:r.lngs=a,r.ns=s,r.keyPrefix=l,r}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,s={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=s.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const d=(h,p)=>{const g=this.services.backendConnector.state[`${h}|${p}`];return g===-1||g===0||g===2};if(s.precheck){const h=s.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(l,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(l,a)&&(!r||d(c,a)))}loadNamespaces(a,s){const l=Os();return this.options.ns?(ce(a)&&(a=[a]),a.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{l.resolve(),s&&s(r)}),l):(s&&s(),Promise.resolve())}loadLanguages(a,s){const l=Os();ce(a)&&(a=[a]);const r=this.options.preload||[],c=a.filter(d=>r.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return c.length?(this.options.preload=r.concat(c),this.loadResources(d=>{l.resolve(),s&&s(d)}),l):(s&&s(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const r=new Intl.Locale(a);if(r&&r.getTextInfo){const c=r.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=this.services?.languageUtils||new Vg(Rc());return a.toLowerCase().indexOf("-latn")>1?"ltr":s.indexOf(l.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},s){const l=new Bs(a,s);return l.createInstance=Bs.createInstance,l}cloneInstance(a={},s=wo){const l=a.forkResourceStore;l&&delete a.forkResourceStore;const r={...this.options,...a,isClone:!0},c=new Bs(r);if((a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a)),["store","services","language"].forEach(h=>{c[h]=this[h]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},l){const h=Object.keys(this.store.data).reduce((p,g)=>(p[g]={...this.store.data[g]},p[g]=Object.keys(p[g]).reduce((v,x)=>(v[x]={...p[g][x]},v),p[g]),p),{});c.store=new kg(h,r),c.services.resourceStore=c.store}if(a.interpolation){const p={...Rc().interpolation,...this.options.interpolation,...a.interpolation},g={...r,interpolation:p};c.services.interpolator=new qg(g)}return c.translator=new Uo(c.services,r),c.translator.on("*",(h,...p)=>{c.emit(h,...p)}),c.init(r,s),c.translator.options=r,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pt=Bs.createInstance();pt.createInstance;pt.dir;pt.init;pt.loadResources;pt.reloadResources;pt.use;pt.changeLanguage;pt.getFixedT;pt.t;pt.exists;pt.setDefaultNamespace;pt.hasLoadedNamespace;pt.loadNamespaces;pt.loadLanguages;const t2=(n,a,s,l)=>{const r=[s,{code:a,...l||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(r,"warn","react-i18next::",!0);za(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...r):console?.warn&&console.warn(...r)},Pg={},Dx=(n,a,s,l)=>{za(s)&&Pg[s]||(za(s)&&(Pg[s]=new Date),t2(n,a,s,l))},Ox=(n,a)=>()=>{if(n.isInitialized)a();else{const s=()=>{setTimeout(()=>{n.off("initialized",s)},0),a()};n.on("initialized",s)}},sf=(n,a,s)=>{n.loadNamespaces(a,Ox(n,s))},Kg=(n,a,s,l)=>{if(za(s)&&(s=[s]),n.options.preload&&n.options.preload.indexOf(a)>-1)return sf(n,s,l);s.forEach(r=>{n.options.ns.indexOf(r)<0&&n.options.ns.push(r)}),n.loadLanguages(a,Ox(n,l))},n2=(n,a,s={})=>!a.languages||!a.languages.length?(Dx(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:s.lng,precheck:(l,r)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!r(l.isLanguageChangingTo,n))return!1}}),za=n=>typeof n=="string",a2=n=>typeof n=="object"&&n!==null,i2=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,s2={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},l2=n=>s2[n],o2=n=>n.replace(i2,l2);let lf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:o2,transDefaultProps:void 0};const r2=(n={})=>{lf={...lf,...n}},u2=()=>lf;let _x;const c2=n=>{_x=n},f2=()=>_x,d2={type:"3rdParty",init(n){r2(n.options.react),c2(n)}},h2=T.createContext();class m2{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Mc={exports:{}},Dc={};var Xg;function p2(){if(Xg)return Dc;Xg=1;var n=Qo();function a(x,S){return x===S&&(x!==0||1/x===1/S)||x!==x&&S!==S}var s=typeof Object.is=="function"?Object.is:a,l=n.useState,r=n.useEffect,c=n.useLayoutEffect,d=n.useDebugValue;function h(x,S){var w=S(),j=l({inst:{value:w,getSnapshot:S}}),R=j[0].inst,A=j[1];return c(function(){R.value=w,R.getSnapshot=S,p(R)&&A({inst:R})},[x,w,S]),r(function(){return p(R)&&A({inst:R}),x(function(){p(R)&&A({inst:R})})},[x]),d(w),w}function p(x){var S=x.getSnapshot;x=x.value;try{var w=S();return!s(x,w)}catch{return!0}}function g(x,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return Dc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,Dc}var Fg;function g2(){return Fg||(Fg=1,Mc.exports=p2()),Mc.exports}var y2=g2();const x2=(n,a)=>za(a)?a:a2(a)&&za(a.defaultValue)?a.defaultValue:Array.isArray(n)?n[n.length-1]:n,v2={t:x2,ready:!1},b2=()=>()=>{},wt=(n,a={})=>{const{i18n:s}=a,{i18n:l,defaultNS:r}=T.useContext(h2)||{},c=s||l||f2();c&&!c.reportNamespaces&&(c.reportNamespaces=new m2),c||Dx(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=T.useMemo(()=>({...u2(),...c?.options?.react,...a}),[c,a]),{useSuspense:h,keyPrefix:p}=d,g=r||c?.options?.defaultNS,v=za(g)?[g]:g||["translation"],x=T.useMemo(()=>v,v);c?.reportNamespaces?.addUsedNamespaces?.(x);const S=T.useRef(0),w=T.useCallback($=>{if(!c)return b2;const{bindI18n:Z,bindI18nStore:re}=d,de=()=>{S.current+=1,$()};return Z&&c.on(Z,de),re&&c.store.on(re,de),()=>{Z&&Z.split(" ").forEach(W=>c.off(W,de)),re&&re.split(" ").forEach(W=>c.store.off(W,de))}},[c,d]),j=T.useRef(),R=T.useCallback(()=>{if(!c)return v2;const $=!!(c.isInitialized||c.initializedStoreOnce)&&x.every(ie=>n2(ie,c,d)),Z=a.lng||c.language,re=S.current,de=j.current;if(de&&de.ready===$&&de.lng===Z&&de.keyPrefix===p&&de.revision===re)return de;const le={t:c.getFixedT(Z,d.nsMode==="fallback"?x:x[0],p),ready:$,lng:Z,keyPrefix:p,revision:re};return j.current=le,le},[c,x,p,d,a.lng]),[A,_]=T.useState(0),{t:D,ready:L}=y2.useSyncExternalStore(w,R,R);T.useEffect(()=>{if(c&&!L&&!h){const $=()=>_(Z=>Z+1);a.lng?Kg(c,a.lng,x,$):sf(c,x,$)}},[c,a.lng,x,L,h,A]);const F=c||{},H=T.useRef(null),Q=T.useRef(),X=$=>{const Z=Object.getOwnPropertyDescriptors($);Z.__original&&delete Z.__original;const re=Object.create(Object.getPrototypeOf($),Z);if(!Object.prototype.hasOwnProperty.call(re,"__original"))try{Object.defineProperty(re,"__original",{value:$,writable:!1,enumerable:!1,configurable:!1})}catch{}return re},q=T.useMemo(()=>{const $=F,Z=$?.language;let re=$;$&&(H.current&&H.current.__original===$?Q.current!==Z?(re=X($),H.current=re,Q.current=Z):re=H.current:(re=X($),H.current=re,Q.current=Z));const de=[D,re,L];return de.t=D,de.i18n=re,de.ready=L,de},[D,F,L,F.resolvedLanguage,F.language,F.languages]);if(c&&h&&!L)throw new Promise($=>{const Z=()=>$();a.lng?Kg(c,a.lng,x,Z):sf(c,x,Z)});return q},{slice:S2,forEach:T2}=[];function w2(n){return T2.call(S2.call(arguments,1),a=>{if(a)for(const s in a)n[s]===void 0&&(n[s]=a[s])}),n}function C2(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(s=>s.test(n))}const $g=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,j2=function(n,a){const l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(a);let c=`${n}=${r}`;if(l.maxAge>0){const d=l.maxAge-0;if(Number.isNaN(d))throw new Error("maxAge should be a Number");c+=`; Max-Age=${Math.floor(d)}`}if(l.domain){if(!$g.test(l.domain))throw new TypeError("option domain is invalid");c+=`; Domain=${l.domain}`}if(l.path){if(!$g.test(l.path))throw new TypeError("option path is invalid");c+=`; Path=${l.path}`}if(l.expires){if(typeof l.expires.toUTCString!="function")throw new TypeError("option expires is invalid");c+=`; Expires=${l.expires.toUTCString()}`}if(l.httpOnly&&(c+="; HttpOnly"),l.secure&&(c+="; Secure"),l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l.partitioned&&(c+="; Partitioned"),c},Qg={create(n,a,s,l){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+s*60*1e3)),l&&(r.domain=l),document.cookie=j2(n,a,r)},read(n){const a=`${n}=`,s=document.cookie.split(";");for(let l=0;l<s.length;l++){let r=s[l];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(a)===0)return r.substring(a.length,r.length)}return null},remove(n,a){this.create(n,"",-1,a)}};var N2={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return Qg.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:s,cookieMinutes:l,cookieDomain:r,cookieOptions:c}=a;s&&typeof document<"u"&&Qg.create(s,n,l,r,c)}},E2={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,s;if(typeof window<"u"){let{search:l}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(l=window.location.hash.substring(window.location.hash.indexOf("?")));const c=l.substring(1).split("&");for(let d=0;d<c.length;d++){const h=c[d].indexOf("=");h>0&&c[d].substring(0,h)===a&&(s=c[d].substring(h+1))}}return s}},A2={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:s}=n,l;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const c=r.substring(1);if(a){const d=c.split("&");for(let h=0;h<d.length;h++){const p=d[h].indexOf("=");p>0&&d[h].substring(0,p)===a&&(l=d[h].substring(p+1))}}if(l)return l;if(!l&&s>-1){const d=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(d)?d[typeof s=="number"?s:0]?.replace("/",""):void 0}}}return l}};let Ti=null;const Zg=()=>{if(Ti!==null)return Ti;try{if(Ti=typeof window<"u"&&window.localStorage!==null,!Ti)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{Ti=!1}return Ti};var R2={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&Zg())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:s}=a;s&&Zg()&&window.localStorage.setItem(s,n)}};let wi=null;const Jg=()=>{if(wi!==null)return wi;try{if(wi=typeof window<"u"&&window.sessionStorage!==null,!wi)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{wi=!1}return wi};var M2={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&Jg())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:s}=a;s&&Jg()&&window.sessionStorage.setItem(s,n)}},D2={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:s,userLanguage:l,language:r}=navigator;if(s)for(let c=0;c<s.length;c++)a.push(s[c]);l&&a.push(l),r&&a.push(r)}return a.length>0?a:void 0}},O2={name:"htmlTag",lookup(n){let{htmlTag:a}=n,s;const l=a||(typeof document<"u"?document.documentElement:null);return l&&typeof l.getAttribute=="function"&&(s=l.getAttribute("lang")),s}},_2={name:"path",lookup(n){let{lookupFromPathIndex:a}=n;if(typeof window>"u")return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof a=="number"?a:0]?.replace("/",""):void 0}},L2={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const s=typeof a=="number"?a+1:1,l=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(l)return l[s]}};let Lx=!1;try{document.cookie,Lx=!0}catch{}const kx=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Lx||kx.splice(1,1);const k2=()=>({order:kx,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class zx{constructor(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,s)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=w2(s,this.options||{},k2()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=l,this.addDetector(N2),this.addDetector(E2),this.addDetector(R2),this.addDetector(M2),this.addDetector(D2),this.addDetector(O2),this.addDetector(_2),this.addDetector(L2),this.addDetector(A2)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,s=[];return a.forEach(l=>{if(this.detectors[l]){let r=this.detectors[l].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(s=s.concat(r))}}),s=s.filter(l=>l!=null&&!C2(l)).map(l=>this.options.convertDetectedLanguage(l)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}cacheUserLanguage(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||s.forEach(l=>{this.detectors[l]&&this.detectors[l].cacheUserLanguage(a,this.options)}))}}zx.type="languageDetector";const z2={back:"Back",continue:"Continue",save:"Save",cancel:"Cancel",loading:"Loading...",saving:"Saving...",saved:"Saved",saveFailed:"Save failed",enabled:"Enabled",disabled:"Disabled",default:"Default",running:"Running",stopped:"Stopped",unknown:"Unknown",online:"Online",offline:"Offline",public:"Public",private:"Private",notSet:"Not set",notLinked:"Not linked",found:"Found",notFound:"Not Found",notChecked:"Not checked",missing:"Missing",detect:"Detect",detectAll:"Detect all",refresh:"Refresh",start:"Start",stop:"Stop",restart:"Restart",viewDetails:"View details",editSetup:"Edit setup",manageChannels:"Manage channels",viewLogs:"View logs",saveAndRestart:"Save & Restart"},V2={dashboard:"Dashboard",channels:"Channels",doctor:"Doctor"},U2={title:"Vibe Remote"},B2={title:"Vibe Remote Setup"},H2={title:"Set up Vibe Remote",subtitle:"Your local AI coding assistant for Slack.",getStarted:"Get started",feature1:"Runs locally. Your code stays on your computer.",feature2:"SaaS mode uses a cloud relay for Slack delivery, but does not store message content.",feature3:"Self-host mode runs entirely locally via Slack Socket Mode."},q2={title:"Choose Mode",saasMode:"SaaS Mode",saasDescription:"OAuth install + cloud relay + local execution (coming soon).",selfHostMode:"Self-host Mode",selfHostDescription:"Use your own Slack app + Socket Mode tokens."},G2={title:"Slack Configuration",saasDescription:"Authorize the official Slack app and wait for workspace binding.",selfHostDescription:"Create a Slack app and configure tokens for Socket Mode.",oauthPrompt:"Open OAuth in your browser to authorize Vibe Remote with your Slack workspace.",openSlackOAuth:"Open Slack OAuth",afterAuth:"After authorization, return here to continue.",botToken:"Bot User OAuth Token",botTokenPlaceholder:"xoxb-... (paste here)",botTokenHint:"Starts with",appToken:"App-Level Token",appTokenPlaceholder:"xapp-... (paste here)",appTokenHint:"Starts with",validateTokens:"Validate Tokens",tokenValidated:"Tokens validated",authFailed:"Validation failed",tip:"Tip",important:"Important",viewManifest:"View manifest JSON",step1Title:"Create Slack App",step1Description:"Click the button below to create a new Slack app with pre-configured permissions.",step1Tip:"The manifest will be auto-filled. Just select your workspace and click Create.",createSlackApp:"Create Slack App",copyManifest:"Copy Manifest",copied:"Copied!",step2Title:"Get Bot Token",step2Description:"Install the app to your workspace and copy the Bot Token.",step2Item1:"In your new app, go to 'OAuth & Permissions'",step2Item2:"Click 'Install to [Your Workspace]'",step2Item3:"Authorize the app",step2Item4:"Copy the 'Bot User OAuth Token'",step3Title:"Get App Token",step3Description:"Generate an App-Level Token for Socket Mode connection.",step3Item1:"Go to 'Basic Information'",step3Item2:"Scroll to 'App-Level Tokens'",step3Item3:"Click 'Generate Token and Scopes'",step3Item4:"Name it (e.g., 'socket-mode')",step3Item5:"Add 'connections:write' scope and click Generate",step3Warning:"Keep this token secure. It provides full Socket Mode access.",step4Title:"Validate & Finish",step4Description:"Validate your tokens to ensure everything is configured correctly.",inviteBotTitle:"Invite the bot to channels:",step4Item1:"Open a Slack channel",step4Item2:"Type /invite @Vibe Remote",step4Item3:"The bot will now receive messages from this channel",step4Tip:"You can also right-click a channel and select 'Add apps'."},Y2={title:"Agent Configuration",subtitle:"Detect local CLI paths and choose enabled backends.",defaultBackend:"Default Backend",cliPath:"CLI Path",cliPathPlaceholder:"Path to {{name}} CLI...",cliPathDetection:"CLI path detection and enablement",recommended:"(recommended)"},P2={title:"Channel Settings",subtitle:"Enable channels and configure per-channel routing.",refreshList:"Refresh List",cantFindChannel:"Can't find your channel?",inviteBotHint:`Invite the bot to your channel first:
|
|
10
|
+
1. Open the channel, click ⚙️ Settings → Integrations → Add apps
|
|
11
|
+
2. Or type /invite @YourBotName in the channel`,enabledCount:"{{count}} enabled",accessPolicy:"Access Policy",accessPolicyHint:"Channels are enabled only when checked below.",noChannelsFound:"No channels found. Check token or invite bot.",noChannelsLoaded:"No channels loaded.",addTokenFirst:"Add a Slack bot token first to load channels.",workingDirectory:"Working Directory",useGlobalDefault:"Use global default",backend:"Backend",showMessageTypes:"Show Message Types",showMessageTypesHint:`Control which message types are displayed in Slack:
|
|
12
|
+
|
|
13
|
+
• System: Agent startup/status messages
|
|
14
|
+
• Assistant: Agent responses and explanations
|
|
15
|
+
• Toolcall: Tool execution details (one-line summary)
|
|
16
|
+
|
|
17
|
+
Note: The agent's final result is always shown regardless of these settings.`,opencodeSettings:"OpenCode Settings",agent:"Agent",model:"Model",reasoningEffort:"Reasoning Effort",settingsSaved:"Settings saved",settingsSaveFailed:"Failed to save settings",requireMention:"Require @Mention",requireMentionOn:"Require @mention",requireMentionOff:"Don't require @mention"},K2={title:"Review & Finish",subtitle:"Confirm settings and start Vibe Remote.",mode:"Mode",slackBotToken:"Slack Bot Token",slackAppToken:"Slack App Token",enabledAgents:"Enabled Agents",channelsConfigured:"Channels Configured",requireMention:"Require @Mention",requireMentionHint:"Bot only responds when @mentioned in channels",usageTips:"Quick Start Guide",tipStartCommand:"Use @Vibe Remote /start to begin",tipStartCommandDesc:"Type @Vibe Remote /start in any enabled channel to open the control panel.",tipAgentSwitch:"Switch agents instantly",tipAgentSwitchDesc:'Prefix your message with AgentName: to route to a specific agent. E.g., "Plan: Design the API"',tipThread:"Thread = Session",tipThreadDesc:"Each thread is an isolated session. Start multiple threads for parallel tasks.",finishAndStart:"Finish & Start"},X2={title:"Dashboard",subtitle:"Manage your local Vibe Remote instance.",serviceStatus:"Service Status",mode:"Mode",workspace:"Workspace",gateway:"Gateway",health:"Health",allSystemsOperational:"All systems operational",issuesDetected:"Issues detected",globalPolicy:"Global Policy",defaultBackend:"Default Backend",slackWorkspace:"Slack Workspace",messageHandling:"Message Handling",requireMention:"Require Mention",requireMentionHint:"Bot only responds when @mentioned",ackMode:"Ack Mode",ackModeHint:"How bot acknowledges received messages",ackReaction:"👀 Reaction",ackMessage:"Message",errorRetryLimit:"Error Retry Limit",errorRetryLimitHint:"Auto-retry with 'continue' when LLM stream errors occur (0 = no retry)",allowedChannels:"Allowed Channels",consoleServer:"Console Server",host:"Host",port:"Port",diagnostics:"Diagnostics",logLevel:"Log Level",configFile:"Config File",logs:"Logs",uiRestartMessage:"Saved. Restarting UI server...",mainServiceRestarted:"Saved. Main service restarted.",versionAndUpdate:"Version & Update",currentVersion:"Current Version",latestVersion:"Latest Version",checkUpdate:"Check for Updates",checking:"Checking...",updateAvailable:"Update Available",upgradeNow:"Upgrade Now",upgrading:"Upgrading...",upToDate:"You're up to date",checkFailed:"Check failed",upgradeSuccess:"Upgrade successful!",upgradeFailed:"Upgrade failed",updateHint:"Update from {{from}} to {{to}}",restarting:"Restarting..."},F2={title:"System Status",copyReport:"Copy Report",runChecks:"Run Checks",passed:"Passed",warnings:"Warnings",failed:"Failed"},$2={title:"System Logs",autoRefreshOn:"Auto-refresh ON",autoRefresh:"Auto-refresh",searchPlaceholder:"Search logs by message, logger, or timestamp...",allLevels:"All Levels",error:"Error",warning:"Warning",info:"Info",debug:"Debug",all:"All",entriesCount:"{{filtered}} of {{total}} entries",totalInFile:"({{total}} total in file)",jumpToLatest:"Jump to latest",loadingLogs:"Loading logs...",noLogsAvailable:"No logs available",noLogsMatch:"No logs match your filter"},Q2={switchLanguage:"Language",en:"English",zh:"Chinese"},Z2={common:z2,nav:V2,appShell:U2,wizard:B2,welcome:H2,modeSelection:q2,slackConfig:G2,agentDetection:Y2,channelList:P2,summary:K2,dashboard:X2,doctor:F2,logs:$2,language:Q2},J2={back:"返回",continue:"继续",save:"保存",cancel:"取消",loading:"加载中...",saving:"保存中...",saved:"已保存",saveFailed:"保存失败",enabled:"已启用",disabled:"已禁用",default:"默认",running:"运行中",stopped:"已停止",unknown:"未知",online:"在线",offline:"离线",public:"公开",private:"私有",notSet:"未设置",notLinked:"未关联",found:"已找到",notFound:"未找到",notChecked:"未检测",missing:"缺失",detect:"检测",detectAll:"检测全部",refresh:"刷新",start:"启动",stop:"停止",restart:"重启",viewDetails:"查看详情",editSetup:"编辑设置",manageChannels:"管理频道",viewLogs:"查看日志",saveAndRestart:"保存并重启"},I2={dashboard:"仪表盘",channels:"频道",doctor:"诊断"},W2={title:"Vibe Remote"},eT={title:"Vibe Remote 设置向导"},tT={title:"设置 Vibe Remote",subtitle:"为 Slack 打造的本地 AI 编程助手",getStarted:"开始设置",feature1:"本地运行,代码留在您的电脑上",feature2:"SaaS 模式使用云端中继进行 Slack 消息传输,但不会存储消息内容",feature3:"自托管模式通过 Slack Socket Mode 完全在本地运行"},nT={title:"选择模式",saasMode:"SaaS 模式",saasDescription:"OAuth 安装 + 云端中继 + 本地执行(即将推出)",selfHostMode:"自托管模式",selfHostDescription:"使用您自己的 Slack 应用 + Socket Mode 令牌"},aT={title:"Slack 配置",saasDescription:"授权官方 Slack 应用并等待工作区绑定",selfHostDescription:"创建 Slack 应用并配置 Socket Mode 所需的令牌",oauthPrompt:"在浏览器中打开 OAuth 以授权 Vibe Remote 访问您的 Slack 工作区",openSlackOAuth:"打开 Slack OAuth",afterAuth:"授权后返回此处继续",botToken:"Bot 用户 OAuth 令牌",botTokenPlaceholder:"xoxb-...(粘贴至此处)",botTokenHint:"以此开头",appToken:"应用级别令牌",appTokenPlaceholder:"xapp-...(粘贴至此处)",appTokenHint:"以此开头",validateTokens:"验证令牌",tokenValidated:"令牌验证成功",authFailed:"验证失败",tip:"提示",important:"重要",viewManifest:"查看配置清单 JSON",step1Title:"创建 Slack 应用",step1Description:"点击下方按钮,使用预配置的权限创建新的 Slack 应用。",step1Tip:"配置清单会自动填充,只需选择工作区并点击创建。",createSlackApp:"创建 Slack 应用",copyManifest:"复制配置清单",copied:"已复制!",step2Title:"获取 Bot 令牌",step2Description:"将应用安装到工作区并复制 Bot 令牌。",step2Item1:"在新应用中,进入「OAuth & Permissions」",step2Item2:"点击「Install to [你的工作区名称]」",step2Item3:"授权应用",step2Item4:"复制「Bot User OAuth Token」",step3Title:"获取 App 令牌",step3Description:"生成用于 Socket Mode 连接的应用级别令牌。",step3Item1:"进入「Basic Information」",step3Item2:"滚动到「App-Level Tokens」",step3Item3:"点击「Generate Token and Scopes」",step3Item4:"输入名称(如 'socket-mode')",step3Item5:"添加「connections:write」权限范围,然后点击生成",step3Warning:"请妥善保管此令牌,它提供完整的 Socket Mode 访问权限。",step4Title:"验证并完成",step4Description:"验证令牌以确保配置正确。",inviteBotTitle:"邀请机器人加入频道:",step4Item1:"打开一个 Slack 频道",step4Item2:"输入 /invite @Vibe Remote",step4Item3:"机器人现在可以接收此频道的消息了",step4Tip:"也可以右键点击频道,选择「添加应用」。"},iT={title:"Agent 配置",subtitle:"检测本地 CLI 路径并选择启用的后端",defaultBackend:"默认后端",cliPath:"CLI 路径",cliPathPlaceholder:"{{name}} CLI 路径...",cliPathDetection:"CLI 路径检测和启用设置",recommended:"(推荐)"},sT={title:"频道设置",subtitle:"启用频道并配置每个频道的路由",refreshList:"刷新列表",cantFindChannel:"找不到你想要的频道?",inviteBotHint:`请先将 Bot 邀请到频道:
|
|
18
|
+
1. 打开频道,点击 ⚙️ 设置 → 集成 → 添加应用
|
|
19
|
+
2. 或在频道中输入 /invite @你的Bot名称`,enabledCount:"已启用 {{count}} 个",accessPolicy:"访问策略",accessPolicyHint:"只有勾选的频道才会启用",noChannelsFound:"未找到频道,请检查令牌或邀请机器人",noChannelsLoaded:"未加载频道",addTokenFirst:"请先添加 Slack Bot 令牌以加载频道",workingDirectory:"工作目录",useGlobalDefault:"使用全局默认值",backend:"后端",showMessageTypes:"显示的消息类型",showMessageTypesHint:`控制在 Slack 中显示哪些消息类型:
|
|
20
|
+
|
|
21
|
+
• System:Agent 启动/状态消息
|
|
22
|
+
• Assistant:Agent 的回复和解释
|
|
23
|
+
• Toolcall:工具执行详情(单行摘要)
|
|
24
|
+
|
|
25
|
+
注意:Agent 的最终结果消息会始终显示,不受此设置影响。`,opencodeSettings:"OpenCode 设置",agent:"Agent",model:"模型",reasoningEffort:"推理强度",settingsSaved:"设置已保存",settingsSaveFailed:"保存设置失败",requireMention:"需要 @提及",requireMentionOn:"需要 @提及",requireMentionOff:"不需要 @提及"},lT={title:"检查并完成",subtitle:"确认设置并启动 Vibe Remote",mode:"模式",slackBotToken:"Slack Bot 令牌",slackAppToken:"Slack App 令牌",enabledAgents:"已启用的 Agent",channelsConfigured:"已配置的频道",requireMention:"需要 @提及",requireMentionHint:"机器人仅在被 @提及时响应",usageTips:"快速上手",tipStartCommand:"使用 @Vibe Remote /start 开始",tipStartCommandDesc:"在任意已启用的频道输入 @Vibe Remote /start 打开控制面板。",tipAgentSwitch:"即时切换 Agent",tipAgentSwitchDesc:'在消息前加 AgentName: 前缀即可路由到指定 Agent,如 "Plan: 设计 API"',tipThread:"Thread = 会话",tipThreadDesc:"每个 Thread 是独立会话,可开多个 Thread 并行执行任务。",finishAndStart:"完成并启动"},oT={title:"仪表盘",subtitle:"管理您的本地 Vibe Remote 实例",serviceStatus:"服务状态",mode:"模式",workspace:"工作区",gateway:"网关",health:"健康状态",allSystemsOperational:"所有系统正常运行",issuesDetected:"检测到问题",globalPolicy:"全局策略",defaultBackend:"默认后端",slackWorkspace:"Slack 工作区",messageHandling:"消息处理",requireMention:"需要 @提及",requireMentionHint:"机器人仅在被 @提及时响应",ackMode:"确认模式",ackModeHint:"机器人如何确认收到的消息",ackReaction:"👀 表情回应",ackMessage:"消息回复",errorRetryLimit:"错误重试次数",errorRetryLimitHint:"当 LLM 流式响应出错时,自动发送 'continue' 重试(0 = 不重试)",allowedChannels:"允许的频道",consoleServer:"控制台服务器",host:"主机",port:"端口",diagnostics:"诊断",logLevel:"日志级别",configFile:"配置文件",logs:"日志",uiRestartMessage:"已保存,正在重启 UI 服务器...",mainServiceRestarted:"已保存,主服务已重启",versionAndUpdate:"版本与更新",currentVersion:"当前版本",latestVersion:"最新版本",checkUpdate:"检查更新",checking:"检查中...",updateAvailable:"有新版本",upgradeNow:"立即更新",upgrading:"更新中...",upToDate:"已是最新版本",checkFailed:"检查失败",upgradeSuccess:"更新成功!",upgradeFailed:"更新失败",updateHint:"从 {{from}} 更新到 {{to}}",restarting:"正在重启..."},rT={title:"系统状态",copyReport:"复制报告",runChecks:"运行检查",passed:"通过",warnings:"警告",failed:"失败"},uT={title:"系统日志",autoRefreshOn:"自动刷新已开启",autoRefresh:"自动刷新",searchPlaceholder:"按消息、记录器或时间戳搜索日志...",allLevels:"所有级别",error:"错误",warning:"警告",info:"信息",debug:"调试",all:"全部",entriesCount:"{{filtered}} / {{total}} 条",totalInFile:"(文件中共 {{total}} 条)",jumpToLatest:"跳转到最新",loadingLogs:"加载日志中...",noLogsAvailable:"暂无日志",noLogsMatch:"没有匹配的日志"},cT={switchLanguage:"语言",en:"English",zh:"中文"},fT={common:J2,nav:I2,appShell:W2,wizard:eT,welcome:tT,modeSelection:nT,slackConfig:aT,agentDetection:iT,channelList:sT,summary:lT,dashboard:oT,doctor:rT,logs:uT,language:cT},dT={en:{translation:Z2},zh:{translation:fT}};pt.use(zx).use(d2).init({resources:dT,fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});var Ig="popstate";function hT(n={}){function a(l,r){let{pathname:c,search:d,hash:h}=l.location;return of("",{pathname:c,search:d,hash:h},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function s(l,r){return typeof r=="string"?r:Xs(r)}return pT(a,s,null,n)}function Be(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function $t(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function mT(){return Math.random().toString(36).substring(2,10)}function Wg(n,a){return{usr:n.state,key:n.key,idx:a}}function of(n,a,s=null,l){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Di(a):a,state:s,key:a&&a.key||l||mT()}}function Xs({pathname:n="/",search:a="",hash:s=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function Di(n){let a={};if(n){let s=n.indexOf("#");s>=0&&(a.hash=n.substring(s),n=n.substring(0,s));let l=n.indexOf("?");l>=0&&(a.search=n.substring(l),n=n.substring(0,l)),n&&(a.pathname=n)}return a}function pT(n,a,s,l={}){let{window:r=document.defaultView,v5Compat:c=!1}=l,d=r.history,h="POP",p=null,g=v();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function v(){return(d.state||{idx:null}).idx}function x(){h="POP";let A=v(),_=A==null?null:A-g;g=A,p&&p({action:h,location:R.location,delta:_})}function S(A,_){h="PUSH";let D=of(R.location,A,_);g=v()+1;let L=Wg(D,g),F=R.createHref(D);try{d.pushState(L,"",F)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;r.location.assign(F)}c&&p&&p({action:h,location:R.location,delta:1})}function w(A,_){h="REPLACE";let D=of(R.location,A,_);g=v();let L=Wg(D,g),F=R.createHref(D);d.replaceState(L,"",F),c&&p&&p({action:h,location:R.location,delta:0})}function j(A){return gT(A)}let R={get action(){return h},get location(){return n(r,d)},listen(A){if(p)throw new Error("A history only accepts one active listener");return r.addEventListener(Ig,x),p=A,()=>{r.removeEventListener(Ig,x),p=null}},createHref(A){return a(r,A)},createURL:j,encodeLocation(A){let _=j(A);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:S,replace:w,go(A){return d.go(A)}};return R}function gT(n,a=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Be(s,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:Xs(n);return l=l.replace(/ $/,"%20"),!a&&l.startsWith("//")&&(l=s+l),new URL(l,s)}function Vx(n,a,s="/"){return yT(n,a,s,!1)}function yT(n,a,s,l){let r=typeof a=="string"?Di(a):a,c=Mn(r.pathname||"/",s);if(c==null)return null;let d=Ux(n);xT(d);let h=null;for(let p=0;h==null&&p<d.length;++p){let g=RT(c);h=ET(d[p],g,l)}return h}function Ux(n,a=[],s=[],l="",r=!1){let c=(d,h,p=r,g)=>{let v={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(l)&&p)return;Be(v.relativePath.startsWith(l),`Absolute route path "${v.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(l.length)}let x=An([l,v.relativePath]),S=s.concat(v);d.children&&d.children.length>0&&(Be(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Ux(d.children,a,S,x,p)),!(d.path==null&&!d.index)&&a.push({path:x,score:jT(x,d.index),routesMeta:S})};return n.forEach((d,h)=>{if(d.path===""||!d.path?.includes("?"))c(d,h);else for(let p of Bx(d.path))c(d,h,!0,p)}),a}function Bx(n){let a=n.split("/");if(a.length===0)return[];let[s,...l]=a,r=s.endsWith("?"),c=s.replace(/\?$/,"");if(l.length===0)return r?[c,""]:[c];let d=Bx(l.join("/")),h=[];return h.push(...d.map(p=>p===""?c:[c,p].join("/"))),r&&h.push(...d),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function xT(n){n.sort((a,s)=>a.score!==s.score?s.score-a.score:NT(a.routesMeta.map(l=>l.childrenIndex),s.routesMeta.map(l=>l.childrenIndex)))}var vT=/^:[\w-]+$/,bT=3,ST=2,TT=1,wT=10,CT=-2,ey=n=>n==="*";function jT(n,a){let s=n.split("/"),l=s.length;return s.some(ey)&&(l+=CT),a&&(l+=ST),s.filter(r=>!ey(r)).reduce((r,c)=>r+(vT.test(c)?bT:c===""?TT:wT),l)}function NT(n,a){return n.length===a.length&&n.slice(0,-1).every((l,r)=>l===a[r])?n[n.length-1]-a[a.length-1]:0}function ET(n,a,s=!1){let{routesMeta:l}=n,r={},c="/",d=[];for(let h=0;h<l.length;++h){let p=l[h],g=h===l.length-1,v=c==="/"?a:a.slice(c.length)||"/",x=Bo({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},v),S=p.route;if(!x&&g&&s&&!l[l.length-1].route.index&&(x=Bo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!x)return null;Object.assign(r,x.params),d.push({params:r,pathname:An([c,x.pathname]),pathnameBase:_T(An([c,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(c=An([c,x.pathnameBase]))}return d}function Bo(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,l]=AT(n.path,n.caseSensitive,n.end),r=a.match(s);if(!r)return null;let c=r[0],d=c.replace(/(.)\/+$/,"$1"),h=r.slice(1);return{params:l.reduce((g,{paramName:v,isOptional:x},S)=>{if(v==="*"){let j=h[S]||"";d=c.slice(0,c.length-j.length).replace(/(.)\/+$/,"$1")}const w=h[S];return x&&!w?g[v]=void 0:g[v]=(w||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:n}}function AT(n,a=!1,s=!0){$t(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(l.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),l]}function RT(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return $t(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Mn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let s=a.endsWith("/")?a.length-1:a.length,l=n.charAt(s);return l&&l!=="/"?null:n.slice(s)||"/"}var Hx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,MT=n=>Hx.test(n);function DT(n,a="/"){let{pathname:s,search:l="",hash:r=""}=typeof n=="string"?Di(n):n,c;if(s)if(MT(s))c=s;else{if(s.includes("//")){let d=s;s=s.replace(/\/\/+/g,"/"),$t(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${s}`)}s.startsWith("/")?c=ty(s.substring(1),"/"):c=ty(s,a)}else c=a;return{pathname:c,search:LT(l),hash:kT(r)}}function ty(n,a){let s=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?s.length>1&&s.pop():r!=="."&&s.push(r)}),s.length>1?s.join("/"):"/"}function Oc(n,a,s,l){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function OT(n){return n.filter((a,s)=>s===0||a.route.path&&a.route.path.length>0)}function Df(n){let a=OT(n);return a.map((s,l)=>l===a.length-1?s.pathname:s.pathnameBase)}function Of(n,a,s,l=!1){let r;typeof n=="string"?r=Di(n):(r={...n},Be(!r.pathname||!r.pathname.includes("?"),Oc("?","pathname","search",r)),Be(!r.pathname||!r.pathname.includes("#"),Oc("#","pathname","hash",r)),Be(!r.search||!r.search.includes("#"),Oc("#","search","hash",r)));let c=n===""||r.pathname==="",d=c?"/":r.pathname,h;if(d==null)h=s;else{let x=a.length-1;if(!l&&d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),x-=1;r.pathname=S.join("/")}h=x>=0?a[x]:"/"}let p=DT(r,h),g=d&&d!=="/"&&d.endsWith("/"),v=(c||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(g||v)&&(p.pathname+="/"),p}var An=n=>n.join("/").replace(/\/\/+/g,"/"),_T=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),LT=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,kT=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,zT=class{constructor(n,a,s,l=!1){this.status=n,this.statusText=a||"",this.internal=l,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function VT(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function UT(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gx(n,a){let s=n;if(typeof s!="string"||!Hx.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let l=s,r=!1;if(qx)try{let c=new URL(window.location.href),d=s.startsWith("//")?new URL(c.protocol+s):new URL(s),h=Mn(d.pathname,a);d.origin===c.origin&&h!=null?s=h+d.search+d.hash:r=!0}catch{$t(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:r,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Yx=["POST","PUT","PATCH","DELETE"];new Set(Yx);var BT=["GET",...Yx];new Set(BT);var Oi=T.createContext(null);Oi.displayName="DataRouter";var Jo=T.createContext(null);Jo.displayName="DataRouterState";var HT=T.createContext(!1),Px=T.createContext({isTransitioning:!1});Px.displayName="ViewTransition";var qT=T.createContext(new Map);qT.displayName="Fetchers";var GT=T.createContext(null);GT.displayName="Await";var Lt=T.createContext(null);Lt.displayName="Navigation";var Is=T.createContext(null);Is.displayName="Location";var en=T.createContext({outlet:null,matches:[],isDataRoute:!1});en.displayName="Route";var _f=T.createContext(null);_f.displayName="RouteError";var Kx="REACT_ROUTER_ERROR",YT="REDIRECT",PT="ROUTE_ERROR_RESPONSE";function KT(n){if(n.startsWith(`${Kx}:${YT}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function XT(n){if(n.startsWith(`${Kx}:${PT}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new zT(a.status,a.statusText,a.data)}catch{}}function FT(n,{relative:a}={}){Be(_i(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:l}=T.useContext(Lt),{hash:r,pathname:c,search:d}=Ws(n,{relative:a}),h=c;return s!=="/"&&(h=c==="/"?s:An([s,c])),l.createHref({pathname:h,search:d,hash:r})}function _i(){return T.useContext(Is)!=null}function On(){return Be(_i(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Is).location}var Xx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fx(n){T.useContext(Lt).static||T.useLayoutEffect(n)}function Lf(){let{isDataRoute:n}=T.useContext(en);return n?rw():$T()}function $T(){Be(_i(),"useNavigate() may be used only in the context of a <Router> component.");let n=T.useContext(Oi),{basename:a,navigator:s}=T.useContext(Lt),{matches:l}=T.useContext(en),{pathname:r}=On(),c=JSON.stringify(Df(l)),d=T.useRef(!1);return Fx(()=>{d.current=!0}),T.useCallback((p,g={})=>{if($t(d.current,Xx),!d.current)return;if(typeof p=="number"){s.go(p);return}let v=Of(p,JSON.parse(c),r,g.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:An([a,v.pathname])),(g.replace?s.replace:s.push)(v,g.state,g)},[a,s,c,r,n])}var QT=T.createContext(null);function ZT(n){let a=T.useContext(en).outlet;return T.useMemo(()=>a&&T.createElement(QT.Provider,{value:n},a),[a,n])}function Ws(n,{relative:a}={}){let{matches:s}=T.useContext(en),{pathname:l}=On(),r=JSON.stringify(Df(s));return T.useMemo(()=>Of(n,JSON.parse(r),l,a==="path"),[n,r,l,a])}function JT(n,a){return $x(n,a)}function $x(n,a,s,l,r){Be(_i(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=T.useContext(Lt),{matches:d}=T.useContext(en),h=d[d.length-1],p=h?h.params:{},g=h?h.pathname:"/",v=h?h.pathnameBase:"/",x=h&&h.route;{let D=x&&x.path||"";Zx(g,!x||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${D}">) 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.
|
|
26
|
+
|
|
27
|
+
Please change the parent <Route path="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let S=On(),w;if(a){let D=typeof a=="string"?Di(a):a;Be(v==="/"||D.pathname?.startsWith(v),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${D.pathname}" was given in the \`location\` prop.`),w=D}else w=S;let j=w.pathname||"/",R=j;if(v!=="/"){let D=v.replace(/^\//,"").split("/");R="/"+j.replace(/^\//,"").split("/").slice(D.length).join("/")}let A=Vx(n,{pathname:R});$t(x||A!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),$t(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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.`);let _=nw(A&&A.map(D=>Object.assign({},D,{params:Object.assign({},p,D.params),pathname:An([v,c.encodeLocation?c.encodeLocation(D.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?v:An([v,c.encodeLocation?c.encodeLocation(D.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathnameBase])})),d,s,l,r);return a&&_?T.createElement(Is.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},_):_}function IT(){let n=ow(),a=VT(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:l},c={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:c},"ErrorBoundary")," or"," ",T.createElement("code",{style:c},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},a),s?T.createElement("pre",{style:r},s):null,d)}var WT=T.createElement(IT,null),Qx=class extends T.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=XT(n.digest);s&&(n=s)}let a=n!==void 0?T.createElement(en.Provider,{value:this.props.routeContext},T.createElement(_f.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?T.createElement(ew,{error:n},a):a}};Qx.contextType=HT;var _c=new WeakMap;function ew({children:n,error:a}){let{basename:s}=T.useContext(Lt);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let l=KT(a.digest);if(l){let r=_c.get(a);if(r)throw r;let c=Gx(l.location,s);if(qx&&!_c.get(a))if(c.isExternal||l.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:l.replace}));throw _c.set(a,d),d}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function tw({routeContext:n,match:a,children:s}){let l=T.useContext(Oi);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),T.createElement(en.Provider,{value:n},s)}function nw(n,a=[],s=null,l=null,r=null){if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(a.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let c=n,d=s?.errors;if(d!=null){let v=c.findIndex(x=>x.route.id&&d?.[x.route.id]!==void 0);Be(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,v+1))}let h=!1,p=-1;if(s)for(let v=0;v<c.length;v++){let x=c[v];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(p=v),x.route.id){let{loaderData:S,errors:w}=s,j=x.route.loader&&!S.hasOwnProperty(x.route.id)&&(!w||w[x.route.id]===void 0);if(x.route.lazy||j){h=!0,p>=0?c=c.slice(0,p+1):c=[c[0]];break}}}let g=s&&l?(v,x)=>{l(v,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:UT(s.matches),errorInfo:x})}:void 0;return c.reduceRight((v,x,S)=>{let w,j=!1,R=null,A=null;s&&(w=d&&x.route.id?d[x.route.id]:void 0,R=x.route.errorElement||WT,h&&(p<0&&S===0?(Zx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,A=null):p===S&&(j=!0,A=x.route.hydrateFallbackElement||null)));let _=a.concat(c.slice(0,S+1)),D=()=>{let L;return w?L=R:j?L=A:x.route.Component?L=T.createElement(x.route.Component,null):x.route.element?L=x.route.element:L=v,T.createElement(tw,{match:x,routeContext:{outlet:v,matches:_,isDataRoute:s!=null},children:L})};return s&&(x.route.ErrorBoundary||x.route.errorElement||S===0)?T.createElement(Qx,{location:s.location,revalidation:s.revalidation,component:R,error:w,children:D(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:g}):D()},null)}function kf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aw(n){let a=T.useContext(Oi);return Be(a,kf(n)),a}function iw(n){let a=T.useContext(Jo);return Be(a,kf(n)),a}function sw(n){let a=T.useContext(en);return Be(a,kf(n)),a}function zf(n){let a=sw(n),s=a.matches[a.matches.length-1];return Be(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function lw(){return zf("useRouteId")}function ow(){let n=T.useContext(_f),a=iw("useRouteError"),s=zf("useRouteError");return n!==void 0?n:a.errors?.[s]}function rw(){let{router:n}=aw("useNavigate"),a=zf("useNavigate"),s=T.useRef(!1);return Fx(()=>{s.current=!0}),T.useCallback(async(r,c={})=>{$t(s.current,Xx),s.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...c}))},[n,a])}var ny={};function Zx(n,a,s){!a&&!ny[n]&&(ny[n]=!0,$t(!1,s))}T.memo(uw);function uw({routes:n,future:a,state:s,onError:l}){return $x(n,void 0,s,l,a)}function Jx({to:n,replace:a,state:s,relative:l}){Be(_i(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=T.useContext(Lt);$t(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=T.useContext(en),{pathname:d}=On(),h=Lf(),p=Of(n,Df(c),d,l==="path"),g=JSON.stringify(p);return T.useEffect(()=>{h(JSON.parse(g),{replace:a,state:s,relative:l})},[h,g,l,a,s]),null}function ay(n){return ZT(n.context)}function sa(n){Be(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function cw({basename:n="/",children:a=null,location:s,navigationType:l="POP",navigator:r,static:c=!1,unstable_useTransitions:d}){Be(!_i(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),p=T.useMemo(()=>({basename:h,navigator:r,static:c,unstable_useTransitions:d,future:{}}),[h,r,c,d]);typeof s=="string"&&(s=Di(s));let{pathname:g="/",search:v="",hash:x="",state:S=null,key:w="default"}=s,j=T.useMemo(()=>{let R=Mn(g,h);return R==null?null:{location:{pathname:R,search:v,hash:x,state:S,key:w},navigationType:l}},[h,g,v,x,S,w,l]);return $t(j!=null,`<Router basename="${h}"> is not able to match the URL "${g}${v}${x}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:T.createElement(Lt.Provider,{value:p},T.createElement(Is.Provider,{children:a,value:j}))}function fw({children:n,location:a}){return JT(rf(n),a)}function rf(n,a=[]){let s=[];return T.Children.forEach(n,(l,r)=>{if(!T.isValidElement(l))return;let c=[...a,r];if(l.type===T.Fragment){s.push.apply(s,rf(l.props.children,c));return}Be(l.type===sa,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!l.props.index||!l.props.children,"An index route cannot have child routes.");let d={id:l.props.id||c.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(d.children=rf(l.props.children,c)),s.push(d)}),s}var Mo="get",Do="application/x-www-form-urlencoded";function Io(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function dw(n){return Io(n)&&n.tagName.toLowerCase()==="button"}function hw(n){return Io(n)&&n.tagName.toLowerCase()==="form"}function mw(n){return Io(n)&&n.tagName.toLowerCase()==="input"}function pw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function gw(n,a){return n.button===0&&(!a||a==="_self")&&!pw(n)}var Co=null;function yw(){if(Co===null)try{new FormData(document.createElement("form"),0),Co=!1}catch{Co=!0}return Co}var xw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lc(n){return n!=null&&!xw.has(n)?($t(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Do}"`),null):n}function vw(n,a){let s,l,r,c,d;if(hw(n)){let h=n.getAttribute("action");l=h?Mn(h,a):null,s=n.getAttribute("method")||Mo,r=Lc(n.getAttribute("enctype"))||Do,c=new FormData(n)}else if(dw(n)||mw(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||h.getAttribute("action");if(l=p?Mn(p,a):null,s=n.getAttribute("formmethod")||h.getAttribute("method")||Mo,r=Lc(n.getAttribute("formenctype"))||Lc(h.getAttribute("enctype"))||Do,c=new FormData(h,n),!yw()){let{name:g,type:v,value:x}=n;if(v==="image"){let S=g?`${g}.`:"";c.append(`${S}x`,"0"),c.append(`${S}y`,"0")}else g&&c.append(g,x)}}else{if(Io(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Mo,l=null,r=Do,d=n}return c&&r==="text/plain"&&(d=c,c=void 0),{action:l,method:s.toLowerCase(),encType:r,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Vf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function bw(n,a,s,l){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${l}`:r.pathname=`${r.pathname}.${l}`:r.pathname==="/"?r.pathname=`_root.${l}`:a&&Mn(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${l}`,r}async function Sw(n,a){if(n.id in a)return a[n.id];try{let s=await import(n.module);return a[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Tw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function ww(n,a,s){let l=await Promise.all(n.map(async r=>{let c=a.routes[r.route.id];if(c){let d=await Sw(c,s);return d.links?d.links():[]}return[]}));return Ew(l.flat(1).filter(Tw).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function iy(n,a,s,l,r,c){let d=(p,g)=>s[g]?p.route.id!==s[g].route.id:!0,h=(p,g)=>s[g].pathname!==p.pathname||s[g].route.path?.endsWith("*")&&s[g].params["*"]!==p.params["*"];return c==="assets"?a.filter((p,g)=>d(p,g)||h(p,g)):c==="data"?a.filter((p,g)=>{let v=l.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(d(p,g)||h(p,g))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function Cw(n,a,{includeHydrateFallback:s}={}){return jw(n.map(l=>{let r=a.routes[l.route.id];if(!r)return[];let c=[r.module];return r.clientActionModule&&(c=c.concat(r.clientActionModule)),r.clientLoaderModule&&(c=c.concat(r.clientLoaderModule)),s&&r.hydrateFallbackModule&&(c=c.concat(r.hydrateFallbackModule)),r.imports&&(c=c.concat(r.imports)),c}).flat(1))}function jw(n){return[...new Set(n)]}function Nw(n){let a={},s=Object.keys(n).sort();for(let l of s)a[l]=n[l];return a}function Ew(n,a){let s=new Set;return new Set(a),n.reduce((l,r)=>{let c=JSON.stringify(Nw(r));return s.has(c)||(s.add(c),l.push({key:c,link:r})),l},[])}function Ix(){let n=T.useContext(Oi);return Vf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Aw(){let n=T.useContext(Jo);return Vf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Uf=T.createContext(void 0);Uf.displayName="FrameworkContext";function Wx(){let n=T.useContext(Uf);return Vf(n,"You must render this element inside a <HydratedRouter> element"),n}function Rw(n,a){let s=T.useContext(Uf),[l,r]=T.useState(!1),[c,d]=T.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:g,onMouseLeave:v,onTouchStart:x}=a,S=T.useRef(null);T.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let R=_=>{_.forEach(D=>{d(D.isIntersecting)})},A=new IntersectionObserver(R,{threshold:.5});return S.current&&A.observe(S.current),()=>{A.disconnect()}}},[n]),T.useEffect(()=>{if(l){let R=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(R)}}},[l]);let w=()=>{r(!0)},j=()=>{r(!1),d(!1)};return s?n!=="intent"?[c,S,{}]:[c,S,{onFocus:_s(h,w),onBlur:_s(p,j),onMouseEnter:_s(g,w),onMouseLeave:_s(v,j),onTouchStart:_s(x,w)}]:[!1,S,{}]}function _s(n,a){return s=>{n&&n(s),s.defaultPrevented||a(s)}}function Mw({page:n,...a}){let{router:s}=Ix(),l=T.useMemo(()=>Vx(s.routes,n,s.basename),[s.routes,n,s.basename]);return l?T.createElement(Ow,{page:n,matches:l,...a}):null}function Dw(n){let{manifest:a,routeModules:s}=Wx(),[l,r]=T.useState([]);return T.useEffect(()=>{let c=!1;return ww(n,a,s).then(d=>{c||r(d)}),()=>{c=!0}},[n,a,s]),l}function Ow({page:n,matches:a,...s}){let l=On(),{future:r,manifest:c,routeModules:d}=Wx(),{basename:h}=Ix(),{loaderData:p,matches:g}=Aw(),v=T.useMemo(()=>iy(n,a,g,c,l,"data"),[n,a,g,c,l]),x=T.useMemo(()=>iy(n,a,g,c,l,"assets"),[n,a,g,c,l]),S=T.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let R=new Set,A=!1;if(a.forEach(D=>{let L=c.routes[D.route.id];!L||!L.hasLoader||(!v.some(F=>F.route.id===D.route.id)&&D.route.id in p&&d[D.route.id]?.shouldRevalidate||L.hasClientLoader?A=!0:R.add(D.route.id))}),R.size===0)return[];let _=bw(n,h,r.unstable_trailingSlashAwareDataRequests,"data");return A&&R.size>0&&_.searchParams.set("_routes",a.filter(D=>R.has(D.route.id)).map(D=>D.route.id).join(",")),[_.pathname+_.search]},[h,r.unstable_trailingSlashAwareDataRequests,p,l,c,v,a,n,d]),w=T.useMemo(()=>Cw(x,c),[x,c]),j=Dw(x);return T.createElement(T.Fragment,null,S.map(R=>T.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...s})),w.map(R=>T.createElement("link",{key:R,rel:"modulepreload",href:R,...s})),j.map(({key:R,link:A})=>T.createElement("link",{key:R,nonce:s.nonce,...A})))}function _w(...n){return a=>{n.forEach(s=>{typeof s=="function"?s(a):s!=null&&(s.current=a)})}}var Lw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Lw&&(window.__reactRouterVersion="7.12.0")}catch{}function kw({basename:n,children:a,unstable_useTransitions:s,window:l}){let r=T.useRef();r.current==null&&(r.current=hT({window:l,v5Compat:!0}));let c=r.current,[d,h]=T.useState({action:c.action,location:c.location}),p=T.useCallback(g=>{s===!1?h(g):T.startTransition(()=>h(g))},[s]);return T.useLayoutEffect(()=>c.listen(p),[c,p]),T.createElement(cw,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:s})}var ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oa=T.forwardRef(function({onClick:a,discover:s="render",prefetch:l="none",relative:r,reloadDocument:c,replace:d,state:h,target:p,to:g,preventScrollReset:v,viewTransition:x,unstable_defaultShouldRevalidate:S,...w},j){let{basename:R,unstable_useTransitions:A}=T.useContext(Lt),_=typeof g=="string"&&ev.test(g),D=Gx(g,R);g=D.to;let L=FT(g,{relative:r}),[F,H,Q]=Rw(l,w),X=Uw(g,{replace:d,state:h,target:p,preventScrollReset:v,relative:r,viewTransition:x,unstable_defaultShouldRevalidate:S,unstable_useTransitions:A});function q(Z){a&&a(Z),Z.defaultPrevented||X(Z)}let $=T.createElement("a",{...w,...Q,href:D.absoluteURL||L,onClick:D.isExternal||c?a:q,ref:_w(j,H),target:p,"data-discover":!_&&s==="render"?"true":void 0});return F&&!_?T.createElement(T.Fragment,null,$,T.createElement(Mw,{page:L})):$});Oa.displayName="Link";var Hs=T.forwardRef(function({"aria-current":a="page",caseSensitive:s=!1,className:l="",end:r=!1,style:c,to:d,viewTransition:h,children:p,...g},v){let x=Ws(d,{relative:g.relative}),S=On(),w=T.useContext(Jo),{navigator:j,basename:R}=T.useContext(Lt),A=w!=null&&Yw(x)&&h===!0,_=j.encodeLocation?j.encodeLocation(x).pathname:x.pathname,D=S.pathname,L=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;s||(D=D.toLowerCase(),L=L?L.toLowerCase():null,_=_.toLowerCase()),L&&R&&(L=Mn(L,R)||L);const F=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let H=D===_||!r&&D.startsWith(_)&&D.charAt(F)==="/",Q=L!=null&&(L===_||!r&&L.startsWith(_)&&L.charAt(_.length)==="/"),X={isActive:H,isPending:Q,isTransitioning:A},q=H?a:void 0,$;typeof l=="function"?$=l(X):$=[l,H?"active":null,Q?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let Z=typeof c=="function"?c(X):c;return T.createElement(Oa,{...g,"aria-current":q,className:$,ref:v,style:Z,to:d,viewTransition:h},typeof p=="function"?p(X):p)});Hs.displayName="NavLink";var zw=T.forwardRef(({discover:n="render",fetcherKey:a,navigate:s,reloadDocument:l,replace:r,state:c,method:d=Mo,action:h,onSubmit:p,relative:g,preventScrollReset:v,viewTransition:x,unstable_defaultShouldRevalidate:S,...w},j)=>{let{unstable_useTransitions:R}=T.useContext(Lt),A=qw(),_=Gw(h,{relative:g}),D=d.toLowerCase()==="get"?"get":"post",L=typeof h=="string"&&ev.test(h),F=H=>{if(p&&p(H),H.defaultPrevented)return;H.preventDefault();let Q=H.nativeEvent.submitter,X=Q?.getAttribute("formmethod")||d,q=()=>A(Q||H.currentTarget,{fetcherKey:a,method:X,navigate:s,replace:r,state:c,relative:g,preventScrollReset:v,viewTransition:x,unstable_defaultShouldRevalidate:S});R&&s!==!1?T.startTransition(()=>q()):q()};return T.createElement("form",{ref:j,method:D,action:_,onSubmit:l?p:F,...w,"data-discover":!L&&n==="render"?"true":void 0})});zw.displayName="Form";function Vw(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tv(n){let a=T.useContext(Oi);return Be(a,Vw(n)),a}function Uw(n,{target:a,replace:s,state:l,preventScrollReset:r,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p}={}){let g=Lf(),v=On(),x=Ws(n,{relative:c});return T.useCallback(S=>{if(gw(S,a)){S.preventDefault();let w=s!==void 0?s:Xs(v)===Xs(x),j=()=>g(n,{replace:w,state:l,preventScrollReset:r,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h});p?T.startTransition(()=>j()):j()}},[v,g,x,s,l,a,n,r,c,d,h,p])}var Bw=0,Hw=()=>`__${String(++Bw)}__`;function qw(){let{router:n}=tv("useSubmit"),{basename:a}=T.useContext(Lt),s=lw(),l=n.fetch,r=n.navigate;return T.useCallback(async(c,d={})=>{let{action:h,method:p,encType:g,formData:v,body:x}=vw(c,a);if(d.navigate===!1){let S=d.fetcherKey||Hw();await l(S,s,d.action||h,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:x,formMethod:d.method||p,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||h,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:x,formMethod:d.method||p,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:s,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,r,a,s])}function Gw(n,{relative:a}={}){let{basename:s}=T.useContext(Lt),l=T.useContext(en);Be(l,"useFormAction must be used inside a RouteContext");let[r]=l.matches.slice(-1),c={...Ws(n||".",{relative:a})},d=On();if(n==null){c.search=d.search;let h=new URLSearchParams(c.search),p=h.getAll("index");if(p.some(v=>v==="")){h.delete("index"),p.filter(x=>x).forEach(x=>h.append("index",x));let v=h.toString();c.search=v?`?${v}`:""}}return(!n||n===".")&&r.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(c.pathname=c.pathname==="/"?s:An([s,c.pathname])),Xs(c)}function Yw(n,{relative:a}={}){let s=T.useContext(Px);Be(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=tv("useViewTransitionState"),r=Ws(n,{relative:a});if(!s.isTransitioning)return!1;let c=Mn(s.currentLocation.pathname,l)||s.currentLocation.pathname,d=Mn(s.nextLocation.pathname,l)||s.nextLocation.pathname;return Bo(r.pathname,d)!=null||Bo(r.pathname,c)!=null}const Bf=T.createContext({});function Hf(n){const a=T.useRef(null);return a.current===null&&(a.current=n()),a.current}const nv=typeof window<"u",av=nv?T.useLayoutEffect:T.useEffect,Wo=T.createContext(null);function qf(n,a){n.indexOf(a)===-1&&n.push(a)}function Gf(n,a){const s=n.indexOf(a);s>-1&&n.splice(s,1)}const rn=(n,a,s)=>s>a?a:s<n?n:s;let Yf=()=>{};const Dn={},iv=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function sv(n){return typeof n=="object"&&n!==null}const lv=n=>/^0[^.\s]+$/u.test(n);function Pf(n){let a;return()=>(a===void 0&&(a=n()),a)}const Ft=n=>n,Pw=(n,a)=>s=>a(n(s)),el=(...n)=>n.reduce(Pw),Fs=(n,a,s)=>{const l=a-n;return l===0?1:(s-n)/l};class Kf{constructor(){this.subscriptions=[]}add(a){return qf(this.subscriptions,a),()=>Gf(this.subscriptions,a)}notify(a,s,l){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,s,l);else for(let c=0;c<r;c++){const d=this.subscriptions[c];d&&d(a,s,l)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rn=n=>n*1e3,Xt=n=>n/1e3;function ov(n,a){return a?n*(1e3/a):0}const rv=(n,a,s)=>(((1-3*s+3*a)*n+(3*s-6*a))*n+3*a)*n,Kw=1e-7,Xw=12;function Fw(n,a,s,l,r){let c,d,h=0;do d=a+(s-a)/2,c=rv(d,l,r)-n,c>0?s=d:a=d;while(Math.abs(c)>Kw&&++h<Xw);return d}function tl(n,a,s,l){if(n===a&&s===l)return Ft;const r=c=>Fw(c,0,1,n,s);return c=>c===0||c===1?c:rv(r(c),a,l)}const uv=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,cv=n=>a=>1-n(1-a),fv=tl(.33,1.53,.69,.99),Xf=cv(fv),dv=uv(Xf),hv=n=>(n*=2)<1?.5*Xf(n):.5*(2-Math.pow(2,-10*(n-1))),Ff=n=>1-Math.sin(Math.acos(n)),mv=cv(Ff),pv=uv(Ff),$w=tl(.42,0,1,1),Qw=tl(0,0,.58,1),gv=tl(.42,0,.58,1),Zw=n=>Array.isArray(n)&&typeof n[0]!="number",yv=n=>Array.isArray(n)&&typeof n[0]=="number",Jw={linear:Ft,easeIn:$w,easeInOut:gv,easeOut:Qw,circIn:Ff,circInOut:pv,circOut:mv,backIn:Xf,backInOut:dv,backOut:fv,anticipate:hv},Iw=n=>typeof n=="string",sy=n=>{if(yv(n)){Yf(n.length===4);const[a,s,l,r]=n;return tl(a,s,l,r)}else if(Iw(n))return Jw[n];return n},jo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ww(n,a){let s=new Set,l=new Set,r=!1,c=!1;const d=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function p(v){d.has(v)&&(g.schedule(v),n()),v(h)}const g={schedule:(v,x=!1,S=!1)=>{const j=S&&r?s:l;return x&&d.add(v),j.has(v)||j.add(v),v},cancel:v=>{l.delete(v),d.delete(v)},process:v=>{if(h=v,r){c=!0;return}r=!0,[s,l]=[l,s],s.forEach(p),s.clear(),r=!1,c&&(c=!1,g.process(v))}};return g}const eC=40;function xv(n,a){let s=!1,l=!0;const r={delta:0,timestamp:0,isProcessing:!1},c=()=>s=!0,d=jo.reduce((L,F)=>(L[F]=Ww(c),L),{}),{setup:h,read:p,resolveKeyframes:g,preUpdate:v,update:x,preRender:S,render:w,postRender:j}=d,R=()=>{const L=Dn.useManualTiming?r.timestamp:performance.now();s=!1,Dn.useManualTiming||(r.delta=l?1e3/60:Math.max(Math.min(L-r.timestamp,eC),1)),r.timestamp=L,r.isProcessing=!0,h.process(r),p.process(r),g.process(r),v.process(r),x.process(r),S.process(r),w.process(r),j.process(r),r.isProcessing=!1,s&&a&&(l=!1,n(R))},A=()=>{s=!0,l=!0,r.isProcessing||n(R)};return{schedule:jo.reduce((L,F)=>{const H=d[F];return L[F]=(Q,X=!1,q=!1)=>(s||A(),H.schedule(Q,X,q)),L},{}),cancel:L=>{for(let F=0;F<jo.length;F++)d[jo[F]].cancel(L)},state:r,steps:d}}const{schedule:Ve,cancel:ra,state:rt,steps:kc}=xv(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ft,!0);let Oo;function tC(){Oo=void 0}const ht={now:()=>(Oo===void 0&&ht.set(rt.isProcessing||Dn.useManualTiming?rt.timestamp:performance.now()),Oo),set:n=>{Oo=n,queueMicrotask(tC)}},vv=n=>a=>typeof a=="string"&&a.startsWith(n),bv=vv("--"),nC=vv("var(--"),$f=n=>nC(n)?aC.test(n.split("/*")[0].trim()):!1,aC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ly(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Li={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},$s={...Li,transform:n=>rn(0,1,n)},No={...Li,default:1},qs=n=>Math.round(n*1e5)/1e5,Qf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iC(n){return n==null}const sC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zf=(n,a)=>s=>!!(typeof s=="string"&&sC.test(s)&&s.startsWith(n)||a&&!iC(s)&&Object.prototype.hasOwnProperty.call(s,a)),Sv=(n,a,s)=>l=>{if(typeof l!="string")return l;const[r,c,d,h]=l.match(Qf);return{[n]:parseFloat(r),[a]:parseFloat(c),[s]:parseFloat(d),alpha:h!==void 0?parseFloat(h):1}},lC=n=>rn(0,255,n),zc={...Li,transform:n=>Math.round(lC(n))},_a={test:Zf("rgb","red"),parse:Sv("red","green","blue"),transform:({red:n,green:a,blue:s,alpha:l=1})=>"rgba("+zc.transform(n)+", "+zc.transform(a)+", "+zc.transform(s)+", "+qs($s.transform(l))+")"};function oC(n){let a="",s="",l="",r="";return n.length>5?(a=n.substring(1,3),s=n.substring(3,5),l=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),s=n.substring(2,3),l=n.substring(3,4),r=n.substring(4,5),a+=a,s+=s,l+=l,r+=r),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(l,16),alpha:r?parseInt(r,16)/255:1}}const uf={test:Zf("#"),parse:oC,transform:_a.transform},nl=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),la=nl("deg"),on=nl("%"),ee=nl("px"),rC=nl("vh"),uC=nl("vw"),oy={...on,parse:n=>on.parse(n)/100,transform:n=>on.transform(n*100)},Ci={test:Zf("hsl","hue"),parse:Sv("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:s,alpha:l=1})=>"hsla("+Math.round(n)+", "+on.transform(qs(a))+", "+on.transform(qs(s))+", "+qs($s.transform(l))+")"},Ie={test:n=>_a.test(n)||uf.test(n)||Ci.test(n),parse:n=>_a.test(n)?_a.parse(n):Ci.test(n)?Ci.parse(n):uf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?_a.transform(n):Ci.transform(n),getAnimatableNone:n=>{const a=Ie.parse(n);return a.alpha=0,Ie.transform(a)}},cC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fC(n){return isNaN(n)&&typeof n=="string"&&(n.match(Qf)?.length||0)+(n.match(cC)?.length||0)>0}const Tv="number",wv="color",dC="var",hC="var(",ry="${}",mC=/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 Qs(n){const a=n.toString(),s=[],l={color:[],number:[],var:[]},r=[];let c=0;const h=a.replace(mC,p=>(Ie.test(p)?(l.color.push(c),r.push(wv),s.push(Ie.parse(p))):p.startsWith(hC)?(l.var.push(c),r.push(dC),s.push(p)):(l.number.push(c),r.push(Tv),s.push(parseFloat(p))),++c,ry)).split(ry);return{values:s,split:h,indexes:l,types:r}}function Cv(n){return Qs(n).values}function jv(n){const{split:a,types:s}=Qs(n),l=a.length;return r=>{let c="";for(let d=0;d<l;d++)if(c+=a[d],r[d]!==void 0){const h=s[d];h===Tv?c+=qs(r[d]):h===wv?c+=Ie.transform(r[d]):c+=r[d]}return c}}const pC=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n;function gC(n){const a=Cv(n);return jv(n)(a.map(pC))}const ua={test:fC,parse:Cv,createTransformer:jv,getAnimatableNone:gC};function Vc(n,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?n+(a-n)*6*s:s<1/2?a:s<2/3?n+(a-n)*(2/3-s)*6:n}function yC({hue:n,saturation:a,lightness:s,alpha:l}){n/=360,a/=100,s/=100;let r=0,c=0,d=0;if(!a)r=c=d=s;else{const h=s<.5?s*(1+a):s+a-s*a,p=2*s-h;r=Vc(p,h,n+1/3),c=Vc(p,h,n),d=Vc(p,h,n-1/3)}return{red:Math.round(r*255),green:Math.round(c*255),blue:Math.round(d*255),alpha:l}}function Ho(n,a){return s=>s>0?a:n}const He=(n,a,s)=>n+(a-n)*s,Uc=(n,a,s)=>{const l=n*n,r=s*(a*a-l)+l;return r<0?0:Math.sqrt(r)},xC=[uf,_a,Ci],vC=n=>xC.find(a=>a.test(n));function uy(n){const a=vC(n);if(!a)return!1;let s=a.parse(n);return a===Ci&&(s=yC(s)),s}const cy=(n,a)=>{const s=uy(n),l=uy(a);if(!s||!l)return Ho(n,a);const r={...s};return c=>(r.red=Uc(s.red,l.red,c),r.green=Uc(s.green,l.green,c),r.blue=Uc(s.blue,l.blue,c),r.alpha=He(s.alpha,l.alpha,c),_a.transform(r))},cf=new Set(["none","hidden"]);function bC(n,a){return cf.has(n)?s=>s<=0?n:a:s=>s>=1?a:n}function SC(n,a){return s=>He(n,a,s)}function Jf(n){return typeof n=="number"?SC:typeof n=="string"?$f(n)?Ho:Ie.test(n)?cy:CC:Array.isArray(n)?Nv:typeof n=="object"?Ie.test(n)?cy:TC:Ho}function Nv(n,a){const s=[...n],l=s.length,r=n.map((c,d)=>Jf(c)(c,a[d]));return c=>{for(let d=0;d<l;d++)s[d]=r[d](c);return s}}function TC(n,a){const s={...n,...a},l={};for(const r in s)n[r]!==void 0&&a[r]!==void 0&&(l[r]=Jf(n[r])(n[r],a[r]));return r=>{for(const c in l)s[c]=l[c](r);return s}}function wC(n,a){const s=[],l={color:0,var:0,number:0};for(let r=0;r<a.values.length;r++){const c=a.types[r],d=n.indexes[c][l[c]],h=n.values[d]??0;s[r]=h,l[c]++}return s}const CC=(n,a)=>{const s=ua.createTransformer(a),l=Qs(n),r=Qs(a);return l.indexes.var.length===r.indexes.var.length&&l.indexes.color.length===r.indexes.color.length&&l.indexes.number.length>=r.indexes.number.length?cf.has(n)&&!r.values.length||cf.has(a)&&!l.values.length?bC(n,a):el(Nv(wC(l,r),r.values),s):Ho(n,a)};function Ev(n,a,s){return typeof n=="number"&&typeof a=="number"&&typeof s=="number"?He(n,a,s):Jf(n)(n,a)}const jC=n=>{const a=({timestamp:s})=>n(s);return{start:(s=!0)=>Ve.update(a,s),stop:()=>ra(a),now:()=>rt.isProcessing?rt.timestamp:ht.now()}},Av=(n,a,s=10)=>{let l="";const r=Math.max(Math.round(a/s),2);for(let c=0;c<r;c++)l+=Math.round(n(c/(r-1))*1e4)/1e4+", ";return`linear(${l.substring(0,l.length-2)})`},qo=2e4;function If(n){let a=0;const s=50;let l=n.next(a);for(;!l.done&&a<qo;)a+=s,l=n.next(a);return a>=qo?1/0:a}function NC(n,a=100,s){const l=s({...n,keyframes:[0,a]}),r=Math.min(If(l),qo);return{type:"keyframes",ease:c=>l.next(r*c).value/a,duration:Xt(r)}}const EC=5;function Rv(n,a,s){const l=Math.max(a-EC,0);return ov(s-n(l),a-l)}const Pe={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},Bc=.001;function AC({duration:n=Pe.duration,bounce:a=Pe.bounce,velocity:s=Pe.velocity,mass:l=Pe.mass}){let r,c,d=1-a;d=rn(Pe.minDamping,Pe.maxDamping,d),n=rn(Pe.minDuration,Pe.maxDuration,Xt(n)),d<1?(r=g=>{const v=g*d,x=v*n,S=v-s,w=ff(g,d),j=Math.exp(-x);return Bc-S/w*j},c=g=>{const x=g*d*n,S=x*s+s,w=Math.pow(d,2)*Math.pow(g,2)*n,j=Math.exp(-x),R=ff(Math.pow(g,2),d);return(-r(g)+Bc>0?-1:1)*((S-w)*j)/R}):(r=g=>{const v=Math.exp(-g*n),x=(g-s)*n+1;return-Bc+v*x},c=g=>{const v=Math.exp(-g*n),x=(s-g)*(n*n);return v*x});const h=5/n,p=MC(r,c,h);if(n=Rn(n),isNaN(p))return{stiffness:Pe.stiffness,damping:Pe.damping,duration:n};{const g=Math.pow(p,2)*l;return{stiffness:g,damping:d*2*Math.sqrt(l*g),duration:n}}}const RC=12;function MC(n,a,s){let l=s;for(let r=1;r<RC;r++)l=l-n(l)/a(l);return l}function ff(n,a){return n*Math.sqrt(1-a*a)}const DC=["duration","bounce"],OC=["stiffness","damping","mass"];function fy(n,a){return a.some(s=>n[s]!==void 0)}function _C(n){let a={velocity:Pe.velocity,stiffness:Pe.stiffness,damping:Pe.damping,mass:Pe.mass,isResolvedFromDuration:!1,...n};if(!fy(n,OC)&&fy(n,DC))if(n.visualDuration){const s=n.visualDuration,l=2*Math.PI/(s*1.2),r=l*l,c=2*rn(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:Pe.mass,stiffness:r,damping:c}}else{const s=AC(n);a={...a,...s,mass:Pe.mass},a.isResolvedFromDuration=!0}return a}function Go(n=Pe.visualDuration,a=Pe.bounce){const s=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:l,restDelta:r}=s;const c=s.keyframes[0],d=s.keyframes[s.keyframes.length-1],h={done:!1,value:c},{stiffness:p,damping:g,mass:v,duration:x,velocity:S,isResolvedFromDuration:w}=_C({...s,velocity:-Xt(s.velocity||0)}),j=S||0,R=g/(2*Math.sqrt(p*v)),A=d-c,_=Xt(Math.sqrt(p/v)),D=Math.abs(A)<5;l||(l=D?Pe.restSpeed.granular:Pe.restSpeed.default),r||(r=D?Pe.restDelta.granular:Pe.restDelta.default);let L;if(R<1){const H=ff(_,R);L=Q=>{const X=Math.exp(-R*_*Q);return d-X*((j+R*_*A)/H*Math.sin(H*Q)+A*Math.cos(H*Q))}}else if(R===1)L=H=>d-Math.exp(-_*H)*(A+(j+_*A)*H);else{const H=_*Math.sqrt(R*R-1);L=Q=>{const X=Math.exp(-R*_*Q),q=Math.min(H*Q,300);return d-X*((j+R*_*A)*Math.sinh(q)+H*A*Math.cosh(q))/H}}const F={calculatedDuration:w&&x||null,next:H=>{const Q=L(H);if(w)h.done=H>=x;else{let X=H===0?j:0;R<1&&(X=H===0?Rn(j):Rv(L,H,Q));const q=Math.abs(X)<=l,$=Math.abs(d-Q)<=r;h.done=q&&$}return h.value=h.done?d:Q,h},toString:()=>{const H=Math.min(If(F),qo),Q=Av(X=>F.next(H*X).value,H,30);return H+"ms "+Q},toTransition:()=>{}};return F}Go.applyToOptions=n=>{const a=NC(n,100,Go);return n.ease=a.ease,n.duration=Rn(a.duration),n.type="keyframes",n};function df({keyframes:n,velocity:a=0,power:s=.8,timeConstant:l=325,bounceDamping:r=10,bounceStiffness:c=500,modifyTarget:d,min:h,max:p,restDelta:g=.5,restSpeed:v}){const x=n[0],S={done:!1,value:x},w=q=>h!==void 0&&q<h||p!==void 0&&q>p,j=q=>h===void 0?p:p===void 0||Math.abs(h-q)<Math.abs(p-q)?h:p;let R=s*a;const A=x+R,_=d===void 0?A:d(A);_!==A&&(R=_-x);const D=q=>-R*Math.exp(-q/l),L=q=>_+D(q),F=q=>{const $=D(q),Z=L(q);S.done=Math.abs($)<=g,S.value=S.done?_:Z};let H,Q;const X=q=>{w(S.value)&&(H=q,Q=Go({keyframes:[S.value,j(S.value)],velocity:Rv(L,q,S.value),damping:r,stiffness:c,restDelta:g,restSpeed:v}))};return X(0),{calculatedDuration:null,next:q=>{let $=!1;return!Q&&H===void 0&&($=!0,F(q),X(q)),H!==void 0&&q>=H?Q.next(q-H):(!$&&F(q),S)}}}function LC(n,a,s){const l=[],r=s||Dn.mix||Ev,c=n.length-1;for(let d=0;d<c;d++){let h=r(n[d],n[d+1]);if(a){const p=Array.isArray(a)?a[d]||Ft:a;h=el(p,h)}l.push(h)}return l}function kC(n,a,{clamp:s=!0,ease:l,mixer:r}={}){const c=n.length;if(Yf(c===a.length),c===1)return()=>a[0];if(c===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[c-1]&&(n=[...n].reverse(),a=[...a].reverse());const h=LC(a,l,r),p=h.length,g=v=>{if(d&&v<n[0])return a[0];let x=0;if(p>1)for(;x<n.length-2&&!(v<n[x+1]);x++);const S=Fs(n[x],n[x+1],v);return h[x](S)};return s?v=>g(rn(n[0],n[c-1],v)):g}function zC(n,a){const s=n[n.length-1];for(let l=1;l<=a;l++){const r=Fs(0,a,l);n.push(He(s,1,r))}}function VC(n){const a=[0];return zC(a,n.length-1),a}function UC(n,a){return n.map(s=>s*a)}function BC(n,a){return n.map(()=>a||gv).splice(0,n.length-1)}function Gs({duration:n=300,keyframes:a,times:s,ease:l="easeInOut"}){const r=Zw(l)?l.map(sy):sy(l),c={done:!1,value:a[0]},d=UC(s&&s.length===a.length?s:VC(a),n),h=kC(d,a,{ease:Array.isArray(r)?r:BC(a,r)});return{calculatedDuration:n,next:p=>(c.value=h(p),c.done=p>=n,c)}}const HC=n=>n!==null;function Wf(n,{repeat:a,repeatType:s="loop"},l,r=1){const c=n.filter(HC),h=r<0||a&&s!=="loop"&&a%2===1?0:c.length-1;return!h||l===void 0?c[h]:l}const qC={decay:df,inertia:df,tween:Gs,keyframes:Gs,spring:Go};function Mv(n){typeof n.type=="string"&&(n.type=qC[n.type])}class ed{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,s){return this.finished.then(a,s)}}const GC=n=>n/100;class td extends ed{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==ht.now()&&this.tick(ht.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;Mv(a);const{type:s=Gs,repeat:l=0,repeatDelay:r=0,repeatType:c,velocity:d=0}=a;let{keyframes:h}=a;const p=s||Gs;p!==Gs&&typeof h[0]!="number"&&(this.mixKeyframes=el(GC,Ev(h[0],h[1])),h=[0,100]);const g=p({...a,keyframes:h});c==="mirror"&&(this.mirroredGenerator=p({...a,keyframes:[...h].reverse(),velocity:-d})),g.calculatedDuration===null&&(g.calculatedDuration=If(g));const{calculatedDuration:v}=g;this.calculatedDuration=v,this.resolvedDuration=v+r,this.totalDuration=this.resolvedDuration*(l+1)-r,this.generator=g}updateTime(a){const s=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(a,s=!1){const{generator:l,totalDuration:r,mixKeyframes:c,mirroredGenerator:d,resolvedDuration:h,calculatedDuration:p}=this;if(this.startTime===null)return l.next(0);const{delay:g=0,keyframes:v,repeat:x,repeatType:S,repeatDelay:w,type:j,onUpdate:R,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-r/this.speed,this.startTime)),s?this.currentTime=a:this.updateTime(a);const _=this.currentTime-g*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?_<0:_>r;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let L=this.currentTime,F=l;if(x){const q=Math.min(this.currentTime,r)/h;let $=Math.floor(q),Z=q%1;!Z&&q>=1&&(Z=1),Z===1&&$--,$=Math.min($,x+1),$%2&&(S==="reverse"?(Z=1-Z,w&&(Z-=w/h)):S==="mirror"&&(F=d)),L=rn(0,1,Z)*h}const H=D?{done:!1,value:v[0]}:F.next(L);c&&(H.value=c(H.value));let{done:Q}=H;!D&&p!==null&&(Q=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const X=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Q);return X&&j!==df&&(H.value=Wf(v,this.options,A,this.speed)),R&&R(H.value),X&&this.finish(),H}then(a,s){return this.finished.then(a,s)}get duration(){return Xt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Xt(a)}get time(){return Xt(this.currentTime)}set time(a){a=Rn(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(a){this.updateTime(ht.now());const s=this.playbackSpeed!==a;this.playbackSpeed=a,s&&(this.time=Xt(this.currentTime))}play(){if(this.isStopped)return;const{driver:a=jC,startTime:s}=this.options;this.driver||(this.driver=a(r=>this.tick(r))),this.options.onPlay?.();const l=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=l):this.holdTime!==null?this.startTime=l-this.holdTime:this.startTime||(this.startTime=s??l),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(ht.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(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),a.observe(this)}}function YC(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const La=n=>n*180/Math.PI,hf=n=>{const a=La(Math.atan2(n[1],n[0]));return mf(a)},PC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:hf,rotateZ:hf,skewX:n=>La(Math.atan(n[1])),skewY:n=>La(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},mf=n=>(n=n%360,n<0&&(n+=360),n),dy=hf,hy=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),my=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),KC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hy,scaleY:my,scale:n=>(hy(n)+my(n))/2,rotateX:n=>mf(La(Math.atan2(n[6],n[5]))),rotateY:n=>mf(La(Math.atan2(-n[2],n[0]))),rotateZ:dy,rotate:dy,skewX:n=>La(Math.atan(n[4])),skewY:n=>La(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function pf(n){return n.includes("scale")?1:0}function gf(n,a){if(!n||n==="none")return pf(a);const s=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let l,r;if(s)l=KC,r=s;else{const h=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);l=PC,r=h}if(!r)return pf(a);const c=l[a],d=r[1].split(",").map(FC);return typeof c=="function"?c(d):d[c]}const XC=(n,a)=>{const{transform:s="none"}=getComputedStyle(n);return gf(s,a)};function FC(n){return parseFloat(n.trim())}const ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zi=new Set(ki),py=n=>n===Li||n===ee,$C=new Set(["x","y","z"]),QC=ki.filter(n=>!$C.has(n));function ZC(n){const a=[];return QC.forEach(s=>{const l=n.getValue(s);l!==void 0&&(a.push([s,l.get()]),l.set(s.startsWith("scale")?1:0))}),a}const oa={width:({x:n},{paddingLeft:a="0",paddingRight:s="0"})=>n.max-n.min-parseFloat(a)-parseFloat(s),height:({y:n},{paddingTop:a="0",paddingBottom:s="0"})=>n.max-n.min-parseFloat(a)-parseFloat(s),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>gf(a,"x"),y:(n,{transform:a})=>gf(a,"y")};oa.translateX=oa.x;oa.translateY=oa.y;const ka=new Set;let yf=!1,xf=!1,vf=!1;function Dv(){if(xf){const n=Array.from(ka).filter(l=>l.needsMeasurement),a=new Set(n.map(l=>l.element)),s=new Map;a.forEach(l=>{const r=ZC(l);r.length&&(s.set(l,r),l.render())}),n.forEach(l=>l.measureInitialState()),a.forEach(l=>{l.render();const r=s.get(l);r&&r.forEach(([c,d])=>{l.getValue(c)?.set(d)})}),n.forEach(l=>l.measureEndState()),n.forEach(l=>{l.suspendedScrollY!==void 0&&window.scrollTo(0,l.suspendedScrollY)})}xf=!1,yf=!1,ka.forEach(n=>n.complete(vf)),ka.clear()}function Ov(){ka.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(xf=!0)})}function JC(){vf=!0,Ov(),Dv(),vf=!1}class nd{constructor(a,s,l,r,c,d=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=s,this.name=l,this.motionValue=r,this.element=c,this.isAsync=d}scheduleResolve(){this.state="scheduled",this.isAsync?(ka.add(this),yf||(yf=!0,Ve.read(Ov),Ve.resolveKeyframes(Dv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:s,element:l,motionValue:r}=this;if(a[0]===null){const c=r?.get(),d=a[a.length-1];if(c!==void 0)a[0]=c;else if(l&&s){const h=l.readValue(s,d);h!=null&&(a[0]=h)}a[0]===void 0&&(a[0]=d),r&&c===void 0&&r.set(a[0])}YC(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),ka.delete(this)}cancel(){this.state==="scheduled"&&(ka.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const IC=n=>n.startsWith("--");function WC(n,a,s){IC(a)?n.style.setProperty(a,s):n.style[a]=s}const ej=Pf(()=>window.ScrollTimeline!==void 0),tj={};function nj(n,a){const s=Pf(n);return()=>tj[a]??s()}const _v=nj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),zs=([n,a,s,l])=>`cubic-bezier(${n}, ${a}, ${s}, ${l})`,gy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zs([0,.65,.55,1]),circOut:zs([.55,0,1,.45]),backIn:zs([.31,.01,.66,-.59]),backOut:zs([.33,1.53,.69,.99])};function Lv(n,a){if(n)return typeof n=="function"?_v()?Av(n,a):"ease-out":yv(n)?zs(n):Array.isArray(n)?n.map(s=>Lv(s,a)||gy.easeOut):gy[n]}function aj(n,a,s,{delay:l=0,duration:r=300,repeat:c=0,repeatType:d="loop",ease:h="easeOut",times:p}={},g=void 0){const v={[a]:s};p&&(v.offset=p);const x=Lv(h,r);Array.isArray(x)&&(v.easing=x);const S={delay:l,duration:r,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:c+1,direction:d==="reverse"?"alternate":"normal"};return g&&(S.pseudoElement=g),n.animate(v,S)}function kv(n){return typeof n=="function"&&"applyToOptions"in n}function ij({type:n,...a}){return kv(n)&&_v()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class sj extends ed{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:s,name:l,keyframes:r,pseudoElement:c,allowFlatten:d=!1,finalKeyframe:h,onComplete:p}=a;this.isPseudoElement=!!c,this.allowFlatten=d,this.options=a,Yf(typeof a.type!="string");const g=ij(a);this.animation=aj(s,l,r,g,c),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const v=Wf(r,this.options,h,this.speed);this.updateMotionValue?this.updateMotionValue(v):WC(s,l,v),this.animation.cancel()}p?.(),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:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const a=this.animation.effect?.getComputedTiming?.().duration||0;return Xt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Xt(a)}get time(){return Xt(Number(this.animation.currentTime)||0)}set time(a){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Rn(a)}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,a&&ej()?(this.animation.timeline=a,Ft):s(this)}}const zv={anticipate:hv,backInOut:dv,circInOut:pv};function lj(n){return n in zv}function oj(n){typeof n.ease=="string"&&lj(n.ease)&&(n.ease=zv[n.ease])}const Hc=10;class rj extends sj{constructor(a){oj(a),Mv(a),super(a),a.startTime!==void 0&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:s,onUpdate:l,onComplete:r,element:c,...d}=this.options;if(!s)return;if(a!==void 0){s.set(a);return}const h=new td({...d,autoplay:!1}),p=Math.max(Hc,ht.now()-this.startTime),g=rn(0,Hc,p-Hc);s.setWithVelocity(h.sample(Math.max(0,p-g)).value,h.sample(p).value,g),h.stop()}}const yy=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ua.test(n)||n==="0")&&!n.startsWith("url("));function uj(n){const a=n[0];if(n.length===1)return!0;for(let s=0;s<n.length;s++)if(n[s]!==a)return!0}function cj(n,a,s,l){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const c=n[n.length-1],d=yy(r,a),h=yy(c,a);return!d||!h?!1:uj(n)||(s==="spring"||kv(s))&&l}function bf(n){n.duration=0,n.type="keyframes"}const fj=new Set(["opacity","clipPath","filter","transform"]),dj=Pf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hj(n){const{motionValue:a,name:s,repeatDelay:l,repeatType:r,damping:c,type:d}=n;if(!(a?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:g}=a.owner.getProps();return dj()&&s&&fj.has(s)&&(s!=="transform"||!g)&&!p&&!l&&r!=="mirror"&&c!==0&&d!=="inertia"}const mj=40;class pj extends ed{constructor({autoplay:a=!0,delay:s=0,type:l="keyframes",repeat:r=0,repeatDelay:c=0,repeatType:d="loop",keyframes:h,name:p,motionValue:g,element:v,...x}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ht.now();const S={autoplay:a,delay:s,type:l,repeat:r,repeatDelay:c,repeatType:d,name:p,motionValue:g,element:v,...x},w=v?.KeyframeResolver||nd;this.keyframeResolver=new w(h,(j,R,A)=>this.onKeyframesResolved(j,R,S,!A),p,g,v),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(a,s,l,r){this.keyframeResolver=void 0;const{name:c,type:d,velocity:h,delay:p,isHandoff:g,onUpdate:v}=l;this.resolvedAt=ht.now(),cj(a,c,d,h)||((Dn.instantAnimations||!p)&&v?.(Wf(a,l,s)),a[0]=a[a.length-1],bf(l),l.repeat=0);const S={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>mj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...l,keyframes:a},w=!g&&hj(S)?new rj({...S,element:S.motionValue.owner.current}):new td(S);w.finished.then(()=>this.notifyFinished()).catch(Ft),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(a,s){return this.finished.finally(a).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),JC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const gj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yj(n){const a=gj.exec(n);if(!a)return[,];const[,s,l,r]=a;return[`--${s??l}`,r]}function Vv(n,a,s=1){const[l,r]=yj(n);if(!l)return;const c=window.getComputedStyle(a).getPropertyValue(l);if(c){const d=c.trim();return iv(d)?parseFloat(d):d}return $f(r)?Vv(r,a,s+1):r}function ad(n,a){return n?.[a]??n?.default??n}const xj={type:"spring",stiffness:500,damping:25,restSpeed:10},vj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),bj={type:"keyframes",duration:.8},Sj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Tj=(n,{keyframes:a})=>a.length>2?bj:zi.has(n)?n.startsWith("scale")?vj(a[1]):xj:Sj;function wj({when:n,delay:a,delayChildren:s,staggerChildren:l,staggerDirection:r,repeat:c,repeatType:d,repeatDelay:h,from:p,elapsed:g,...v}){return!!Object.keys(v).length}const Cj=n=>n!==null;function jj(n,{repeat:a,repeatType:s="loop"},l){const r=n.filter(Cj),c=a&&s!=="loop"&&a%2===1?0:r.length-1;return r[c]}function Uv(n,a,s,l=0,r=1){const c=Array.from(n).sort((g,v)=>g.sortNodePosition(v)).indexOf(a),d=n.size,h=(d-1)*l;return typeof s=="function"?s(c,d):r===1?c*l:h-c*l}const id=(n,a,s,l={},r,c)=>d=>{const h=ad(l,n)||{},p=h.delay||l.delay||0;let{elapsed:g=0}=l;g=g-Rn(p);const v={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:a.getVelocity(),...h,delay:-g,onUpdate:S=>{a.set(S),h.onUpdate&&h.onUpdate(S)},onComplete:()=>{d(),h.onComplete&&h.onComplete()},name:n,motionValue:a,element:c?void 0:r};wj(h)||Object.assign(v,Tj(n,v)),v.duration&&(v.duration=Rn(v.duration)),v.repeatDelay&&(v.repeatDelay=Rn(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let x=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(bf(v),v.delay===0&&(x=!0)),(Dn.instantAnimations||Dn.skipAnimations)&&(x=!0,bf(v),v.delay=0),v.allowFlatten=!h.type&&!h.ease,x&&!c&&a.get()!==void 0){const S=jj(v.keyframes,h);if(S!==void 0){Ve.update(()=>{v.onUpdate(S),v.onComplete()});return}}return h.isSync?new td(v):new pj(v)},Bv=new Set(["width","height","top","left","right","bottom",...ki]),xy=30,Nj=n=>!isNaN(parseFloat(n));class Ej{constructor(a,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=l=>{const r=ht.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(l),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=s.owner}setCurrent(a){this.current=a,this.updatedAt=ht.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=Nj(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new Kf);const l=this.events[a].add(s);return a==="change"?()=>{l(),Ve.read(()=>{this.events.change.getSize()||this.stop()})}:l}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,s,l){this.set(s),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-l}jump(a,s=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>xy)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,xy);return ov(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),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 Mi(n,a){return new Ej(n,a)}function vy(n){const a=[{},{}];return n?.values.forEach((s,l)=>{a[0][l]=s.get(),a[1][l]=s.getVelocity()}),a}function sd(n,a,s,l){if(typeof a=="function"){const[r,c]=vy(l);a=a(s!==void 0?s:n.custom,r,c)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,c]=vy(l);a=a(s!==void 0?s:n.custom,r,c)}return a}function Ai(n,a,s){const l=n.getProps();return sd(l,a,s!==void 0?s:l.custom,n)}const Sf=n=>Array.isArray(n);function Aj(n,a,s){n.hasValue(a)?n.getValue(a).set(s):n.addValue(a,Mi(s))}function Rj(n){return Sf(n)?n[n.length-1]||0:n}function Mj(n,a){const s=Ai(n,a);let{transitionEnd:l={},transition:r={},...c}=s||{};c={...c,...l};for(const d in c){const h=Rj(c[d]);Aj(n,d,h)}}const ct=n=>!!(n&&n.getVelocity);function Dj(n){return!!(ct(n)&&n.add)}function Tf(n,a){const s=n.getValue("willChange");if(Dj(s))return s.add(a);if(!s&&Dn.WillChange){const l=new Dn.WillChange("auto");n.addValue("willChange",l),l.add(a)}}function ld(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const Oj="framerAppearId",Hv="data-"+ld(Oj);function qv(n){return n.props[Hv]}function _j({protectedKeys:n,needsAnimating:a},s){const l=n.hasOwnProperty(s)&&a[s]!==!0;return a[s]=!1,l}function Gv(n,a,{delay:s=0,transitionOverride:l,type:r}={}){let{transition:c=n.getDefaultTransition(),transitionEnd:d,...h}=a;l&&(c=l);const p=[],g=r&&n.animationState&&n.animationState.getState()[r];for(const v in h){const x=n.getValue(v,n.latestValues[v]??null),S=h[v];if(S===void 0||g&&_j(g,v))continue;const w={delay:s,...ad(c||{},v)},j=x.get();if(j!==void 0&&!x.isAnimating&&!Array.isArray(S)&&S===j&&!w.velocity)continue;let R=!1;if(window.MotionHandoffAnimation){const _=qv(n);if(_){const D=window.MotionHandoffAnimation(_,v,Ve);D!==null&&(w.startTime=D,R=!0)}}Tf(n,v),x.start(id(v,x,S,n.shouldReduceMotion&&Bv.has(v)?{type:!1}:w,n,R));const A=x.animation;A&&p.push(A)}return d&&Promise.all(p).then(()=>{Ve.update(()=>{d&&Mj(n,d)})}),p}function wf(n,a,s={}){const l=Ai(n,a,s.type==="exit"?n.presenceContext?.custom:void 0);let{transition:r=n.getDefaultTransition()||{}}=l||{};s.transitionOverride&&(r=s.transitionOverride);const c=l?()=>Promise.all(Gv(n,l,s)):()=>Promise.resolve(),d=n.variantChildren&&n.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:v,staggerDirection:x}=r;return Lj(n,a,p,g,v,x,s)}:()=>Promise.resolve(),{when:h}=r;if(h){const[p,g]=h==="beforeChildren"?[c,d]:[d,c];return p().then(()=>g())}else return Promise.all([c(),d(s.delay)])}function Lj(n,a,s=0,l=0,r=0,c=1,d){const h=[];for(const p of n.variantChildren)p.notify("AnimationStart",a),h.push(wf(p,a,{...d,delay:s+(typeof l=="function"?0:l)+Uv(n.variantChildren,p,l,r,c)}).then(()=>p.notify("AnimationComplete",a)));return Promise.all(h)}function kj(n,a,s={}){n.notify("AnimationStart",a);let l;if(Array.isArray(a)){const r=a.map(c=>wf(n,c,s));l=Promise.all(r)}else if(typeof a=="string")l=wf(n,a,s);else{const r=typeof a=="function"?Ai(n,a,s.custom):a;l=Promise.all(Gv(n,r,s))}return l.then(()=>{n.notify("AnimationComplete",a)})}const zj={test:n=>n==="auto",parse:n=>n},Yv=n=>a=>a.test(n),Pv=[Li,ee,on,la,uC,rC,zj],by=n=>Pv.find(Yv(n));function Vj(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||lv(n):!0}const Uj=new Set(["brightness","contrast","saturate","opacity"]);function Bj(n){const[a,s]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[l]=s.match(Qf)||[];if(!l)return n;const r=s.replace(l,"");let c=Uj.has(a)?1:0;return l!==s&&(c*=100),a+"("+c+r+")"}const Hj=/\b([a-z-]*)\(.*?\)/gu,Cf={...ua,getAnimatableNone:n=>{const a=n.match(Hj);return a?a.map(Bj).join(" "):n}},Sy={...Li,transform:Math.round},qj={rotate:la,rotateX:la,rotateY:la,rotateZ:la,scale:No,scaleX:No,scaleY:No,scaleZ:No,skew:la,skewX:la,skewY:la,distance:ee,translateX:ee,translateY:ee,translateZ:ee,x:ee,y:ee,z:ee,perspective:ee,transformPerspective:ee,opacity:$s,originX:oy,originY:oy,originZ:ee},od={borderWidth:ee,borderTopWidth:ee,borderRightWidth:ee,borderBottomWidth:ee,borderLeftWidth:ee,borderRadius:ee,radius:ee,borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomRightRadius:ee,borderBottomLeftRadius:ee,width:ee,maxWidth:ee,height:ee,maxHeight:ee,top:ee,right:ee,bottom:ee,left:ee,inset:ee,insetBlock:ee,insetBlockStart:ee,insetBlockEnd:ee,insetInline:ee,insetInlineStart:ee,insetInlineEnd:ee,padding:ee,paddingTop:ee,paddingRight:ee,paddingBottom:ee,paddingLeft:ee,paddingBlock:ee,paddingBlockStart:ee,paddingBlockEnd:ee,paddingInline:ee,paddingInlineStart:ee,paddingInlineEnd:ee,margin:ee,marginTop:ee,marginRight:ee,marginBottom:ee,marginLeft:ee,marginBlock:ee,marginBlockStart:ee,marginBlockEnd:ee,marginInline:ee,marginInlineStart:ee,marginInlineEnd:ee,backgroundPositionX:ee,backgroundPositionY:ee,...qj,zIndex:Sy,fillOpacity:$s,strokeOpacity:$s,numOctaves:Sy},Gj={...od,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:Cf,WebkitFilter:Cf},Kv=n=>Gj[n];function Xv(n,a){let s=Kv(n);return s!==Cf&&(s=ua),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const Yj=new Set(["auto","none","0"]);function Pj(n,a,s){let l=0,r;for(;l<n.length&&!r;){const c=n[l];typeof c=="string"&&!Yj.has(c)&&Qs(c).values.length&&(r=n[l]),l++}if(r&&s)for(const c of a)n[c]=Xv(s,r)}class Kj extends nd{constructor(a,s,l,r,c){super(a,s,l,r,c,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:s,name:l}=this;if(!s||!s.current)return;super.readKeyframes();for(let v=0;v<a.length;v++){let x=a[v];if(typeof x=="string"&&(x=x.trim(),$f(x))){const S=Vv(x,s.current);S!==void 0&&(a[v]=S),v===a.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!Bv.has(l)||a.length!==2)return;const[r,c]=a,d=by(r),h=by(c),p=ly(r),g=ly(c);if(p!==g&&oa[l]){this.needsMeasurement=!0;return}if(d!==h)if(py(d)&&py(h))for(let v=0;v<a.length;v++){const x=a[v];typeof x=="string"&&(a[v]=parseFloat(x))}else oa[l]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:s}=this,l=[];for(let r=0;r<a.length;r++)(a[r]===null||Vj(a[r]))&&l.push(r);l.length&&Pj(a,l,s)}measureInitialState(){const{element:a,unresolvedKeyframes:s,name:l}=this;if(!a||!a.current)return;l==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=oa[l](a.measureViewportBox(),window.getComputedStyle(a.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&a.getValue(l,r).jump(r,!1)}measureEndState(){const{element:a,name:s,unresolvedKeyframes:l}=this;if(!a||!a.current)return;const r=a.getValue(s);r&&r.jump(this.measuredOrigin,!1);const c=l.length-1,d=l[c];l[c]=oa[s](a.measureViewportBox(),window.getComputedStyle(a.current)),d!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=d),this.removedTransforms?.length&&this.removedTransforms.forEach(([h,p])=>{a.getValue(h).set(p)}),this.resolveNoneKeyframes()}}function Xj(n,a,s){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let l=document;const r=s?.[n]??l.querySelectorAll(n);return r?Array.from(r):[]}return Array.from(n)}const Fv=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function $v(n){return sv(n)&&"offsetHeight"in n}const{schedule:rd}=xv(queueMicrotask,!1),Wt={x:!1,y:!1};function Qv(){return Wt.x||Wt.y}function Fj(n){return n==="x"||n==="y"?Wt[n]?null:(Wt[n]=!0,()=>{Wt[n]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function Zv(n,a){const s=Xj(n),l=new AbortController,r={passive:!0,...a,signal:l.signal};return[s,r,()=>l.abort()]}function Ty(n){return!(n.pointerType==="touch"||Qv())}function $j(n,a,s={}){const[l,r,c]=Zv(n,s),d=h=>{if(!Ty(h))return;const{target:p}=h,g=a(p,h);if(typeof g!="function"||!p)return;const v=x=>{Ty(x)&&(g(x),p.removeEventListener("pointerleave",v))};p.addEventListener("pointerleave",v,r)};return l.forEach(h=>{h.addEventListener("pointerenter",d,r)}),c}const Jv=(n,a)=>a?n===a?!0:Jv(n,a.parentElement):!1,ud=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,Qj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Iv(n){return Qj.has(n.tagName)||n.isContentEditable===!0}const _o=new WeakSet;function wy(n){return a=>{a.key==="Enter"&&n(a)}}function qc(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const Zj=(n,a)=>{const s=n.currentTarget;if(!s)return;const l=wy(()=>{if(_o.has(s))return;qc(s,"down");const r=wy(()=>{qc(s,"up")}),c=()=>qc(s,"cancel");s.addEventListener("keyup",r,a),s.addEventListener("blur",c,a)});s.addEventListener("keydown",l,a),s.addEventListener("blur",()=>s.removeEventListener("keydown",l),a)};function Cy(n){return ud(n)&&!Qv()}function Jj(n,a,s={}){const[l,r,c]=Zv(n,s),d=h=>{const p=h.currentTarget;if(!Cy(h))return;_o.add(p);const g=a(p,h),v=(w,j)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",S),_o.has(p)&&_o.delete(p),Cy(w)&&typeof g=="function"&&g(w,{success:j})},x=w=>{v(w,p===window||p===document||s.useGlobalTarget||Jv(p,w.target))},S=w=>{v(w,!1)};window.addEventListener("pointerup",x,r),window.addEventListener("pointercancel",S,r)};return l.forEach(h=>{(s.useGlobalTarget?window:h).addEventListener("pointerdown",d,r),$v(h)&&(h.addEventListener("focus",g=>Zj(g,r)),!Iv(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),c}function Wv(n){return sv(n)&&"ownerSVGElement"in n}function Ij(n){return Wv(n)&&n.tagName==="svg"}const Wj=[...Pv,Ie,ua],eN=n=>Wj.find(Yv(n)),jy=()=>({translate:0,scale:1,origin:0,originPoint:0}),ji=()=>({x:jy(),y:jy()}),Ny=()=>({min:0,max:0}),et=()=>({x:Ny(),y:Ny()}),jf={current:null},e0={current:!1},tN=typeof window<"u";function nN(){if(e0.current=!0,!!tN)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>jf.current=n.matches;n.addEventListener("change",a),a()}else jf.current=!1}const aN=new WeakMap;function er(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Zs(n){return typeof n=="string"||Array.isArray(n)}const cd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fd=["initial",...cd];function tr(n){return er(n.animate)||fd.some(a=>Zs(n[a]))}function t0(n){return!!(tr(n)||n.variants)}function iN(n,a,s){for(const l in a){const r=a[l],c=s[l];if(ct(r))n.addValue(l,r);else if(ct(c))n.addValue(l,Mi(r,{owner:n}));else if(c!==r)if(n.hasValue(l)){const d=n.getValue(l);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(l);n.addValue(l,Mi(d!==void 0?d:r,{owner:n}))}}for(const l in s)a[l]===void 0&&n.removeValue(l);return a}const Ey=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Yo={};function n0(n){Yo=n}function sN(){return Yo}class lN{scrapeMotionValuesFromProps(a,s,l){return{}}constructor({parent:a,props:s,presenceContext:l,reducedMotionConfig:r,blockInitialAnimation:c,visualState:d},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 S=ht.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,Ve.render(this.render,!1,!0))};const{latestValues:p,renderState:g}=d;this.latestValues=p,this.baseTarget={...p},this.initialValues=s.initial?{...p}:{},this.renderState=g,this.parent=a,this.props=s,this.presenceContext=l,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=h,this.blockInitialAnimation=!!c,this.isControllingVariants=tr(s),this.isVariantNode=t0(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(s,{},this);for(const S in x){const w=x[S];p[S]!==void 0&&ct(w)&&w.set(p[S])}}mount(a){this.current=a,aN.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,l)=>this.bindToMotionValue(l,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(e0.current||nN(),this.shouldReduceMotion=jf.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ra(this.notifyUpdate),ra(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const s=this.features[a];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,s){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const l=zi.has(a);l&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",d=>{this.latestValues[a]=d,this.props.onUpdate&&Ve.preRender(this.notifyUpdate),l&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,a,s)),this.valueSubscriptions.set(a,()=>{r(),c&&c(),s.owner&&s.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Yo){const s=Yo[a];if(!s)continue;const{isEnabled:l,Feature:r}=s;if(!this.features[a]&&r&&l(this.props)&&(this.features[a]=new r(this)),this.features[a]){const c=this.features[a];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):et()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let l=0;l<Ey.length;l++){const r=Ey[l];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const c="on"+r,d=a[c];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=iN(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]: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(a){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(a),()=>s.variantChildren.delete(a)}addValue(a,s){const l=this.values.get(a);s!==l&&(l&&this.removeValue(a),this.bindToMotionValue(a,s),this.values.set(a,s),this.latestValues[a]=s.get())}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let l=this.values.get(a);return l===void 0&&s!==void 0&&(l=Mi(s===null?void 0:s,{owner:this}),this.addValue(a,l)),l}readValue(a,s){let l=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return l!=null&&(typeof l=="string"&&(iv(l)||lv(l))?l=parseFloat(l):!eN(l)&&ua.test(s)&&(l=Xv(a,s)),this.setBaseTarget(a,ct(l)?l.get():l)),ct(l)?l.get():l}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){const{initial:s}=this.props;let l;if(typeof s=="string"||typeof s=="object"){const c=sd(this.props,s,this.presenceContext?.custom);c&&(l=c[a])}if(s&&l!==void 0)return l;const r=this.getBaseTargetFromProps(this.props,a);return r!==void 0&&!ct(r)?r:this.initialValues[a]!==void 0&&l===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new Kf),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}scheduleRenderMicrotask(){rd.render(this.render)}}class ca{constructor(a){this.isMounted=!1,this.node=a}update(){}}class a0 extends lN{constructor(){super(...arguments),this.KeyframeResolver=Kj}sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){const l=a.style;return l?l[s]:void 0}removeValueFromRenderState(a,{vars:s,style:l}){delete s[a],delete l[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ct(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function i0({top:n,left:a,right:s,bottom:l}){return{x:{min:a,max:s},y:{min:n,max:l}}}function oN({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function rN(n,a){if(!a)return n;const s=a({x:n.left,y:n.top}),l=a({x:n.right,y:n.bottom});return{top:s.y,left:s.x,bottom:l.y,right:l.x}}function Gc(n){return n===void 0||n===1}function Nf({scale:n,scaleX:a,scaleY:s}){return!Gc(n)||!Gc(a)||!Gc(s)}function Da(n){return Nf(n)||s0(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function s0(n){return Ay(n.x)||Ay(n.y)}function Ay(n){return n&&n!=="0%"}function Po(n,a,s){const l=n-s,r=a*l;return s+r}function Ry(n,a,s,l,r){return r!==void 0&&(n=Po(n,r,l)),Po(n,s,l)+a}function Ef(n,a=0,s=1,l,r){n.min=Ry(n.min,a,s,l,r),n.max=Ry(n.max,a,s,l,r)}function l0(n,{x:a,y:s}){Ef(n.x,a.translate,a.scale,a.originPoint),Ef(n.y,s.translate,s.scale,s.originPoint)}const My=.999999999999,Dy=1.0000000000001;function uN(n,a,s,l=!1){const r=s.length;if(!r)return;a.x=a.y=1;let c,d;for(let h=0;h<r;h++){c=s[h],d=c.projectionDelta;const{visualElement:p}=c.options;p&&p.props.style&&p.props.style.display==="contents"||(l&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ei(n,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,l0(n,d)),l&&Da(c.latestValues)&&Ei(n,c.latestValues))}a.x<Dy&&a.x>My&&(a.x=1),a.y<Dy&&a.y>My&&(a.y=1)}function Ni(n,a){n.min=n.min+a,n.max=n.max+a}function Oy(n,a,s,l,r=.5){const c=He(n.min,n.max,r);Ef(n,a,s,c,l)}function Ei(n,a){Oy(n.x,a.x,a.scaleX,a.scale,a.originX),Oy(n.y,a.y,a.scaleY,a.scale,a.originY)}function o0(n,a){return i0(rN(n.getBoundingClientRect(),a))}function cN(n,a,s){const l=o0(n,s),{scroll:r}=a;return r&&(Ni(l.x,r.offset.x),Ni(l.y,r.offset.y)),l}const fN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dN=ki.length;function hN(n,a,s){let l="",r=!0;for(let c=0;c<dN;c++){const d=ki[c],h=n[d];if(h===void 0)continue;let p=!0;if(typeof h=="number"?p=h===(d.startsWith("scale")?1:0):p=parseFloat(h)===0,!p||s){const g=Fv(h,od[d]);if(!p){r=!1;const v=fN[d]||d;l+=`${v}(${g}) `}s&&(a[d]=g)}}return l=l.trim(),s?l=s(a,r?"":l):r&&(l="none"),l}function dd(n,a,s){const{style:l,vars:r,transformOrigin:c}=n;let d=!1,h=!1;for(const p in a){const g=a[p];if(zi.has(p)){d=!0;continue}else if(bv(p)){r[p]=g;continue}else{const v=Fv(g,od[p]);p.startsWith("origin")?(h=!0,c[p]=v):l[p]=v}}if(a.transform||(d||s?l.transform=hN(a,n.transform,s):l.transform&&(l.transform="none")),h){const{originX:p="50%",originY:g="50%",originZ:v=0}=c;l.transformOrigin=`${p} ${g} ${v}`}}function r0(n,{style:a,vars:s},l,r){const c=n.style;let d;for(d in a)c[d]=a[d];r?.applyProjectionStyles(c,l);for(d in s)c.setProperty(d,s[d])}function _y(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Ls={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(ee.test(n))n=parseFloat(n);else return n;const s=_y(n,a.target.x),l=_y(n,a.target.y);return`${s}% ${l}%`}},mN={correct:(n,{treeScale:a,projectionDelta:s})=>{const l=n,r=ua.parse(n);if(r.length>5)return l;const c=ua.createTransformer(n),d=typeof r[0]!="number"?1:0,h=s.x.scale*a.x,p=s.y.scale*a.y;r[0+d]/=h,r[1+d]/=p;const g=He(h,p,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),c(r)}},Af={borderRadius:{...Ls,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ls,borderTopRightRadius:Ls,borderBottomLeftRadius:Ls,borderBottomRightRadius:Ls,boxShadow:mN};function u0(n,{layout:a,layoutId:s}){return zi.has(n)||n.startsWith("origin")||(a||s!==void 0)&&(!!Af[n]||n==="opacity")}function hd(n,a,s){const l=n.style,r=a?.style,c={};if(!l)return c;for(const d in l)(ct(l[d])||r&&ct(r[d])||u0(d,n)||s?.getValue(d)?.liveStyle!==void 0)&&(c[d]=l[d]);return c}function pN(n){return window.getComputedStyle(n)}class gN extends a0{constructor(){super(...arguments),this.type="html",this.renderInstance=r0}readValueFromInstance(a,s){if(zi.has(s))return this.projection?.isProjecting?pf(s):XC(a,s);{const l=pN(a),r=(bv(s)?l.getPropertyValue(s):l[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:s}){return o0(a,s)}build(a,s,l){dd(a,s,l.transformTemplate)}scrapeMotionValuesFromProps(a,s,l){return hd(a,s,l)}}const yN={offset:"stroke-dashoffset",array:"stroke-dasharray"},xN={offset:"strokeDashoffset",array:"strokeDasharray"};function vN(n,a,s=1,l=0,r=!0){n.pathLength=1;const c=r?yN:xN;n[c.offset]=ee.transform(-l);const d=ee.transform(a),h=ee.transform(s);n[c.array]=`${d} ${h}`}const bN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function c0(n,{attrX:a,attrY:s,attrScale:l,pathLength:r,pathSpacing:c=1,pathOffset:d=0,...h},p,g,v){if(dd(n,h,g),p){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:S}=n;x.transform&&(S.transform=x.transform,delete x.transform),(S.transform||x.transformOrigin)&&(S.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),S.transform&&(S.transformBox=v?.transformBox??"fill-box",delete x.transformBox);for(const w of bN)x[w]!==void 0&&(S[w]=x[w],delete x[w]);a!==void 0&&(x.x=a),s!==void 0&&(x.y=s),l!==void 0&&(x.scale=l),r!==void 0&&vN(x,r,c,d,!1)}const f0=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"]),d0=n=>typeof n=="string"&&n.toLowerCase()==="svg";function SN(n,a,s,l){r0(n,a,void 0,l);for(const r in a.attrs)n.setAttribute(f0.has(r)?r:ld(r),a.attrs[r])}function h0(n,a,s){const l=hd(n,a,s);for(const r in n)if(ct(n[r])||ct(a[r])){const c=ki.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;l[c]=n[r]}return l}class TN extends a0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=et}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(zi.has(s)){const l=Kv(s);return l&&l.default||0}return s=f0.has(s)?s:ld(s),a.getAttribute(s)}scrapeMotionValuesFromProps(a,s,l){return h0(a,s,l)}build(a,s,l){c0(a,s,this.isSVGTag,l.transformTemplate,l.style)}renderInstance(a,s,l,r){SN(a,s,l,r)}mount(a){this.isSVGTag=d0(a.tagName),super.mount(a)}}const wN=fd.length;function m0(n){if(!n)return;if(!n.isControllingVariants){const s=n.parent?m0(n.parent)||{}:{};return n.props.initial!==void 0&&(s.initial=n.props.initial),s}const a={};for(let s=0;s<wN;s++){const l=fd[s],r=n.props[l];(Zs(r)||r===!1)&&(a[l]=r)}return a}function p0(n,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==n.length)return!1;for(let l=0;l<s;l++)if(a[l]!==n[l])return!1;return!0}const CN=[...cd].reverse(),jN=cd.length;function NN(n){return a=>Promise.all(a.map(({animation:s,options:l})=>kj(n,s,l)))}function EN(n){let a=NN(n),s=Ly(),l=!0;const r=p=>(g,v)=>{const x=Ai(n,v,p==="exit"?n.presenceContext?.custom:void 0);if(x){const{transition:S,transitionEnd:w,...j}=x;g={...g,...j,...w}}return g};function c(p){a=p(n)}function d(p){const{props:g}=n,v=m0(n.parent)||{},x=[],S=new Set;let w={},j=1/0;for(let A=0;A<jN;A++){const _=CN[A],D=s[_],L=g[_]!==void 0?g[_]:v[_],F=Zs(L),H=_===p?D.isActive:null;H===!1&&(j=A);let Q=L===v[_]&&L!==g[_]&&F;if(Q&&l&&n.manuallyAnimateOnMount&&(Q=!1),D.protectedKeys={...w},!D.isActive&&H===null||!L&&!D.prevProp||er(L)||typeof L=="boolean")continue;const X=AN(D.prevProp,L);let q=X||_===p&&D.isActive&&!Q&&F||A>j&&F,$=!1;const Z=Array.isArray(L)?L:[L];let re=Z.reduce(r(_),{});H===!1&&(re={});const{prevResolvedValues:de={}}=D,W={...de,...re},le=U=>{q=!0,S.has(U)&&($=!0,S.delete(U)),D.needsAnimating[U]=!0;const J=n.getValue(U);J&&(J.liveStyle=!1)};for(const U in W){const J=re[U],ue=de[U];if(w.hasOwnProperty(U))continue;let he=!1;Sf(J)&&Sf(ue)?he=!p0(J,ue):he=J!==ue,he?J!=null?le(U):S.add(U):J!==void 0&&S.has(U)?le(U):D.protectedKeys[U]=!0}D.prevProp=L,D.prevResolvedValues=re,D.isActive&&(w={...w,...re}),l&&n.blockInitialAnimation&&(q=!1);const ie=Q&&X;q&&(!ie||$)&&x.push(...Z.map(U=>{const J={type:_};if(typeof U=="string"&&l&&!ie&&n.manuallyAnimateOnMount&&n.parent){const{parent:ue}=n,he=Ai(ue,U);if(ue.enteringChildren&&he){const{delayChildren:N}=he.transition||{};J.delay=Uv(ue.enteringChildren,n,N)}}return{animation:U,options:J}}))}if(S.size){const A={};if(typeof g.initial!="boolean"){const _=Ai(n,Array.isArray(g.initial)?g.initial[0]:g.initial);_&&_.transition&&(A.transition=_.transition)}S.forEach(_=>{const D=n.getBaseTarget(_),L=n.getValue(_);L&&(L.liveStyle=!0),A[_]=D??null}),x.push({animation:A})}let R=!!x.length;return l&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(R=!1),l=!1,R?a(x):Promise.resolve()}function h(p,g){if(s[p].isActive===g)return Promise.resolve();n.variantChildren?.forEach(x=>x.animationState?.setActive(p,g)),s[p].isActive=g;const v=d(p);for(const x in s)s[x].protectedKeys={};return v}return{animateChanges:d,setActive:h,setAnimateFunction:c,getState:()=>s,reset:()=>{s=Ly()}}}function AN(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!p0(a,n):!1}function Ma(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ly(){return{animate:Ma(!0),whileInView:Ma(),whileHover:Ma(),whileTap:Ma(),whileDrag:Ma(),whileFocus:Ma(),exit:Ma()}}const g0=1e-4,RN=1-g0,MN=1+g0,y0=.01,DN=0-y0,ON=0+y0;function mt(n){return n.max-n.min}function _N(n,a,s){return Math.abs(n-a)<=s}function ky(n,a,s,l=.5){n.origin=l,n.originPoint=He(a.min,a.max,n.origin),n.scale=mt(s)/mt(a),n.translate=He(s.min,s.max,n.origin)-n.originPoint,(n.scale>=RN&&n.scale<=MN||isNaN(n.scale))&&(n.scale=1),(n.translate>=DN&&n.translate<=ON||isNaN(n.translate))&&(n.translate=0)}function Ys(n,a,s,l){ky(n.x,a.x,s.x,l?l.originX:void 0),ky(n.y,a.y,s.y,l?l.originY:void 0)}function zy(n,a,s){n.min=s.min+a.min,n.max=n.min+mt(a)}function LN(n,a,s){zy(n.x,a.x,s.x),zy(n.y,a.y,s.y)}function Vy(n,a,s){n.min=a.min-s.min,n.max=n.min+mt(a)}function Ko(n,a,s){Vy(n.x,a.x,s.x),Vy(n.y,a.y,s.y)}function Uy(n,a,s,l,r){return n-=a,n=Po(n,1/s,l),r!==void 0&&(n=Po(n,1/r,l)),n}function kN(n,a=0,s=1,l=.5,r,c=n,d=n){if(on.test(a)&&(a=parseFloat(a),a=He(d.min,d.max,a/100)-d.min),typeof a!="number")return;let h=He(c.min,c.max,l);n===c&&(h-=a),n.min=Uy(n.min,a,s,h,r),n.max=Uy(n.max,a,s,h,r)}function By(n,a,[s,l,r],c,d){kN(n,a[s],a[l],a[r],a.scale,c,d)}const zN=["x","scaleX","originX"],VN=["y","scaleY","originY"];function Hy(n,a,s,l){By(n.x,a,zN,s?s.x:void 0,l?l.x:void 0),By(n.y,a,VN,s?s.y:void 0,l?l.y:void 0)}function qy(n,a){n.min=a.min,n.max=a.max}function It(n,a){qy(n.x,a.x),qy(n.y,a.y)}function Gy(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Yy(n){return n.translate===0&&n.scale===1}function x0(n){return Yy(n.x)&&Yy(n.y)}function Py(n,a){return n.min===a.min&&n.max===a.max}function UN(n,a){return Py(n.x,a.x)&&Py(n.y,a.y)}function Ky(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function v0(n,a){return Ky(n.x,a.x)&&Ky(n.y,a.y)}function Xy(n){return mt(n.x)/mt(n.y)}function Fy(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function Kt(n){return[n("x"),n("y")]}function BN(n,a,s){let l="";const r=n.x.translate/a.x,c=n.y.translate/a.y,d=s?.z||0;if((r||c||d)&&(l=`translate3d(${r}px, ${c}px, ${d}px) `),(a.x!==1||a.y!==1)&&(l+=`scale(${1/a.x}, ${1/a.y}) `),s){const{transformPerspective:g,rotate:v,rotateX:x,rotateY:S,skewX:w,skewY:j}=s;g&&(l=`perspective(${g}px) ${l}`),v&&(l+=`rotate(${v}deg) `),x&&(l+=`rotateX(${x}deg) `),S&&(l+=`rotateY(${S}deg) `),w&&(l+=`skewX(${w}deg) `),j&&(l+=`skewY(${j}deg) `)}const h=n.x.scale*a.x,p=n.y.scale*a.y;return(h!==1||p!==1)&&(l+=`scale(${h}, ${p})`),l||"none"}const b0=["TopLeft","TopRight","BottomLeft","BottomRight"],HN=b0.length,$y=n=>typeof n=="string"?parseFloat(n):n,Qy=n=>typeof n=="number"||ee.test(n);function qN(n,a,s,l,r,c){r?(n.opacity=He(0,s.opacity??1,GN(l)),n.opacityExit=He(a.opacity??1,0,YN(l))):c&&(n.opacity=He(a.opacity??1,s.opacity??1,l));for(let d=0;d<HN;d++){const h=`border${b0[d]}Radius`;let p=Zy(a,h),g=Zy(s,h);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||Qy(p)===Qy(g)?(n[h]=Math.max(He($y(p),$y(g),l),0),(on.test(g)||on.test(p))&&(n[h]+="%")):n[h]=g}(a.rotate||s.rotate)&&(n.rotate=He(a.rotate||0,s.rotate||0,l))}function Zy(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const GN=S0(0,.5,mv),YN=S0(.5,.95,Ft);function S0(n,a,s){return l=>l<n?0:l>a?1:s(Fs(n,a,l))}function PN(n,a){const s=ht.now(),l=({timestamp:r})=>{const c=r-s;c>=a&&(ra(l),n(c-a))};return Ve.setup(l,!0),()=>ra(l)}function Js(n,a,s,l={passive:!0}){return n.addEventListener(a,s,l),()=>n.removeEventListener(a,s)}function Lo(n){return ct(n)?n.get():n}function KN(n,a,s){const l=ct(n)?n:Mi(n);return l.start(id("",l,a,s)),l.animation}const XN=(n,a)=>n.depth-a.depth;class FN{constructor(){this.children=[],this.isDirty=!1}add(a){qf(this.children,a),this.isDirty=!0}remove(a){Gf(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(XN),this.isDirty=!1,this.children.forEach(a)}}class $N{constructor(){this.members=[]}add(a){qf(this.members,a),a.scheduleRender()}remove(a){if(Gf(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){const s=this.members.findIndex(r=>a===r);if(s===0)return!1;let l;for(let r=s;r>=0;r--){const c=this.members[r];if(c.isPresent!==!1){l=c;break}}return l?(this.promote(l),!0):!1}promote(a,s){const l=this.lead;if(a!==l&&(this.prevLead=l,this.lead=a,a.show(),l)){l.instance&&l.scheduleRender(),a.scheduleRender(),a.resumeFrom=l,s&&(a.resumeFrom.preserveOpacity=!0),l.snapshot&&(a.snapshot=l.snapshot,a.snapshot.latestValues=l.animationValues||l.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&l.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:s,resumingFrom:l}=a;s.onExitComplete&&s.onExitComplete(),l&&l.options.onExitComplete&&l.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yc=["","X","Y","Z"],QN=1e3;let ZN=0;function Pc(n,a,s,l){const{latestValues:r}=a;r[n]&&(s[n]=r[n],a.setStaticValue(n,0),l&&(l[n]=0))}function T0(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const s=qv(a);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:c}=n.options;window.MotionCancelOptimisedAnimation(s,"transform",Ve,!(r||c))}const{parent:l}=n;l&&!l.hasCheckedOptimisedAppear&&T0(l)}function w0({attachResizeListener:n,defaultParent:a,measureScroll:s,checkIsScrollRoot:l,resetTransform:r}){return class{constructor(d={},h=a?.()){this.id=ZN++,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(WN),this.nodes.forEach(aE),this.nodes.forEach(iE),this.nodes.forEach(eE)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new FN)}addEventListener(d,h){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new Kf),this.eventHandlers.get(d).add(h)}notifyListeners(d,...h){const p=this.eventHandlers.get(d);p&&p.notify(...h)}hasListeners(d){return this.eventHandlers.has(d)}mount(d){if(this.instance)return;this.isSVG=Wv(d)&&!Ij(d),this.instance=d;const{layoutId:h,layout:p,visualElement:g}=this.options;if(g&&!g.current&&g.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(p||h)&&(this.isLayoutDirty=!0),n){let v,x=0;const S=()=>this.root.updateBlockedByResize=!1;Ve.read(()=>{x=window.innerWidth}),n(d,()=>{const w=window.innerWidth;w!==x&&(x=w,this.root.updateBlockedByResize=!0,v&&v(),v=PN(S,250),ko.hasAnimatedSinceResize&&(ko.hasAnimatedSinceResize=!1,this.nodes.forEach(Wy)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&g&&(h||p)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:x,hasRelativeLayoutChanged:S,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||g.getDefaultTransition()||uE,{onLayoutAnimationStart:R,onLayoutAnimationComplete:A}=g.getProps(),_=!this.targetLayout||!v0(this.targetLayout,w),D=!x&&S;if(this.options.layoutRoot||this.resumeFrom||D||x&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...ad(j,"layout"),onPlay:R,onComplete:A};(g.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(v,D)}else x||Wy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ra(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(sE),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&T0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const x=this.path[v];x.shouldResetTransform=!0,x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:h,layout:p}=this.options;if(h===void 0&&!p)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Jy);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Iy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nE),this.nodes.forEach(JN),this.nodes.forEach(IN)):this.nodes.forEach(Iy),this.clearAllSnapshots();const h=ht.now();rt.delta=rn(0,1e3/60,h-rt.timestamp),rt.timestamp=h,rt.isProcessing=!0,kc.update.process(rt),kc.preRender.process(rt),kc.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tE),this.sharedNodes.forEach(lE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mt(this.snapshot.measuredBox.x)&&!mt(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 p=0;p<this.path.length;p++)this.path[p].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(h=!1),h&&this.instance){const p=l(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!x0(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,v=g!==this.prevTransformTemplateValue;d&&this.instance&&(h||Da(this.latestValues)||v)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const h=this.measurePageBox();let p=this.removeElementScroll(h);return d&&(p=this.removeTransform(p)),cE(p),{animationId:this.root.animationId,measuredBox:h,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:d}=this.options;if(!d)return et();const h=d.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fE))){const{scroll:g}=this.root;g&&(Ni(h.x,g.offset.x),Ni(h.y,g.offset.y))}return h}removeElementScroll(d){const h=et();if(It(h,d),this.scroll?.wasRoot)return h;for(let p=0;p<this.path.length;p++){const g=this.path[p],{scroll:v,options:x}=g;g!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&It(h,d),Ni(h.x,v.offset.x),Ni(h.y,v.offset.y))}return h}applyTransform(d,h=!1){const p=et();It(p,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];!h&&v.options.layoutScroll&&v.scroll&&v!==v.root&&Ei(p,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),Da(v.latestValues)&&Ei(p,v.latestValues)}return Da(this.latestValues)&&Ei(p,this.latestValues),p}removeTransform(d){const h=et();It(h,d);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!Da(g.latestValues))continue;Nf(g.latestValues)&&g.updateSnapshot();const v=et(),x=g.measurePageBox();It(v,x),Hy(h,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,v)}return Da(this.latestValues)&&Hy(h,this.latestValues),h}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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!==rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==h;if(!(d||p&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:v,layoutId:x}=this.options;if(!this.layout||!(v||x))return;this.resolvedRelativeTargetAt=rt.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=et(),this.targetWithTransforms=et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),LN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):It(this.target,this.layout.layoutBox),l0(this.target,this.targetDelta)):It(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Nf(this.parent.latestValues)||s0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(d,h,p){this.relativeParent=d,this.linkedParentVersion=d.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),Ko(this.relativeTargetOrigin,h,p),It(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const d=this.getLead(),h=!!this.resumingFrom||this!==d;let p=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(p=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===rt.timestamp&&(p=!1),p)return;const{layout:g,layoutId:v}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||v))return;It(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,S=this.treeScale.y;uN(this.layoutCorrected,this.treeScale,this.path,h),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox,d.targetWithTransforms=et());const{target:w}=d;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gy(this.prevProjectionDelta.x,this.projectionDelta.x),Gy(this.prevProjectionDelta.y,this.projectionDelta.y)),Ys(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==S||!Fy(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){if(this.options.visualElement?.scheduleRender(),d){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ji(),this.projectionDelta=ji(),this.projectionDeltaWithTransform=ji()}setAnimationOrigin(d,h=!1){const p=this.snapshot,g=p?p.latestValues:{},v={...this.latestValues},x=ji();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const S=et(),w=p?p.source:void 0,j=this.layout?this.layout.source:void 0,R=w!==j,A=this.getStack(),_=!A||A.members.length<=1,D=!!(R&&!_&&this.options.crossfade===!0&&!this.path.some(rE));this.animationProgress=0;let L;this.mixTargetDelta=F=>{const H=F/1e3;ex(x.x,d.x,H),ex(x.y,d.y,H),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ko(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oE(this.relativeTarget,this.relativeTargetOrigin,S,H),L&&UN(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=et()),It(L,this.relativeTarget)),R&&(this.animationValues=v,qN(v,g,this.latestValues,H,D,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ra(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ve.update(()=>{ko.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mi(0)),this.currentAnimation=KN(this.motionValue,[0,1e3],{...d,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),d.onUpdate&&d.onUpdate(h)},onStop:()=>{},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(QN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:h,target:p,layout:g,latestValues:v}=d;if(!(!h||!p||!g)){if(this!==d&&this.layout&&g&&C0(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||et();const x=mt(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+x;const S=mt(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+S}It(h,p),Ei(h,v),Ys(this.projectionDeltaWithTransform,this.layoutCorrected,h,v)}}registerSharedNode(d,h){this.sharedNodes.has(d)||this.sharedNodes.set(d,new $N),this.sharedNodes.get(d).add(h);const g=h.options.initialPromotionConfig;h.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(h):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){const{layoutId:d}=this.options;return d?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:d}=this.options;return d?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:h,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let h=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(h=!0),!h)return;const g={};p.z&&Pc("z",d,g,this.animationValues);for(let v=0;v<Yc.length;v++)Pc(`rotate${Yc[v]}`,d,g,this.animationValues),Pc(`skew${Yc[v]}`,d,g,this.animationValues);d.render();for(const v in g)d.setStaticValue(v,g[v]),this.animationValues&&(this.animationValues[v]=g[v]);d.scheduleRender()}applyProjectionStyles(d,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){d.visibility="hidden";return}const p=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,d.visibility="",d.opacity="",d.pointerEvents=Lo(h?.pointerEvents)||"",d.transform=p?p(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=Lo(h?.pointerEvents)||""),this.hasProjected&&!Da(this.latestValues)&&(d.transform=p?p({},""):"none",this.hasProjected=!1);return}d.visibility="";const v=g.animationValues||g.latestValues;this.applyTransformsToTarget();let x=BN(this.projectionDeltaWithTransform,this.treeScale,v);p&&(x=p(v,x)),d.transform=x;const{x:S,y:w}=this.projectionDelta;d.transformOrigin=`${S.origin*100}% ${w.origin*100}% 0`,g.animationValues?d.opacity=g===this?v.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:d.opacity=g===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const j in Af){if(v[j]===void 0)continue;const{correct:R,applyTo:A,isCSSVariable:_}=Af[j],D=x==="none"?v[j]:R(v[j],g);if(A){const L=A.length;for(let F=0;F<L;F++)d[A[F]]=D}else _?this.options.visualElement.renderState.vars[j]=D:d[j]=D}this.options.layoutId&&(d.pointerEvents=g===this?Lo(h?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>d.currentAnimation?.stop()),this.root.nodes.forEach(Jy),this.root.sharedNodes.clear()}}}function JN(n){n.updateLayout()}function IN(n){const a=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:l}=n.layout,{animationType:r}=n.options,c=a.source!==n.layout.source;r==="size"?Kt(v=>{const x=c?a.measuredBox[v]:a.layoutBox[v],S=mt(x);x.min=s[v].min,x.max=x.min+S}):C0(r,a.layoutBox,s)&&Kt(v=>{const x=c?a.measuredBox[v]:a.layoutBox[v],S=mt(s[v]);x.max=x.min+S,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[v].max=n.relativeTarget[v].min+S)});const d=ji();Ys(d,s,a.layoutBox);const h=ji();c?Ys(h,n.applyTransform(l,!0),a.measuredBox):Ys(h,s,a.layoutBox);const p=!x0(d);let g=!1;if(!n.resumeFrom){const v=n.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:S}=v;if(x&&S){const w=et();Ko(w,a.layoutBox,x.layoutBox);const j=et();Ko(j,s,S.layoutBox),v0(w,j)||(g=!0),v.options.layoutRoot&&(n.relativeTarget=j,n.relativeTargetOrigin=w,n.relativeParent=v)}}}n.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:h,layoutDelta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:g})}else if(n.isLead()){const{onExitComplete:s}=n.options;s&&s()}n.options.transition=void 0}function WN(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function eE(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function tE(n){n.clearSnapshot()}function Jy(n){n.clearMeasurements()}function Iy(n){n.isLayoutDirty=!1}function nE(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Wy(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function aE(n){n.resolveTargetDelta()}function iE(n){n.calcProjection()}function sE(n){n.resetSkewAndRotation()}function lE(n){n.removeLeadSnapshot()}function ex(n,a,s){n.translate=He(a.translate,0,s),n.scale=He(a.scale,1,s),n.origin=a.origin,n.originPoint=a.originPoint}function tx(n,a,s,l){n.min=He(a.min,s.min,l),n.max=He(a.max,s.max,l)}function oE(n,a,s,l){tx(n.x,a.x,s.x,l),tx(n.y,a.y,s.y,l)}function rE(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const uE={duration:.45,ease:[.4,0,.1,1]},nx=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),ax=nx("applewebkit/")&&!nx("chrome/")?Math.round:Ft;function ix(n){n.min=ax(n.min),n.max=ax(n.max)}function cE(n){ix(n.x),ix(n.y)}function C0(n,a,s){return n==="position"||n==="preserve-aspect"&&!_N(Xy(a),Xy(s),.2)}function fE(n){return n!==n.root&&n.scroll?.wasRoot}const dE=w0({attachResizeListener:(n,a)=>Js(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Kc={current:void 0},j0=w0({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Kc.current){const n=new dE({});n.mount(window),n.setOptions({layoutScroll:!0}),Kc.current=n}return Kc.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),md=T.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function sx(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function hE(...n){return a=>{let s=!1;const l=n.map(r=>{const c=sx(r,a);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let r=0;r<l.length;r++){const c=l[r];typeof c=="function"?c():sx(n[r],null)}}}}function mE(...n){return T.useCallback(hE(...n),n)}class pE extends T.Component{getSnapshotBeforeUpdate(a){const s=this.props.childRef.current;if(s&&a.isPresent&&!this.props.isPresent){const l=s.offsetParent,r=$v(l)&&l.offsetWidth||0,c=this.props.sizeRef.current;c.height=s.offsetHeight||0,c.width=s.offsetWidth||0,c.top=s.offsetTop,c.left=s.offsetLeft,c.right=r-c.width-c.left}return null}componentDidUpdate(){}render(){return this.props.children}}function gE({children:n,isPresent:a,anchorX:s,root:l}){const r=T.useId(),c=T.useRef(null),d=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:h}=T.useContext(md),p=n.props?.ref??n?.ref,g=mE(c,p);return T.useInsertionEffect(()=>{const{width:v,height:x,top:S,left:w,right:j}=d.current;if(a||!c.current||!v||!x)return;const R=s==="left"?`left: ${w}`:`right: ${j}`;c.current.dataset.motionPopId=r;const A=document.createElement("style");h&&(A.nonce=h);const _=l??document.head;return _.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
28
|
+
[data-motion-pop-id="${r}"] {
|
|
29
|
+
position: absolute !important;
|
|
30
|
+
width: ${v}px !important;
|
|
31
|
+
height: ${x}px !important;
|
|
32
|
+
${R}px !important;
|
|
33
|
+
top: ${S}px !important;
|
|
34
|
+
}
|
|
35
|
+
`),()=>{_.contains(A)&&_.removeChild(A)}},[a]),m.jsx(pE,{isPresent:a,childRef:c,sizeRef:d,children:T.cloneElement(n,{ref:g})})}const yE=({children:n,initial:a,isPresent:s,onExitComplete:l,custom:r,presenceAffectsLayout:c,mode:d,anchorX:h,root:p})=>{const g=Hf(xE),v=T.useId();let x=!0,S=T.useMemo(()=>(x=!1,{id:v,initial:a,isPresent:s,custom:r,onExitComplete:w=>{g.set(w,!0);for(const j of g.values())if(!j)return;l&&l()},register:w=>(g.set(w,!1),()=>g.delete(w))}),[s,g,l]);return c&&x&&(S={...S}),T.useMemo(()=>{g.forEach((w,j)=>g.set(j,!1))},[s]),T.useEffect(()=>{!s&&!g.size&&l&&l()},[s]),d==="popLayout"&&(n=m.jsx(gE,{isPresent:s,anchorX:h,root:p,children:n})),m.jsx(Wo.Provider,{value:S,children:n})};function xE(){return new Map}function N0(n=!0){const a=T.useContext(Wo);if(a===null)return[!0,null];const{isPresent:s,onExitComplete:l,register:r}=a,c=T.useId();T.useEffect(()=>{if(n)return r(c)},[n]);const d=T.useCallback(()=>n&&l&&l(c),[c,l,n]);return!s&&l?[!1,d]:[!0]}const Eo=n=>n.key||"";function lx(n){const a=[];return T.Children.forEach(n,s=>{T.isValidElement(s)&&a.push(s)}),a}const vE=({children:n,custom:a,initial:s=!0,onExitComplete:l,presenceAffectsLayout:r=!0,mode:c="sync",propagate:d=!1,anchorX:h="left",root:p})=>{const[g,v]=N0(d),x=T.useMemo(()=>lx(n),[n]),S=d&&!g?[]:x.map(Eo),w=T.useRef(!0),j=T.useRef(x),R=Hf(()=>new Map),A=T.useRef(new Set),[_,D]=T.useState(x),[L,F]=T.useState(x);av(()=>{w.current=!1,j.current=x;for(let X=0;X<L.length;X++){const q=Eo(L[X]);S.includes(q)?(R.delete(q),A.current.delete(q)):R.get(q)!==!0&&R.set(q,!1)}},[L,S.length,S.join("-")]);const H=[];if(x!==_){let X=[...x];for(let q=0;q<L.length;q++){const $=L[q],Z=Eo($);S.includes(Z)||(X.splice(q,0,$),H.push($))}return c==="wait"&&H.length&&(X=H),F(lx(X)),D(x),null}const{forceRender:Q}=T.useContext(Bf);return m.jsx(m.Fragment,{children:L.map(X=>{const q=Eo(X),$=d&&!g?!1:x===L||S.includes(q),Z=()=>{if(A.current.has(q))return;if(A.current.add(q),R.has(q))R.set(q,!0);else return;let re=!0;R.forEach(de=>{de||(re=!1)}),re&&(Q?.(),F(j.current),d&&v?.(),l&&l())};return m.jsx(yE,{isPresent:$,initial:!w.current||s?void 0:!1,custom:a,presenceAffectsLayout:r,mode:c,root:p,onExitComplete:$?void 0:Z,anchorX:h,children:X},q)})})},E0=T.createContext({strict:!1}),ox={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 rx=!1;function bE(){if(rx)return;const n={};for(const a in ox)n[a]={isEnabled:s=>ox[a].some(l=>!!s[l])};n0(n),rx=!0}function A0(){return bE(),sN()}function SE(n){const a=A0();for(const s in n)a[s]={...a[s],...n[s]};n0(a)}const TE=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","ignoreStrict","viewport"]);function Xo(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||TE.has(n)}let R0=n=>!Xo(n);function wE(n){typeof n=="function"&&(R0=a=>a.startsWith("on")?!Xo(a):n(a))}try{wE(require("@emotion/is-prop-valid").default)}catch{}function CE(n,a,s){const l={};for(const r in n)r==="values"&&typeof n.values=="object"||(R0(r)||s===!0&&Xo(r)||!a&&!Xo(r)||n.draggable&&r.startsWith("onDrag"))&&(l[r]=n[r]);return l}const nr=T.createContext({});function jE(n,a){if(tr(n)){const{initial:s,animate:l}=n;return{initial:s===!1||Zs(s)?s:void 0,animate:Zs(l)?l:void 0}}return n.inherit!==!1?a:{}}function NE(n){const{initial:a,animate:s}=jE(n,T.useContext(nr));return T.useMemo(()=>({initial:a,animate:s}),[ux(a),ux(s)])}function ux(n){return Array.isArray(n)?n.join(" "):n}const pd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function M0(n,a,s){for(const l in a)!ct(a[l])&&!u0(l,s)&&(n[l]=a[l])}function EE({transformTemplate:n},a){return T.useMemo(()=>{const s=pd();return dd(s,a,n),Object.assign({},s.vars,s.style)},[a])}function AE(n,a){const s=n.style||{},l={};return M0(l,s,n),Object.assign(l,EE(n,a)),l}function RE(n,a){const s={},l=AE(n,a);return n.drag&&n.dragListener!==!1&&(s.draggable=!1,l.userSelect=l.WebkitUserSelect=l.WebkitTouchCallout="none",l.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(s.tabIndex=0),s.style=l,s}const D0=()=>({...pd(),attrs:{}});function ME(n,a,s,l){const r=T.useMemo(()=>{const c=D0();return c0(c,a,d0(l),n.transformTemplate,n.style),{...c.attrs,style:{...c.style}}},[a]);if(n.style){const c={};M0(c,n.style,n),r.style={...c,...r.style}}return r}const DE=["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 gd(n){return typeof n!="string"||n.includes("-")?!1:!!(DE.indexOf(n)>-1||/[A-Z]/u.test(n))}function OE(n,a,s,{latestValues:l},r,c=!1,d){const p=(d??gd(n)?ME:RE)(a,l,r,n),g=CE(a,typeof n=="string",c),v=n!==T.Fragment?{...g,...p,ref:s}:{},{children:x}=a,S=T.useMemo(()=>ct(x)?x.get():x,[x]);return T.createElement(n,{...v,children:S})}function _E({scrapeMotionValuesFromProps:n,createRenderState:a},s,l,r){return{latestValues:LE(s,l,r,n),renderState:a()}}function LE(n,a,s,l){const r={},c=l(n,{});for(const S in c)r[S]=Lo(c[S]);let{initial:d,animate:h}=n;const p=tr(n),g=t0(n);a&&g&&!p&&n.inherit!==!1&&(d===void 0&&(d=a.initial),h===void 0&&(h=a.animate));let v=s?s.initial===!1:!1;v=v||d===!1;const x=v?h:d;if(x&&typeof x!="boolean"&&!er(x)){const S=Array.isArray(x)?x:[x];for(let w=0;w<S.length;w++){const j=sd(n,S[w]);if(j){const{transitionEnd:R,transition:A,..._}=j;for(const D in _){let L=_[D];if(Array.isArray(L)){const F=v?L.length-1:0;L=L[F]}L!==null&&(r[D]=L)}for(const D in R)r[D]=R[D]}}}return r}const O0=n=>(a,s)=>{const l=T.useContext(nr),r=T.useContext(Wo),c=()=>_E(n,a,l,r);return s?c():Hf(c)},kE=O0({scrapeMotionValuesFromProps:hd,createRenderState:pd}),zE=O0({scrapeMotionValuesFromProps:h0,createRenderState:D0}),VE=Symbol.for("motionComponentSymbol");function UE(n,a,s){const l=T.useRef(s);T.useInsertionEffect(()=>{l.current=s});const r=T.useRef(null);return T.useCallback(c=>{c&&n.onMount?.(c),a&&(c?a.mount(c):a.unmount());const d=l.current;if(typeof d=="function")if(c){const h=d(c);typeof h=="function"&&(r.current=h)}else r.current?(r.current(),r.current=null):d(c);else d&&(d.current=c)},[a])}const _0=T.createContext({});function Vs(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function BE(n,a,s,l,r,c){const{visualElement:d}=T.useContext(nr),h=T.useContext(E0),p=T.useContext(Wo),g=T.useContext(md).reducedMotion,v=T.useRef(null);l=l||h.renderer,!v.current&&l&&(v.current=l(n,{visualState:a,parent:d,props:s,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g,isSVG:c}));const x=v.current,S=T.useContext(_0);x&&!x.projection&&r&&(x.type==="html"||x.type==="svg")&&HE(v.current,s,r,S);const w=T.useRef(!1);T.useInsertionEffect(()=>{x&&w.current&&x.update(s,p)});const j=s[Hv],R=T.useRef(!!j&&!window.MotionHandoffIsComplete?.(j)&&window.MotionHasOptimisedAnimation?.(j));return av(()=>{x&&(w.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),R.current&&x.animationState&&x.animationState.animateChanges())}),T.useEffect(()=>{x&&(!R.current&&x.animationState&&x.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(j)}),R.current=!1),x.enteringChildren=void 0)}),x}function HE(n,a,s,l){const{layoutId:r,layout:c,drag:d,dragConstraints:h,layoutScroll:p,layoutRoot:g,layoutCrossfade:v}=a;n.projection=new s(n.latestValues,a["data-framer-portal-id"]?void 0:L0(n.parent)),n.projection.setOptions({layoutId:r,layout:c,alwaysMeasureLayout:!!d||h&&Vs(h),visualElement:n,animationType:typeof c=="string"?c:"both",initialPromotionConfig:l,crossfade:v,layoutScroll:p,layoutRoot:g})}function L0(n){if(n)return n.options.allowProjection!==!1?n.projection:L0(n.parent)}function Xc(n,{forwardMotionProps:a=!1,type:s}={},l,r){l&&SE(l);const c=s?s==="svg":gd(n),d=c?zE:kE;function h(g,v){let x;const S={...T.useContext(md),...g,layoutId:qE(g)},{isStatic:w}=S,j=NE(g),R=d(g,w);if(!w&&nv){GE();const A=YE(S);x=A.MeasureLayout,j.visualElement=BE(n,R,S,r,A.ProjectionNode,c)}return m.jsxs(nr.Provider,{value:j,children:[x&&j.visualElement?m.jsx(x,{visualElement:j.visualElement,...S}):null,OE(n,g,UE(R,j.visualElement,v),R,w,a,c)]})}h.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const p=T.forwardRef(h);return p[VE]=n,p}function qE({layoutId:n}){const a=T.useContext(Bf).id;return a&&n!==void 0?a+"-"+n:n}function GE(n,a){T.useContext(E0).strict}function YE(n){const a=A0(),{drag:s,layout:l}=a;if(!s&&!l)return{};const r={...s,...l};return{MeasureLayout:s?.isEnabled(n)||l?.isEnabled(n)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function PE(n,a){if(typeof Proxy>"u")return Xc;const s=new Map,l=(c,d)=>Xc(c,d,n,a),r=(c,d)=>l(c,d);return new Proxy(r,{get:(c,d)=>d==="create"?l:(s.has(d)||s.set(d,Xc(d,void 0,n,a)),s.get(d))})}const KE=(n,a)=>a.isSVG??gd(n)?new TN(a):new gN(a,{allowProjection:n!==T.Fragment});class XE extends ca{constructor(a){super(a),a.animationState||(a.animationState=EN(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();er(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let FE=0;class $E extends ca{constructor(){super(...arguments),this.id=FE++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s}=this.node.presenceContext,{isPresent:l}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===l)return;const r=this.node.animationState.setActive("exit",!a);s&&!a&&r.then(()=>{s(this.id)})}mount(){const{register:a,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const QE={animation:{Feature:XE},exit:{Feature:$E}};function al(n){return{point:{x:n.pageX,y:n.pageY}}}const ZE=n=>a=>ud(a)&&n(a,al(a));function Ps(n,a,s,l){return Js(n,a,ZE(s),l)}const k0=({current:n})=>n?n.ownerDocument.defaultView:null,cx=(n,a)=>Math.abs(n-a);function JE(n,a){const s=cx(n.x,a.x),l=cx(n.y,a.y);return Math.sqrt(s**2+l**2)}const fx=new Set(["auto","scroll"]);class z0{constructor(a,s,{transformPagePoint:l,contextWindow:r=window,dragSnapToOrigin:c=!1,distanceThreshold:d=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=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;const w=$c(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,R=JE(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!R)return;const{point:A}=w,{timestamp:_}=rt;this.history.push({...A,timestamp:_});const{onStart:D,onMove:L}=this.handlers;j||(D&&D(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,w)},this.handlePointerMove=(w,j)=>{this.lastMoveEvent=w,this.lastMoveEventInfo=Fc(j,this.transformPagePoint),Ve.update(this.updatePoint,!0)},this.handlePointerUp=(w,j)=>{this.end();const{onEnd:R,onSessionEnd:A,resumeAnimation:_}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=$c(w.type==="pointercancel"?this.lastMoveEventInfo:Fc(j,this.transformPagePoint),this.history);this.startEvent&&R&&R(w,D),A&&A(w,D)},!ud(a))return;this.dragSnapToOrigin=c,this.handlers=s,this.transformPagePoint=l,this.distanceThreshold=d,this.contextWindow=r||window;const p=al(a),g=Fc(p,this.transformPagePoint),{point:v}=g,{timestamp:x}=rt;this.history=[{...v,timestamp:x}];const{onSessionStart:S}=s;S&&S(a,$c(g,this.history)),this.removeListeners=el(Ps(this.contextWindow,"pointermove",this.handlePointerMove),Ps(this.contextWindow,"pointerup",this.handlePointerUp),Ps(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(a){let s=a.parentElement;for(;s;){const l=getComputedStyle(s);(fx.has(l.overflowX)||fx.has(l.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const s=this.scrollPositions.get(a);if(!s)return;const l=a===window,r=l?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},c={x:r.x-s.x,y:r.y-s.y};c.x===0&&c.y===0||(l?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(a,r),Ve.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ra(this.updatePoint)}}function Fc(n,a){return a?{point:a(n.point)}:n}function dx(n,a){return{x:n.x-a.x,y:n.y-a.y}}function $c({point:n},a){return{point:n,delta:dx(n,V0(a)),offset:dx(n,IE(a)),velocity:WE(a,.1)}}function IE(n){return n[0]}function V0(n){return n[n.length-1]}function WE(n,a){if(n.length<2)return{x:0,y:0};let s=n.length-1,l=null;const r=V0(n);for(;s>=0&&(l=n[s],!(r.timestamp-l.timestamp>Rn(a)));)s--;if(!l)return{x:0,y:0};const c=Xt(r.timestamp-l.timestamp);if(c===0)return{x:0,y:0};const d={x:(r.x-l.x)/c,y:(r.y-l.y)/c};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}function eA(n,{min:a,max:s},l){return a!==void 0&&n<a?n=l?He(a,n,l.min):Math.max(n,a):s!==void 0&&n>s&&(n=l?He(s,n,l.max):Math.min(n,s)),n}function hx(n,a,s){return{min:a!==void 0?n.min+a:void 0,max:s!==void 0?n.max+s-(n.max-n.min):void 0}}function tA(n,{top:a,left:s,bottom:l,right:r}){return{x:hx(n.x,s,r),y:hx(n.y,a,l)}}function mx(n,a){let s=a.min-n.min,l=a.max-n.max;return a.max-a.min<n.max-n.min&&([s,l]=[l,s]),{min:s,max:l}}function nA(n,a){return{x:mx(n.x,a.x),y:mx(n.y,a.y)}}function aA(n,a){let s=.5;const l=mt(n),r=mt(a);return r>l?s=Fs(a.min,a.max-l,n.min):l>r&&(s=Fs(n.min,n.max-r,a.min)),rn(0,1,s)}function iA(n,a){const s={};return a.min!==void 0&&(s.min=a.min-n.min),a.max!==void 0&&(s.max=a.max-n.min),s}const Rf=.35;function sA(n=Rf){return n===!1?n=0:n===!0&&(n=Rf),{x:px(n,"left","right"),y:px(n,"top","bottom")}}function px(n,a,s){return{min:gx(n,a),max:gx(n,s)}}function gx(n,a){return typeof n=="number"?n:n[a]||0}const lA=new WeakMap;class oA{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=et(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:s=!1,distanceThreshold:l}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const c=x=>{s?(this.stopAnimation(),this.snapToCursor(al(x).point)):this.pauseAnimation()},d=(x,S)=>{this.stopAnimation();const{drag:w,dragPropagation:j,onDragStart:R}=this.getProps();if(w&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fj(w),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kt(_=>{let D=this.getAxisMotionValue(_).get()||0;if(on.test(D)){const{projection:L}=this.visualElement;if(L&&L.layout){const F=L.layout.layoutBox[_];F&&(D=mt(F)*(parseFloat(D)/100))}}this.originPoint[_]=D}),R&&Ve.postRender(()=>R(x,S)),Tf(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},h=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S;const{dragPropagation:w,dragDirectionLock:j,onDirectionLock:R,onDrag:A}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:_}=S;if(j&&this.currentDirection===null){this.currentDirection=rA(_),this.currentDirection!==null&&R&&R(this.currentDirection);return}this.updateAxis("x",S.point,_),this.updateAxis("y",S.point,_),this.visualElement.render(),A&&A(x,S)},p=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S,this.stop(x,S),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>Kt(x=>this.getAnimationState(x)==="paused"&&this.getAxisMotionValue(x).animation?.play()),{dragSnapToOrigin:v}=this.getProps();this.panSession=new z0(a,{onSessionStart:c,onStart:d,onMove:h,onSessionEnd:p,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,distanceThreshold:l,contextWindow:k0(this.visualElement),element:this.visualElement.current})}stop(a,s){const l=a||this.latestPointerEvent,r=s||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!r||!l)return;const{velocity:d}=r;this.startAnimation(d);const{onDragEnd:h}=this.getProps();h&&Ve.postRender(()=>h(l,r))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:l}=this.getProps();!l&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(a,s,l){const{drag:r}=this.getProps();if(!l||!Ao(a,r,this.currentDirection))return;const c=this.getAxisMotionValue(a);let d=this.originPoint[a]+l[a];this.constraints&&this.constraints[a]&&(d=eA(d,this.constraints[a],this.elastic[a])),c.set(d)}resolveConstraints(){const{dragConstraints:a,dragElastic:s}=this.getProps(),l=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;a&&Vs(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&l?this.constraints=tA(l.layoutBox,a):this.constraints=!1,this.elastic=sA(s),r!==this.constraints&&l&&this.constraints&&!this.hasMutatedConstraints&&Kt(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=iA(l.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!Vs(a))return!1;const l=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const c=cN(l,r.root,this.visualElement.getTransformPagePoint());let d=nA(r.layout.layoutBox,c);if(s){const h=s(oN(d));this.hasMutatedConstraints=!!h,h&&(d=i0(h))}return d}startAnimation(a){const{drag:s,dragMomentum:l,dragElastic:r,dragTransition:c,dragSnapToOrigin:d,onDragTransitionEnd:h}=this.getProps(),p=this.constraints||{},g=Kt(v=>{if(!Ao(v,s,this.currentDirection))return;let x=p&&p[v]||{};d&&(x={min:0,max:0});const S=r?200:1e6,w=r?40:1e7,j={type:"inertia",velocity:l?a[v]:0,bounceStiffness:S,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...c,...x};return this.startAxisValueAnimation(v,j)});return Promise.all(g).then(h)}startAxisValueAnimation(a,s){const l=this.getAxisMotionValue(a);return Tf(this.visualElement,a),l.start(id(a,l,0,s,this.visualElement,!1))}stopAnimation(){Kt(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Kt(a=>this.getAxisMotionValue(a).animation?.pause())}getAnimationState(a){return this.getAxisMotionValue(a).animation?.state}getAxisMotionValue(a){const s=`_drag${a.toUpperCase()}`,l=this.visualElement.getProps(),r=l[s];return r||this.visualElement.getValue(a,(l.initial?l.initial[a]:void 0)||0)}snapToCursor(a){Kt(s=>{const{drag:l}=this.getProps();if(!Ao(s,l,this.currentDirection))return;const{projection:r}=this.visualElement,c=this.getAxisMotionValue(s);if(r&&r.layout){const{min:d,max:h}=r.layout.layoutBox[s],p=c.get()||0;c.set(a[s]-He(d,h,.5)+p)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:l}=this.visualElement;if(!Vs(s)||!l||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Kt(d=>{const h=this.getAxisMotionValue(d);if(h&&this.constraints!==!1){const p=h.get();r[d]=aA({min:p,max:p},this.constraints[d])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",l.root&&l.root.updateScroll(),l.updateLayout(),this.resolveConstraints(),Kt(d=>{if(!Ao(d,a,null))return;const h=this.getAxisMotionValue(d),{min:p,max:g}=this.constraints[d];h.set(He(p,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;lA.set(this.visualElement,this);const a=this.visualElement.current,s=Ps(a,"pointerdown",p=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&!Iv(p.target)&&this.start(p)}),l=()=>{const{dragConstraints:p}=this.getProps();Vs(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,c=r.addEventListener("measure",l);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ve.read(l);const d=Js(window,"resize",()=>this.scalePositionWithinConstraints()),h=r.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&(Kt(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=p[v].translate,x.set(x.get()+p[v].translate))}),this.visualElement.render())}));return()=>{d(),s(),c(),h&&h()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:l=!1,dragPropagation:r=!1,dragConstraints:c=!1,dragElastic:d=Rf,dragMomentum:h=!0}=a;return{...a,drag:s,dragDirectionLock:l,dragPropagation:r,dragConstraints:c,dragElastic:d,dragMomentum:h}}}function Ao(n,a,s){return(a===!0||a===n)&&(s===null||s===n)}function rA(n,a=10){let s=null;return Math.abs(n.y)>a?s="y":Math.abs(n.x)>a&&(s="x"),s}class uA extends ca{constructor(a){super(a),this.removeGroupControls=Ft,this.removeListeners=Ft,this.controls=new oA(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ft}update(){const{dragControls:a}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};a!==s&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const yx=n=>(a,s)=>{n&&Ve.postRender(()=>n(a,s))};class cA extends ca{constructor(){super(...arguments),this.removePointerDownListener=Ft}onPointerDown(a){this.session=new z0(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:k0(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:l,onPanEnd:r}=this.node.getProps();return{onSessionStart:yx(a),onStart:yx(s),onMove:l,onEnd:(c,d)=>{delete this.session,r&&Ve.postRender(()=>r(c,d))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Qc=!1;class fA extends T.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:l,layoutId:r}=this.props,{projection:c}=a;c&&(s.group&&s.group.add(c),l&&l.register&&r&&l.register(c),Qc&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:l,drag:r,isPresent:c}=this.props,{projection:d}=l;return d&&(d.isPresent=c,Qc=!0,r||a.layoutDependency!==s||s===void 0||a.isPresent!==c?d.willUpdate():this.safeToRemove(),a.isPresent!==c&&(c?d.promote():d.relegate()||Ve.postRender(()=>{const h=d.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),rd.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:l}=this.props,{projection:r}=a;Qc=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),l&&l.deregister&&l.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function U0(n){const[a,s]=N0(),l=T.useContext(Bf);return m.jsx(fA,{...n,layoutGroup:l,switchLayoutGroup:T.useContext(_0),isPresent:a,safeToRemove:s})}const dA={pan:{Feature:cA},drag:{Feature:uA,ProjectionNode:j0,MeasureLayout:U0}};function xx(n,a,s){const{props:l}=n;n.animationState&&l.whileHover&&n.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,c=l[r];c&&Ve.postRender(()=>c(a,al(a)))}class hA extends ca{mount(){const{current:a}=this.node;a&&(this.unmount=$j(a,(s,l)=>(xx(this.node,l,"Start"),r=>xx(this.node,r,"End"))))}unmount(){}}class mA extends ca{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!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=el(Js(this.node.current,"focus",()=>this.onFocus()),Js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vx(n,a,s){const{props:l}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&l.whileTap&&n.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),c=l[r];c&&Ve.postRender(()=>c(a,al(a)))}class pA extends ca{mount(){const{current:a}=this.node;a&&(this.unmount=Jj(a,(s,l)=>(vx(this.node,l,"Start"),(r,{success:c})=>vx(this.node,r,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mf=new WeakMap,Zc=new WeakMap,gA=n=>{const a=Mf.get(n.target);a&&a(n)},yA=n=>{n.forEach(gA)};function xA({root:n,...a}){const s=n||document;Zc.has(s)||Zc.set(s,{});const l=Zc.get(s),r=JSON.stringify(a);return l[r]||(l[r]=new IntersectionObserver(yA,{root:n,...a})),l[r]}function vA(n,a,s){const l=xA(a);return Mf.set(n,s),l.observe(n),()=>{Mf.delete(n),l.unobserve(n)}}const bA={some:0,all:1};class SA extends ca{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:s,margin:l,amount:r="some",once:c}=a,d={root:s?s.current:void 0,rootMargin:l,threshold:typeof r=="number"?r:bA[r]},h=p=>{const{isIntersecting:g}=p;if(this.isInView===g||(this.isInView=g,c&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:x}=this.node.getProps(),S=g?v:x;S&&S(p)};return vA(this.node.current,d,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(TA(a,s))&&this.startObserver()}unmount(){}}function TA({viewport:n={}},{viewport:a={}}={}){return s=>n[s]!==a[s]}const wA={inView:{Feature:SA},tap:{Feature:pA},focus:{Feature:mA},hover:{Feature:hA}},CA={layout:{ProjectionNode:j0,MeasureLayout:U0}},jA={...QE,...wA,...dA,...CA},NA=PE(jA,KE);const EA=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AA=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,s,l)=>l?l.toUpperCase():s.toLowerCase()),bx=n=>{const a=AA(n);return a.charAt(0).toUpperCase()+a.slice(1)},B0=(...n)=>n.filter((a,s,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===s).join(" ").trim(),RA=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var MA={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 DA=T.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:r="",children:c,iconNode:d,...h},p)=>T.createElement("svg",{ref:p,...MA,width:a,height:a,stroke:n,strokeWidth:l?Number(s)*24/Number(a):s,className:B0("lucide",r),...!c&&!RA(h)&&{"aria-hidden":"true"},...h},[...d.map(([g,v])=>T.createElement(g,v)),...Array.isArray(c)?c:[c]]));const ye=(n,a)=>{const s=T.forwardRef(({className:l,...r},c)=>T.createElement(DA,{ref:c,iconNode:a,className:B0(`lucide-${EA(bx(n))}`,`lucide-${n}`,l),...r}));return s.displayName=bx(n),s};const OA=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Fo=ye("activity",OA);const _A=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],LA=ye("arrow-down",_A);const kA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],zA=ye("arrow-right",kA);const VA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ri=ye("check",VA);const UA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sx=ye("chevron-down",UA);const BA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],HA=ye("chevron-up",BA);const qA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jc=ye("circle-alert",qA);const GA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],yd=ye("circle-check-big",GA);const YA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],PA=ye("circle-check",YA);const KA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Tx=ye("circle-question-mark",KA);const XA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],H0=ye("circle-x",XA);const FA=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],$A=ye("cloud",FA);const QA=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],q0=ye("copy",QA);const ZA=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],JA=ye("download",ZA);const IA=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],WA=ye("external-link",IA);const eR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],G0=ye("file-text",eR);const tR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],nR=ye("funnel",tR);const aR=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Y0=ye("hash",aR);const iR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ic=ye("info",iR);const sR=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],wx=ye("key",sR);const lR=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],oR=ye("languages",lR);const rR=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Cx=ye("layout-dashboard",rR);const uR=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cR=ye("lock",uR);const fR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],$o=ye("message-square",fR);const dR=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],hR=ye("pause",dR);const mR=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],P0=ye("play",mR);const pR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],gR=ye("plus",pR);const yR=[["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"}]],un=ye("refresh-cw",yR);const xR=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Wc=ye("rotate-cw",xR);const vR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],K0=ye("search",vR);const bR=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],X0=ye("server",bR);const SR=[["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"}]],TR=ye("settings",SR);const wR=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],jx=ye("shield",wR);const CR=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],jR=ye("square-check-big",CR);const NR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],F0=ye("square",NR);const ER=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],$0=ye("terminal",ER);const AR=[["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"}]],RR=ye("triangle-alert",AR);const MR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xd=ye("x",MR);const DR=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],OR=ye("zap",DR),Q0="/assets/logo-BzryTZ7u.png",_R=({onNext:n})=>{const{t:a}=wt();return m.jsxs("div",{className:"flex flex-col h-full justify-center items-center text-center max-w-lg mx-auto",children:[m.jsxs("div",{className:"mb-8",children:[m.jsx("img",{src:Q0,alt:"Vibe Remote Logo",className:"w-20 h-20 mx-auto mb-6 drop-shadow-lg"}),m.jsx("h1",{className:"text-4xl font-display font-bold mb-4 text-text",children:a("welcome.title")}),m.jsx("p",{className:"text-xl text-muted font-light",children:a("welcome.subtitle")})]}),m.jsxs("div",{className:"space-y-4 text-left w-full mb-10 bg-panel border border-border p-6 rounded-xl shadow-sm",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2"}),m.jsx("p",{className:"text-text",children:a("welcome.feature1")})]}),m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2"}),m.jsx("p",{className:"text-text",children:a("welcome.feature2")})]}),m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2"}),m.jsx("p",{className:"text-text",children:a("welcome.feature3")})]})]}),m.jsxs("button",{onClick:()=>n({}),className:"group flex items-center gap-2 px-8 py-3 bg-accent hover:bg-accent/90 text-white rounded-full font-bold text-lg transition-all shadow-md hover:shadow-lg hover:-translate-y-0.5",children:[a("welcome.getStarted")," ",m.jsx(zA,{size:20,className:"group-hover:translate-x-1 transition-transform"})]})]})};function Z0(n){var a,s,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(a=0;a<r;a++)n[a]&&(s=Z0(n[a]))&&(l&&(l+=" "),l+=s)}else for(s in n)n[s]&&(l&&(l+=" "),l+=s);return l}function Le(){for(var n,a,s=0,l="",r=arguments.length;s<r;s++)(n=arguments[s])&&(a=Z0(n))&&(l&&(l+=" "),l+=a);return l}const LR=({data:n,onNext:a,onBack:s})=>{const{t:l}=wt(),[r,c]=Ye.useState(n.mode||"self_host"),d=[{id:"saas",title:l("modeSelection.saasMode"),description:l("modeSelection.saasDescription"),icon:$A,disabled:!0},{id:"self_host",title:l("modeSelection.selfHostMode"),description:l("modeSelection.selfHostDescription"),icon:X0}];return m.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto",children:[m.jsx("h2",{className:"text-3xl font-display font-bold mb-6 text-text",children:l("modeSelection.title")}),m.jsx("div",{className:"grid gap-4 mb-8",children:d.map(h=>{const p=r===h.id,g=h.icon,v=h.disabled;return m.jsxs("button",{onClick:()=>{v||c(h.id)},disabled:v,className:Le("flex items-start gap-4 p-6 rounded-xl border-2 text-left transition-all",p?"border-accent bg-accent/5 shadow-md":"border-border bg-panel",v?"opacity-50 cursor-not-allowed":"hover:border-accent/50"),children:[m.jsx("div",{className:Le("p-3 rounded-lg",p?"bg-accent/10 text-accent":"bg-neutral-100 text-muted"),children:m.jsx(g,{size:24})}),m.jsxs("div",{children:[m.jsx("h3",{className:Le("font-semibold text-lg font-display",p?"text-accent":"text-text"),children:h.title}),m.jsx("p",{className:"text-muted mt-1",children:h.description})]})]},h.id)})}),m.jsxs("div",{className:"mt-auto flex justify-between",children:[m.jsx("button",{onClick:s,className:"px-6 py-2 text-muted hover:text-text font-medium",children:l("common.back")}),m.jsx("button",{onClick:()=>a({mode:r}),className:"px-8 py-3 bg-accent hover:bg-accent/90 text-white rounded-lg font-medium transition-colors shadow-sm",children:l("common.continue")})]})]})},J0=T.createContext(void 0),_n=()=>{const n=T.useContext(J0);if(!n)throw new Error("useApi must be used within ApiProvider");return n},kR=({children:n})=>{const a=async r=>{const c=await fetch(r);if(!c.ok)throw new Error(`Request failed: ${r}`);return c.json()},s=async(r,c)=>{const d=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`Request failed: ${r}`);return d.json()},l={getConfig:()=>a("/config"),saveConfig:r=>s("/config",r),getSettings:()=>a("/settings"),saveSettings:r=>s("/settings",r),detectCli:r=>a(`/cli/detect?binary=${encodeURIComponent(r)}`),slackAuthTest:r=>s("/slack/auth_test",{bot_token:r}),slackChannels:r=>s("/slack/channels",{bot_token:r}),slackManifest:()=>a("/slack/manifest"),doctor:()=>s("/doctor",{}),opencodeOptions:r=>s("/opencode/options",{cwd:r}),getLogs:(r=500)=>s("/logs",{lines:r}),getVersion:()=>a("/version"),doUpgrade:()=>s("/upgrade",{})};return m.jsx(J0.Provider,{value:l,children:n})},zR=({data:n,onNext:a,onBack:s})=>{const{t:l}=wt(),r=_n(),[c,d]=T.useState(!1),[h,p]=T.useState(n.default_backend||"opencode"),[g,v]=T.useState(n.agents||{opencode:{enabled:!0,cli_path:"opencode",status:"unknown"},claude:{enabled:!0,cli_path:"claude",status:"unknown"},codex:{enabled:!1,cli_path:"codex",status:"unknown"}}),x=A=>A.status==="missing";T.useEffect(()=>{n.agents||w()},[]);const S=async A=>{d(!0);try{let _;_=await r.detectCli(A),v(D=>({...D,[A]:{...D[A],cli_path:_.path||D[A].cli_path,status:_.found?"ok":"missing"}}))}finally{d(!1)}},w=async()=>{await Promise.all(Object.keys(g).map(A=>S(A)))},j=(A,_)=>{v(D=>({...D,[A]:{...D[A],enabled:_}}))},R=Object.values(g).some(A=>A.enabled);return m.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto",children:[m.jsx("h2",{className:"text-3xl font-display font-bold mb-2 text-text",children:l("agentDetection.title")}),m.jsx("p",{className:"text-muted mb-6",children:l("agentDetection.subtitle")}),m.jsxs("div",{className:"mb-6 p-4 border border-border rounded-xl bg-panel shadow-sm",children:[m.jsx("label",{className:"text-sm font-medium text-muted uppercase",children:l("agentDetection.defaultBackend")}),m.jsxs("select",{value:h,onChange:A=>p(A.target.value),className:"mt-2 w-full bg-bg border border-border rounded px-3 py-2 text-sm",children:[m.jsxs("option",{value:"opencode",children:["OpenCode ",l("agentDetection.recommended")]}),m.jsx("option",{value:"claude",children:"Claude"}),m.jsx("option",{value:"codex",children:"Codex"})]})]}),m.jsx("div",{className:"flex justify-end mb-4",children:m.jsxs("button",{onClick:w,className:"flex items-center gap-2 px-4 py-2 bg-neutral-100 hover:bg-neutral-200 text-text rounded-lg transition-colors font-medium text-sm",children:[m.jsx(K0,{size:16})," ",l("common.detectAll")]})}),m.jsx("div",{className:"space-y-4 mb-6",children:Object.entries(g).map(([A,_])=>m.jsxs("div",{className:"p-5 bg-panel border border-border rounded-xl shadow-sm transition-shadow hover:shadow-md",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"font-semibold capitalize text-lg text-text font-display",children:A}),m.jsx("p",{className:"text-sm text-muted",children:l("agentDetection.cliPathDetection")})]}),m.jsx(VR,{status:_.status||"unknown",loading:c})]}),m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("label",{className:"flex items-center gap-2 text-sm text-text font-medium cursor-pointer w-fit",children:[m.jsx("input",{type:"checkbox",checked:_.enabled,onChange:D=>j(A,D.target.checked),className:"w-4 h-4 text-accent rounded focus:ring-accent border-gray-300"}),l("common.enabled")]}),m.jsxs("div",{className:"flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[m.jsx("label",{className:"text-xs font-medium text-muted uppercase",children:l("agentDetection.cliPath")}),x(_)&&m.jsx("span",{className:"text-[10px] text-danger bg-danger/10 px-1.5 py-0.5 rounded border border-danger/20",children:l("common.notFound")}),!x(_)&&_.status==="ok"&&m.jsx("span",{className:"text-[10px] text-success bg-success/10 px-1.5 py-0.5 rounded border border-success/20",children:l("common.found")})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("input",{type:"text",value:_.cli_path,onChange:D=>v(L=>({...L,[A]:{...L[A],cli_path:D.target.value}})),placeholder:l("agentDetection.cliPathPlaceholder",{name:A}),className:"flex-1 bg-bg border border-border rounded px-3 py-2 text-sm focus:outline-none focus:border-accent font-mono text-text"}),m.jsx("button",{onClick:()=>S(A),disabled:c,className:"px-3 py-2 bg-neutral-100 hover:bg-neutral-200 rounded text-sm text-muted hover:text-text font-medium transition-colors border border-border",children:c?m.jsx(un,{size:14,className:"animate-spin"}):l("common.detect")})]})]})]})]},A))}),m.jsxs("div",{className:"mt-auto flex justify-between pt-4",children:[m.jsx("button",{onClick:s,className:"px-6 py-2 text-muted hover:text-text font-medium transition-colors",children:l("common.back")}),m.jsx("button",{onClick:()=>a({agents:g,default_backend:h}),disabled:!R,className:Le("px-8 py-3 rounded-lg font-medium transition-colors shadow-sm",R?"bg-accent hover:bg-accent/90 text-white":"bg-neutral-200 text-muted cursor-not-allowed"),children:l("common.continue")})]})]})},VR=({status:n,loading:a})=>{const{t:s}=wt();return a?m.jsx("div",{className:"animate-spin text-muted",children:m.jsx(un,{size:20})}):n==="unknown"?m.jsx("span",{className:"text-sm text-muted italic",children:s("common.notChecked")}):n==="ok"?m.jsxs("div",{className:"flex items-center gap-2 text-success bg-success/10 px-3 py-1 rounded-full text-sm font-medium border border-success/20",children:[m.jsx(Ri,{size:14})," ",s("common.found")]}):m.jsxs("div",{className:"flex items-center gap-2 text-danger bg-danger/10 px-3 py-1 rounded-full text-sm font-medium border border-danger/20",children:[m.jsx(xd,{size:14})," ",s("common.missing")]})},UR=({data:n,onNext:a,onBack:s})=>{const{t:l}=wt(),r=_n(),[c,d]=T.useState(n.slack?.bot_token||n.slackBotToken||""),[h,p]=T.useState(n.slack?.app_token||n.slackAppToken||""),[g]=T.useState(n.mode||"saas"),[v,x]=T.useState(!1),[S,w]=T.useState(null),[j,R]=T.useState(""),[A,_]=T.useState(""),[D,L]=T.useState(!1),[F,H]=T.useState(!1),[Q,X]=T.useState({1:!0,2:!1,3:!1,4:!1}),q=T.useMemo(()=>g==="saas"?!0:c.startsWith("xoxb-")&&h.startsWith("xapp-"),[g,c,h]);T.useEffect(()=>{g==="self_host"&&$()},[g]),T.useEffect(()=>{c.startsWith("xoxb-")&&!Q[3]&&X(ie=>({...ie,2:!1,3:!0}))},[c]),T.useEffect(()=>{h.startsWith("xapp-")&&!Q[4]&&X(ie=>({...ie,3:!1,4:!0}))},[h]);const $=async()=>{L(!0);try{const ie=await r.slackManifest();ie.ok&&(ie.manifest&&R(ie.manifest),ie.manifest_compact&&_(ie.manifest_compact))}catch(ie){console.error("Failed to load manifest:",ie)}finally{L(!1)}},Z=async()=>{if(j)try{await navigator.clipboard.writeText(j),H(!0),setTimeout(()=>H(!1),2e3)}catch(ie){console.error("Failed to copy:",ie)}},re=()=>{if(A){const ie=`https://api.slack.com/apps?new_app=1&manifest_json=${encodeURIComponent(A)}`;window.open(ie,"_blank")}else window.open("https://api.slack.com/apps?new_app=1","_blank")},de=async()=>{x(!0);try{const ie=await r.slackAuthTest(c);w(ie)}catch(ie){w({ok:!1,error:ie?.message||"Request failed"})}finally{x(!1)}},W=ie=>{X(O=>({...O,[ie]:!O[ie]}))},le=({step:ie,title:O,icon:U,completed:J})=>m.jsxs("button",{onClick:()=>W(ie),className:"w-full px-4 py-3 flex items-center justify-between bg-neutral-50 hover:bg-neutral-100 transition-colors",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:Le("w-7 h-7 rounded-full text-sm font-bold flex items-center justify-center transition-colors",J?"bg-success text-white":"bg-accent text-white"),children:J?m.jsx(Ri,{size:14}):ie}),m.jsxs("span",{className:"flex items-center gap-2 font-semibold text-text",children:[U,O]})]}),Q[ie]?m.jsx(HA,{size:18,className:"text-muted"}):m.jsx(Sx,{size:18,className:"text-muted"})]});return m.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto",children:[m.jsxs("div",{className:"mb-4",children:[m.jsx("h2",{className:"text-3xl font-display font-bold text-text",children:l("slackConfig.title")}),m.jsx("p",{className:"text-muted mt-1",children:l(g==="saas"?"slackConfig.saasDescription":"slackConfig.selfHostDescription")})]}),g==="saas"?m.jsxs("div",{className:"flex flex-col items-center justify-center h-64 border-2 border-dashed border-border rounded-xl bg-neutral-50",children:[m.jsx("p",{className:"text-muted mb-6 text-center max-w-xs",children:l("slackConfig.oauthPrompt")}),m.jsx("button",{className:"px-6 py-3 bg-accent text-white rounded-lg font-medium hover:bg-accent/90 transition-colors shadow-sm",children:l("slackConfig.openSlackOAuth")}),m.jsx("p",{className:"text-xs text-muted mt-6",children:l("slackConfig.afterAuth")})]}):m.jsxs("div",{className:"space-y-3 overflow-y-auto flex-1 pr-1",children:[m.jsxs("div",{className:"bg-panel border border-border rounded-xl overflow-hidden",children:[m.jsx(le,{step:1,title:l("slackConfig.step1Title"),icon:m.jsx(gR,{size:16,className:"text-accent"})}),Q[1]&&m.jsxs("div",{className:"p-4 space-y-4 border-t border-border",children:[m.jsx("p",{className:"text-sm text-muted",children:l("slackConfig.step1Description")}),m.jsx("div",{className:"flex flex-wrap gap-2",children:m.jsxs("button",{onClick:re,disabled:!A||D,className:"flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium shadow-sm",children:[m.jsx(WA,{size:16}),l("slackConfig.createSlackApp")]})}),j&&m.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[m.jsxs("details",{className:"group",children:[m.jsxs("summary",{className:"cursor-pointer text-accent hover:text-accent/80 flex items-center gap-1",children:[m.jsx(Sx,{size:14,className:"transition-transform group-open:rotate-180"}),l("slackConfig.viewManifest")]}),m.jsx("pre",{className:"mt-2 bg-neutral-900 text-neutral-100 p-3 rounded-lg text-xs overflow-x-auto max-h-40 overflow-y-auto font-mono",children:j})]}),m.jsx("span",{className:"text-muted",children:"|"}),m.jsxs("button",{onClick:Z,disabled:D,className:"flex items-center gap-1 text-accent hover:text-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[F?m.jsx(Ri,{size:14}):m.jsx(q0,{size:14}),l(F?"slackConfig.copied":"slackConfig.copyManifest")]})]}),D&&m.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted",children:[m.jsx(un,{size:14,className:"animate-spin"}),l("common.loading")]}),m.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 text-sm text-blue-800",children:[m.jsxs("strong",{children:[l("slackConfig.tip"),":"]})," ",l("slackConfig.step1Tip")]})]})]}),m.jsxs("div",{className:"bg-panel border border-border rounded-xl overflow-hidden",children:[m.jsx(le,{step:2,title:l("slackConfig.step2Title"),icon:m.jsx(jx,{size:16,className:"text-accent"}),completed:c.startsWith("xoxb-")}),Q[2]&&m.jsxs("div",{className:"p-4 space-y-4 border-t border-border",children:[m.jsx("p",{className:"text-sm text-muted",children:l("slackConfig.step2Description")}),m.jsxs("ol",{className:"list-decimal list-inside space-y-1.5 text-sm text-muted pl-1",children:[m.jsx("li",{children:l("slackConfig.step2Item1")}),m.jsx("li",{children:l("slackConfig.step2Item2")}),m.jsx("li",{children:l("slackConfig.step2Item3")}),m.jsx("li",{children:l("slackConfig.step2Item4")})]}),m.jsxs("div",{className:"space-y-2 pt-2",children:[m.jsxs("label",{className:"text-sm font-medium text-text flex items-center gap-2",children:[m.jsx(wx,{size:16,className:"text-accent"})," ",l("slackConfig.botToken")]}),m.jsx("input",{type:"password",value:c,onChange:ie=>d(ie.target.value),placeholder:l("slackConfig.botTokenPlaceholder"),className:"w-full bg-bg border border-border rounded-lg p-3 text-text focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent font-mono transition-colors"}),m.jsxs("p",{className:"text-xs text-muted",children:[l("slackConfig.botTokenHint")," ",m.jsx("code",{className:"bg-neutral-100 px-1.5 py-0.5 rounded text-text",children:"xoxb-"})]})]})]})]}),m.jsxs("div",{className:"bg-panel border border-border rounded-xl overflow-hidden",children:[m.jsx(le,{step:3,title:l("slackConfig.step3Title"),icon:m.jsx(cR,{size:16,className:"text-accent"}),completed:h.startsWith("xapp-")}),Q[3]&&m.jsxs("div",{className:"p-4 space-y-4 border-t border-border",children:[m.jsx("p",{className:"text-sm text-muted",children:l("slackConfig.step3Description")}),m.jsxs("ol",{className:"list-decimal list-inside space-y-1.5 text-sm text-muted pl-1",children:[m.jsx("li",{children:l("slackConfig.step3Item1")}),m.jsx("li",{children:l("slackConfig.step3Item2")}),m.jsx("li",{children:l("slackConfig.step3Item3")}),m.jsx("li",{children:l("slackConfig.step3Item4")}),m.jsx("li",{children:l("slackConfig.step3Item5")})]}),m.jsxs("div",{className:"space-y-2 pt-2",children:[m.jsxs("label",{className:"text-sm font-medium text-text flex items-center gap-2",children:[m.jsx(wx,{size:16,className:"text-accent"})," ",l("slackConfig.appToken")]}),m.jsx("input",{type:"password",value:h,onChange:ie=>p(ie.target.value),placeholder:l("slackConfig.appTokenPlaceholder"),className:"w-full bg-bg border border-border rounded-lg p-3 text-text focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent font-mono transition-colors"}),m.jsxs("p",{className:"text-xs text-muted",children:[l("slackConfig.appTokenHint")," ",m.jsx("code",{className:"bg-neutral-100 px-1.5 py-0.5 rounded text-text",children:"xapp-"})]})]}),m.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-sm text-yellow-800",children:[m.jsxs("strong",{children:[l("slackConfig.important"),":"]})," ",l("slackConfig.step3Warning")]})]})]}),m.jsxs("div",{className:"bg-panel border border-border rounded-xl overflow-hidden",children:[m.jsx(le,{step:4,title:l("slackConfig.step4Title"),icon:m.jsx(Y0,{size:16,className:"text-accent"}),completed:S?.ok}),Q[4]&&m.jsxs("div",{className:"p-4 space-y-4 border-t border-border",children:[m.jsx("p",{className:"text-sm text-muted",children:l("slackConfig.step4Description")}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("button",{onClick:de,disabled:!c||!h||v,className:"px-4 py-2 bg-accent text-white rounded-lg flex items-center gap-2 transition-colors font-medium shadow-sm hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed",children:[v?m.jsx(un,{size:16,className:"animate-spin"}):m.jsx(jx,{size:16}),l("slackConfig.validateTokens")]}),S&&m.jsx("span",{className:Le("flex items-center gap-2 text-sm font-medium px-3 py-1.5 rounded-lg border",S.ok?"text-success bg-success/10 border-success/20":"text-danger bg-danger/10 border-danger/20"),children:S.ok?m.jsxs(m.Fragment,{children:[m.jsx(Ri,{size:14}),m.jsx("span",{children:l("slackConfig.tokenValidated")})]}):m.jsxs("span",{children:[l("slackConfig.authFailed"),": ",S.error]})})]}),S?.ok&&m.jsxs("div",{className:"space-y-3 pt-2",children:[m.jsx("p",{className:"text-sm font-medium text-text",children:l("slackConfig.inviteBotTitle")}),m.jsxs("ol",{className:"list-decimal list-inside space-y-1.5 text-sm text-muted pl-1",children:[m.jsx("li",{children:l("slackConfig.step4Item1")}),m.jsx("li",{children:l("slackConfig.step4Item2")}),m.jsx("li",{children:l("slackConfig.step4Item3")})]}),m.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 text-sm text-green-800",children:[m.jsxs("strong",{children:[l("slackConfig.tip"),":"]})," ",l("slackConfig.step4Tip")]})]})]})]})]}),m.jsxs("div",{className:"mt-auto flex justify-between pt-6 border-t border-border",children:[m.jsx("button",{onClick:s,className:"px-6 py-2 text-muted hover:text-text font-medium transition-colors",children:l("common.back")}),m.jsx("button",{onClick:()=>a({slack:{...n.slack,bot_token:c,app_token:h},mode:g}),disabled:!q,className:Le("px-8 py-3 rounded-lg font-medium transition-colors shadow-sm",q?"bg-accent hover:bg-accent/90 text-white":"bg-neutral-200 text-muted cursor-not-allowed"),children:l("common.continue")})]})]})},I0=T.createContext(null);let BR=0;const HR=({children:n})=>{const[a,s]=T.useState([]),l=T.useCallback((c,d="success")=>{const h=++BR;s(p=>[...p,{id:h,message:c,type:d}]),setTimeout(()=>{s(p=>p.filter(g=>g.id!==h))},3e3)},[]),r=T.useCallback(c=>{s(d=>d.filter(h=>h.id!==c))},[]);return m.jsxs(I0.Provider,{value:{showToast:l},children:[n,m.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(c=>m.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg border animate-slide-in ${c.type==="success"?"bg-success/10 border-success/30 text-success":"bg-error/10 border-error/30 text-error"}`,children:[c.type==="success"?m.jsx(yd,{size:18}):m.jsx(H0,{size:18}),m.jsx("span",{className:"text-sm font-medium",children:c.message}),m.jsx("button",{onClick:()=>r(c.id),className:"ml-2 opacity-60 hover:opacity-100 transition-opacity",children:m.jsx(xd,{size:14})})]},c.id))})]})},qR=()=>{const n=T.useContext(I0);if(!n)throw new Error("useToast must be used within a ToastProvider");return n};function GR({value:n,onCommit:a,...s}){const[l,r]=T.useState(n);return T.useEffect(()=>r(n),[n]),m.jsx("input",{...s,value:l,onChange:c=>r(c.target.value),onBlur:()=>{l!==n&&a(l)}})}const W0=({data:n={},onNext:a,onBack:s,isPage:l})=>{const{t:r}=wt(),c=_n(),{showToast:d}=qR(),[h,p]=T.useState(!1),[g,v]=T.useState([]),[x,S]=T.useState(n.channelConfigs||{}),[w,j]=T.useState(n),[R,A]=T.useState(null),[_,D]=T.useState({});T.useEffect(()=>{l||S(n.channelConfigs||{})},[n.channelConfigs,l]),T.useEffect(()=>{l&&c.getConfig().then(W=>{j(W),c.getSettings().then(le=>{S(le.channels||{})})})},[l]);const L=w.slack?.bot_token||w.slackBotToken||"",F=async()=>{if(L){p(!0);try{const W=await c.slackChannels(L);W.ok&&v(W.channels||[])}catch(W){console.error("Failed to load channels:",W)}finally{p(!1)}}},H=async()=>{try{const W=w.runtime?.default_cwd||".",le=await c.opencodeOptions(W);le.ok&&A(le.data)}catch(W){console.error("Failed to load OpenCode options:",W)}};T.useEffect(()=>{L&&F()},[L]),T.useEffect(()=>{w.agents?.opencode?.enabled&&H()},[w.agents?.opencode?.enabled]),T.useEffect(()=>{g.length&&D(W=>{const le={...W};return g.forEach(ie=>{const O=x[ie.id]?.routing?.opencode_model||"";le[ie.id]!==O&&(le[ie.id]=O)}),le})},[g,x]);const Q=W=>{const le=x[W];return le?le.enabled!==!1:!1},X=async W=>{if(!l){S(W);return}p(!0);try{await c.saveSettings({channels:W}),d(r("channelList.settingsSaved"))}catch{d(r("channelList.settingsSaveFailed"),"error")}finally{p(!1)}},q=(W,le)=>{const O={...x[W]||$(),...le};O.show_message_types||(O.show_message_types=$().show_message_types),(!O.routing||typeof O.routing!="object")&&(O.routing={agent_backend:w.agents?.default_backend||"opencode"});const U={...x,[W]:O};S(U),X(U)},$=()=>({enabled:!1,show_message_types:[],custom_cwd:"",routing:{agent_backend:w.agents?.default_backend||"opencode",opencode_agent:null,opencode_model:null,opencode_reasoning_effort:null},require_mention:null}),Z=Ye.useMemo(()=>{const W=R?.reasoning_options||{};return W&&typeof W=="object"?W:{}},[R]),re=W=>Z[W]||[],de=g.filter(W=>Q(W.id)).length;return m.jsxs("div",{className:Le("flex flex-col h-full",l?"max-w-5xl mx-auto":""),children:[m.jsx("div",{className:"flex justify-between items-center mb-6",children:m.jsxs("div",{children:[m.jsx("h2",{className:Le("font-display font-bold",l?"text-3xl":"text-2xl"),children:r("channelList.title")}),m.jsx("p",{className:"text-muted",children:r("channelList.subtitle")})]})}),m.jsxs("div",{className:"mb-4 bg-panel border border-border p-4 rounded-lg space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsxs("button",{onClick:F,className:"flex items-center gap-2 px-3 py-1.5 bg-neutral-100 hover:bg-neutral-200 text-text rounded text-sm font-medium transition-colors",children:[m.jsx(un,{size:14,className:h?"animate-spin":""})," ",r("channelList.refreshList")]}),m.jsxs("span",{className:"relative group",children:[m.jsxs("span",{className:"flex items-center gap-1 text-sm text-muted cursor-help",children:[m.jsx(Tx,{size:14}),r("channelList.cantFindChannel")]}),m.jsx("span",{className:"absolute bottom-full left-0 mb-2 px-3 py-2 bg-text text-bg text-xs rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 w-64 whitespace-normal",children:r("channelList.inviteBotHint")})]}),g.length===0&&!h&&m.jsx("span",{className:"text-sm text-warning",children:r("channelList.noChannelsFound")})]}),m.jsx("span",{className:"text-sm text-muted font-mono",children:r("channelList.enabledCount",{count:de})})]}),l&&m.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[m.jsx("span",{className:"text-muted",children:r("channelList.accessPolicy")}),m.jsx("span",{className:"text-xs text-muted",children:r("channelList.accessPolicyHint")})]})]}),m.jsxs("div",{className:"flex-1 overflow-y-auto border border-border rounded-xl divide-y divide-border bg-panel shadow-sm",children:[!h&&g.length===0&&!L&&m.jsx("div",{className:"p-8 text-center text-muted",children:r("channelList.addTokenFirst")}),g.map(W=>{const le=x[W.id]||{},ie=$(),O={...ie,...le,enabled:Q(W.id),show_message_types:le.show_message_types||ie.show_message_types,routing:{...ie.routing,...le.routing||{}},require_mention:le.require_mention!==void 0?le.require_mention:ie.require_mention};return m.jsxs("div",{className:"p-4 hover:bg-neutral-50/50 transition-colors",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("button",{onClick:()=>q(W.id,{enabled:!O.enabled}),className:O.enabled?"text-accent":"text-muted",children:O.enabled?m.jsx(jR,{size:20}):m.jsx(F0,{size:20})}),m.jsxs("div",{children:[m.jsxs("div",{className:"font-medium flex items-center gap-1 text-text",children:[m.jsx(Y0,{size:14,className:"text-muted"})," ",W.name]}),m.jsxs("div",{className:"text-xs text-muted font-mono",children:["ID: ",W.id]})]})]}),m.jsx("span",{className:Le("text-xs px-2 py-0.5 rounded-full border",W.is_private?"bg-warning/10 text-warning border-warning/20":"bg-success/10 text-success border-success/20"),children:W.is_private?r("common.private"):r("common.public")})]}),O.enabled&&m.jsxs("div",{className:"mt-4 pl-8 space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("label",{className:"text-xs font-medium text-muted uppercase",children:r("channelList.workingDirectory")}),m.jsx(GR,{type:"text",placeholder:w.runtime?.default_cwd||r("channelList.useGlobalDefault"),value:O.custom_cwd,onCommit:U=>q(W.id,{custom_cwd:U}),className:"w-full bg-bg border border-border rounded px-3 py-2 text-sm focus:outline-none focus:border-accent text-text placeholder:text-muted/50 font-mono"})]}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("label",{className:"text-xs font-medium text-muted uppercase",children:r("channelList.backend")}),m.jsxs("select",{value:O.routing.agent_backend||"",onChange:U=>q(W.id,{routing:{...O.routing,agent_backend:U.target.value||null}}),className:"w-full bg-bg border border-border rounded px-3 py-2 text-sm focus:outline-none focus:border-accent text-text",children:[m.jsxs("option",{value:"",children:[r("common.default")," (",w.agents?.default_backend||"opencode",")"]}),m.jsx("option",{value:"opencode",children:"OpenCode"}),m.jsx("option",{value:"claude",children:"Claude"}),m.jsx("option",{value:"codex",children:"Codex"})]})]}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("label",{className:"text-xs font-medium text-muted uppercase",children:r("channelList.requireMention")}),m.jsxs("select",{value:O.require_mention===null||O.require_mention===void 0?"":O.require_mention?"true":"false",onChange:U=>{const J=U.target.value;q(W.id,{require_mention:J===""?null:J==="true"})},className:"w-full bg-bg border border-border rounded px-3 py-2 text-sm focus:outline-none focus:border-accent text-text",children:[m.jsxs("option",{value:"",children:[r("common.default")," (",w.slack?.require_mention?r("common.enabled"):r("common.disabled"),")"]}),m.jsx("option",{value:"true",children:r("channelList.requireMentionOn")}),m.jsx("option",{value:"false",children:r("channelList.requireMentionOff")})]})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"text-xs font-medium text-muted uppercase flex items-center gap-1",children:[r("channelList.showMessageTypes"),m.jsxs("span",{className:"relative group",children:[m.jsx(Tx,{size:12,className:"text-muted/50 cursor-help"}),m.jsx("span",{className:"absolute bottom-full left-0 mb-2 px-3 py-2 bg-text text-bg text-xs rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 w-64 whitespace-normal font-normal normal-case",children:r("channelList.showMessageTypesHint")})]})]}),m.jsx("div",{className:"flex flex-wrap gap-3 text-sm",children:["system","assistant","toolcall"].map(U=>{const J=O.show_message_types.includes(U);return m.jsxs("label",{className:"flex items-center gap-2 text-text",children:[m.jsx("input",{type:"checkbox",checked:J,onChange:()=>{const ue=J?O.show_message_types.filter(he=>he!==U):[...O.show_message_types,U];q(W.id,{show_message_types:ue})},className:"h-4 w-4 rounded border-border text-accent focus:ring-accent"}),m.jsx("span",{className:"capitalize",children:U==="toolcall"?"Toolcall":U})]},U)})})]}),O.routing.agent_backend==="opencode"&&m.jsxs("div",{className:"space-y-3",children:[m.jsx("div",{className:"text-xs font-medium text-muted uppercase",children:r("channelList.opencodeSettings")}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 bg-bg/50 p-3 rounded border border-border",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("label",{className:"text-xs text-muted",children:r("channelList.agent")}),m.jsxs("select",{value:O.routing.opencode_agent||"",onChange:U=>q(W.id,{routing:{...O.routing,opencode_agent:U.target.value||null}}),className:"w-full bg-panel border border-border rounded px-3 py-2 text-sm",children:[m.jsx("option",{value:"",children:r("common.default")}),(R?.agents||[]).map(U=>m.jsx("option",{value:U.name,children:U.name},U.name))]})]}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("label",{className:"text-xs text-muted",children:r("channelList.model")}),m.jsxs("select",{value:O.routing.opencode_model||"",onChange:U=>{const J=U.target.value||"";D(ue=>({...ue,[W.id]:J})),q(W.id,{routing:{...O.routing,opencode_model:J||null,opencode_reasoning_effort:null}})},className:"w-full bg-panel border border-border rounded px-3 py-2 text-sm",children:[m.jsx("option",{value:"",children:r("common.default")}),(R?.models?.providers||[]).flatMap(U=>{const J=U.id||U.provider_id||U.name,ue=U.name||J,he=U.models||{};return Array.isArray(he)?he.map(N=>{const Y=typeof N=="string"?N:N.id;return m.jsxs("option",{value:`${J}/${Y}`,children:[ue,"/",Y]},`${J}:${Y}`)}):Object.keys(he).map(N=>m.jsxs("option",{value:`${J}/${N}`,children:[ue,"/",N]},`${J}:${N}`))})]})]}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("label",{className:"text-xs text-muted",children:r("channelList.reasoningEffort")}),m.jsxs("select",{value:O.routing.opencode_reasoning_effort||"",onChange:U=>q(W.id,{routing:{...O.routing,opencode_reasoning_effort:U.target.value||null}}),disabled:!re(_[W.id]||O.routing.opencode_model||"").length,className:"w-full bg-panel border border-border rounded px-3 py-2 text-sm disabled:opacity-50",children:[m.jsx("option",{value:"",children:r("common.default")}),re(_[W.id]||O.routing.opencode_model||"").map(U=>m.jsx("option",{value:U.value,children:U.label},U.value))]})]})]})]})]})]},W.id)}),g.length===0&&!h&&m.jsx("div",{className:"p-8 text-center text-muted",children:r("channelList.noChannelsLoaded")})]}),!l&&m.jsxs("div",{className:"mt-6 flex justify-between",children:[m.jsx("button",{onClick:s,className:"px-6 py-2 text-muted hover:text-text font-medium",children:r("common.back")}),m.jsx("button",{onClick:()=>a&&a({channelConfigs:x}),className:"px-6 py-2 bg-accent hover:bg-accent/90 text-white rounded-lg font-medium shadow-sm",children:r("common.continue")})]})]})},eb=T.createContext(void 0),vd=()=>{const n=T.useContext(eb);if(!n)throw new Error("useStatus must be used within a StatusProvider");return n},YR=({children:n})=>{const[a,s]=T.useState({}),[l,r]=T.useState(!1),c=async()=>{try{(await fetch("/health")).ok?r(!0):r(!1)}catch{r(!1)}},d=async()=>{try{const p=await fetch("/status");if(p.ok){const g=await p.json();s(g)}}catch(p){console.error("Failed to fetch status",p)}},h=async(p,g={})=>{try{const v=await fetch("/control",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:p,...g})});if(v.ok)return await d(),await v.json()}catch(v){throw console.error("Control action failed",v),v}};return T.useEffect(()=>{c(),d();const p=setInterval(()=>{c(),d()},2e3);return()=>clearInterval(p)},[]),m.jsx(eb.Provider,{value:{status:a,health:l,refreshStatus:d,control:h},children:n})},PR=({data:n,onBack:a})=>{const{t:s}=wt(),l=_n(),{control:r}=vd(),[c,d]=T.useState(!1),[h,p]=T.useState(null),[g,v]=T.useState(n.slack?.require_mention||!1),x=Lf(),S=async()=>{d(!0),p(null);try{const w={...n,slack:{...n.slack,require_mention:g}},j=XR(w);await l.saveConfig(j),await l.saveSettings(FR(w)),await r("start"),setTimeout(()=>{x("/dashboard")},1e3)}catch(w){const j=w&&w.message?w.message:"Failed to save configuration";p(j)}finally{d(!1)}};return m.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto",children:[m.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[m.jsx("div",{className:"w-12 h-12 bg-success/10 text-success rounded-full flex items-center justify-center border border-success/20",children:m.jsx(PA,{size:32})}),m.jsxs("div",{children:[m.jsx("h2",{className:"text-2xl font-display font-bold text-text",children:s("summary.title")}),m.jsx("p",{className:"text-muted",children:s("summary.subtitle")})]})]}),m.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto mb-6",children:[m.jsx(ks,{title:s("summary.mode"),value:n.mode}),m.jsx(ks,{title:s("summary.slackBotToken"),value:Nx(n.slack?.bot_token||"")}),m.jsx(ks,{title:s("summary.slackAppToken"),value:Nx(n.slack?.app_token||"")}),m.jsx(ks,{title:s("summary.enabledAgents"),value:KR(n).join(", ")}),m.jsx(ks,{title:s("summary.channelsConfigured"),value:Object.keys(n.channelConfigs||{}).filter(w=>n.channelConfigs[w]?.enabled).length}),m.jsx("div",{className:"bg-panel border border-border rounded-lg p-4 shadow-sm",children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"text-sm font-medium text-text",children:s("summary.requireMention")}),m.jsx("p",{className:"text-xs text-muted mt-1",children:s("summary.requireMentionHint")})]}),m.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:g,onChange:w=>v(w.target.checked),className:"sr-only peer"}),m.jsx("div",{className:"w-11 h-6 bg-border rounded-full peer peer-checked:bg-success peer-focus:ring-2 peer-focus:ring-success/20 after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:after:translate-x-full"})]})]})}),m.jsxs("div",{className:"bg-panel border border-border rounded-lg p-4 shadow-sm",children:[m.jsx("h3",{className:"text-sm font-medium text-text mb-3",children:s("summary.usageTips")}),m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"w-8 h-8 bg-primary/10 text-primary rounded-lg flex items-center justify-center flex-shrink-0",children:m.jsx($0,{size:16})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium text-text",children:s("summary.tipStartCommand")}),m.jsx("p",{className:"text-xs text-muted",children:s("summary.tipStartCommandDesc")})]})]}),m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"w-8 h-8 bg-warning/10 text-warning rounded-lg flex items-center justify-center flex-shrink-0",children:m.jsx(OR,{size:16})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium text-text",children:s("summary.tipAgentSwitch")}),m.jsx("p",{className:"text-xs text-muted",children:s("summary.tipAgentSwitchDesc")})]})]}),m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"w-8 h-8 bg-success/10 text-success rounded-lg flex items-center justify-center flex-shrink-0",children:m.jsx($o,{size:16})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium text-text",children:s("summary.tipThread")}),m.jsx("p",{className:"text-xs text-muted",children:s("summary.tipThreadDesc")})]})]})]})]})]}),h&&m.jsx("div",{className:"p-4 bg-danger/10 text-danger border border-danger/20 rounded-lg mb-4 text-sm",children:h}),m.jsxs("div",{className:"mt-auto flex justify-between",children:[m.jsx("button",{onClick:a,className:"px-6 py-2 text-muted hover:text-text font-medium transition-colors",children:s("common.back")}),m.jsx("button",{onClick:S,disabled:c,className:"px-8 py-3 bg-success hover:bg-success/90 text-white rounded-lg font-bold transition-colors shadow-sm",children:s(c?"common.saving":"summary.finishAndStart")})]})]})},ks=({title:n,value:a})=>m.jsxs("div",{className:"bg-panel border border-border rounded-lg p-4 shadow-sm flex justify-between items-center",children:[m.jsx("h3",{className:"text-sm font-medium text-muted uppercase tracking-wider",children:n}),m.jsx("div",{className:"text-text font-medium text-sm",children:String(a)})]}),Nx=n=>n?`${n.slice(0,6)}...${n.slice(-4)}`:"Not set",KR=n=>{const a=n.agents||{};return Object.keys(a).filter(s=>a[s]?.enabled)},XR=n=>{const a=n.agents||{};return{mode:n.mode||"self_host",version:"v2",slack:{bot_token:n.slack?.bot_token||"",app_token:n.slack?.app_token||"",require_mention:n.slack?.require_mention||!1},runtime:{default_cwd:n.default_cwd||"_tmp",log_level:"INFO"},agents:{default_backend:n.default_backend||"opencode",opencode:{enabled:a.opencode?.enabled??!0,cli_path:a.opencode?.cli_path||"opencode",default_agent:n.opencode_default_agent||null,default_model:n.opencode_default_model||null,default_reasoning_effort:n.opencode_default_reasoning_effort||null},claude:{enabled:a.claude?.enabled??!0,cli_path:a.claude?.cli_path||"claude",default_model:n.claude_default_model||null},codex:{enabled:a.codex?.enabled??!1,cli_path:a.codex?.cli_path||"codex",default_model:n.codex_default_model||null}},ui:{setup_host:n.ui?.setup_host||"127.0.0.1",setup_port:n.ui?.setup_port||5123,open_browser:!0}}},FR=n=>{const a=n.channelConfigs||{};return{channels:Object.fromEntries(Object.entries(a).map(([s,l])=>[s,{enabled:l.enabled,show_message_types:l.show_message_types||[],custom_cwd:l.custom_cwd||null,routing:{agent_backend:l.routing?.agent_backend||null,opencode_agent:l.routing?.opencode_agent||null,opencode_model:l.routing?.opencode_model||null,opencode_reasoning_effort:l.routing?.opencode_reasoning_effort||null}}]))}},ef=[{code:"en",label:"English"},{code:"zh",label:"中文"}],tb=()=>{const{i18n:n}=wt(),a=ef.find(l=>l.code===n.language)||ef[0],s=l=>{n.changeLanguage(l.target.value)};return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(oR,{size:16,className:"text-muted"}),m.jsx("select",{value:a.code,onChange:s,className:"bg-transparent border border-border rounded px-2 py-1 text-sm text-text cursor-pointer hover:bg-neutral-50 focus:outline-none focus:ring-1 focus:ring-accent",children:ef.map(l=>m.jsx("option",{value:l.code,children:l.label},l.code))})]})},$R=n=>({mode:n.mode||"self_host",version:"v2",slack:{bot_token:n.slack?.bot_token||"",app_token:n.slack?.app_token||"",require_mention:n.slack?.require_mention||!1},runtime:{default_cwd:n.default_cwd||".",log_level:"INFO"},agents:{default_backend:n.default_backend||"opencode",opencode:{enabled:n.agents?.opencode?.enabled??!0,cli_path:n.agents?.opencode?.cli_path||"opencode",default_agent:n.opencode_default_agent||null,default_model:n.opencode_default_model||null,default_reasoning_effort:n.opencode_default_reasoning_effort||null},claude:{enabled:n.agents?.claude?.enabled??!0,cli_path:n.agents?.claude?.cli_path||"claude",default_model:n.claude_default_model||null},codex:{enabled:n.agents?.codex?.enabled??!1,cli_path:n.agents?.codex?.cli_path||"codex",default_model:n.codex_default_model||null}},ui:{setup_host:n.ui?.setup_host||"127.0.0.1",setup_port:n.ui?.setup_port||5123,open_browser:!0}}),Ro=[{id:"welcome",title:"Welcome",component:_R},{id:"mode",title:"Mode",component:LR},{id:"agents",title:"Agents",component:zR},{id:"slack",title:"Slack",component:UR},{id:"channels",title:"Channels",component:W0},{id:"summary",title:"Finish",component:PR}],QR=()=>{const{t:n}=wt(),a=_n(),[s,l]=T.useState(0),[r,c]=T.useState({}),[d,h]=T.useState(!1);T.useEffect(()=>{(async()=>{try{const w=await a.getConfig(),j=await a.getSettings();c({...w,channelConfigs:j.channels||{},default_backend:w.agents?.default_backend,agents:{opencode:w.agents?.opencode,claude:w.agents?.claude,codex:w.agents?.codex}})}catch{}finally{h(!0)}})()},[]);const p=async S=>{const w={...r,...S};c(w),await v(w),s<Ro.length-1&&l(s+1)},g=()=>{s>0&&l(s-1)},v=async S=>{S&&((S.agents||S.slack||S.mode||S.channelConfigs)&&await a.saveConfig($R(S)),S.channelConfigs&&await a.saveSettings({channels:S.channelConfigs}))},x=Ro[s].component;return d?m.jsx("div",{className:"min-h-screen bg-bg flex flex-col items-center justify-center p-4 md:p-8",children:m.jsxs("div",{className:"w-full max-w-4xl bg-panel rounded-2xl border border-border shadow-xl overflow-hidden flex flex-col min-h-[600px] max-h-[90vh]",children:[m.jsxs("div",{className:"bg-panel border-b border-border p-6 flex justify-between items-center relative z-10",children:[m.jsx("div",{children:m.jsx("h1",{className:"text-xl font-bold text-text font-display",children:n("wizard.title")})}),m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx(tb,{}),m.jsx("div",{className:"flex gap-2",children:Ro.map((S,w)=>{if(S.id==="welcome")return null;const j=w<s,R=w===s;return m.jsx("div",{className:"flex flex-col items-center gap-1",children:m.jsx("div",{className:Le("w-8 h-1 rounded-full transition-all duration-300",j?"bg-success":R?"bg-accent":"bg-neutral-200")})},S.id)})})]})]}),m.jsx("div",{className:"flex-1 p-8 relative overflow-y-auto",children:m.jsx(vE,{mode:"wait",children:m.jsx(NA.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"h-full",children:m.jsx(x,{data:r,onNext:p,onBack:g,isFirst:s===0,isLast:s===Ro.length-1})},s)})})]})}):m.jsx("div",{className:"min-h-screen flex items-center justify-center bg-bg text-muted",children:n("common.loading")})},ZR=()=>{const{t:n}=wt(),a=_n(),[s,l]=Ye.useState(null),[r,c]=Ye.useState(!1),[d,h]=Ye.useState(!1),[p,g]=Ye.useState(!1),[v,x]=Ye.useState(!1),[S,w]=Ye.useState(null),j=Ye.useRef(null);Ye.useEffect(()=>{R()},[]),Ye.useEffect(()=>{const L=F=>{j.current&&!j.current.contains(F.target)&&c(!1)};return r&&document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[r]);const R=async()=>{h(!0);try{const L=await a.getVersion();l(L)}catch(L){console.error("Failed to check version:",L)}finally{h(!1)}},A=async()=>{g(!0),w(null);try{const L=await a.doUpgrade();w(L),L.ok&&(L.restarting?(x(!0),setTimeout(()=>{window.location.reload()},4e3)):setTimeout(()=>R(),1e3))}catch(L){w({ok:!1,message:String(L),output:null,restarting:!1})}finally{g(!1)}},_=s?.has_update===!0,D=s?.current||"...";return m.jsxs("div",{className:"relative",ref:j,children:[m.jsxs("button",{onClick:()=>c(!r),className:Le("relative px-2 py-0.5 text-xs font-medium rounded-md transition-colors cursor-pointer",_?"bg-amber-100 text-amber-800 hover:bg-amber-200":"bg-neutral-100 text-neutral-600 hover:bg-neutral-200"),children:["v",D,_&&m.jsx("span",{className:"absolute -top-1 -right-1 w-2.5 h-2.5 bg-amber-500 rounded-full border-2 border-white animate-pulse"})]}),r&&m.jsxs("div",{className:"absolute top-full left-0 mt-2 w-72 bg-white rounded-lg shadow-lg border border-border z-50",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[m.jsx("span",{className:"font-medium text-sm",children:n("dashboard.versionAndUpdate")}),m.jsx("button",{onClick:()=>c(!1),className:"text-muted hover:text-text p-1 rounded",children:m.jsx(xd,{size:14})})]}),m.jsxs("div",{className:"p-4 space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.currentVersion")}),m.jsx("span",{className:"font-mono font-medium",children:D})]}),s?.latest&&m.jsxs("div",{className:"flex items-center justify-between text-sm",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.latestVersion")}),m.jsx("span",{className:"font-mono font-medium",children:s.latest})]}),_?m.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-amber-50 text-amber-800 rounded-md text-sm",children:[m.jsx(Jc,{size:16}),m.jsx("span",{children:n("dashboard.updateHint",{from:D,to:s?.latest})})]}):s&&!s.error?m.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-green-50 text-green-700 rounded-md text-sm",children:[m.jsx(Ri,{size:16}),m.jsx("span",{children:n("dashboard.upToDate")})]}):s?.error?m.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-red-50 text-red-700 rounded-md text-sm",children:[m.jsx(Jc,{size:16}),m.jsx("span",{children:n("dashboard.checkFailed")})]}):null,S&&m.jsxs("div",{className:Le("flex items-center gap-2 px-3 py-2 rounded-md text-sm",S.ok?"bg-green-50 text-green-700":"bg-red-50 text-red-700"),children:[S.ok?m.jsx(Ri,{size:16}):m.jsx(Jc,{size:16}),m.jsx("span",{children:S.ok?n("dashboard.upgradeSuccess"):n("dashboard.upgradeFailed")})]}),v&&m.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-blue-50 text-blue-700 rounded-md text-sm",children:[m.jsx(un,{size:16,className:"animate-spin"}),m.jsx("span",{children:n("dashboard.restarting")})]})]}),m.jsxs("div",{className:"px-4 py-3 border-t border-border flex gap-2",children:[m.jsxs("button",{onClick:R,disabled:d||v,className:"flex-1 flex items-center justify-center gap-2 px-3 py-2 text-sm bg-neutral-100 hover:bg-neutral-200 rounded-md transition-colors disabled:opacity-50",children:[m.jsx(un,{size:14,className:d?"animate-spin":""}),n(d?"dashboard.checking":"dashboard.checkUpdate")]}),_&&!v&&m.jsxs("button",{onClick:A,disabled:p,className:"flex-1 flex items-center justify-center gap-2 px-3 py-2 text-sm bg-accent text-white hover:bg-accent/90 rounded-md transition-colors disabled:opacity-50",children:[m.jsx(JA,{size:14,className:p?"animate-bounce":""}),n(p?"dashboard.upgrading":"dashboard.upgradeNow")]})]})]})]})},tf=({to:n,icon:a,children:s})=>m.jsxs(Hs,{to:n,className:({isActive:l})=>Le("flex items-center gap-3 px-3 py-2 rounded-md transition-colors",l?"bg-accent/10 text-accent font-medium":"text-muted hover:bg-neutral-100 hover:text-text"),children:[m.jsx(a,{className:"w-5 h-5"}),m.jsx("span",{children:s})]}),JR=()=>{const{t:n}=wt(),{status:a}=vd(),s=On(),l=a.state==="running";return s.pathname==="/setup"?m.jsx(ay,{}):m.jsxs("div",{className:"min-h-screen flex bg-bg text-text font-sans",children:[m.jsxs("aside",{className:"w-64 border-r border-border bg-panel hidden md:flex flex-col",children:[m.jsx("div",{className:"p-6 border-b border-border",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("img",{src:Q0,alt:"Vibe Remote Logo",className:"w-10 h-10 rounded-lg"}),m.jsxs("div",{className:"flex flex-col",children:[m.jsx("h1",{className:"text-xl font-bold font-display tracking-tight leading-tight",children:n("appShell.title")}),m.jsx(ZR,{})]})]})}),m.jsxs("nav",{className:"flex-1 p-4 space-y-1",children:[m.jsx(tf,{to:"/dashboard",icon:Cx,children:n("nav.dashboard")}),m.jsx(tf,{to:"/channels",icon:$o,children:n("nav.channels")}),m.jsx(tf,{to:"/doctor",icon:Fo,children:n("nav.doctor")})]}),m.jsxs("div",{className:"p-4 border-t border-border space-y-3",children:[m.jsx(tb,{}),m.jsx("div",{className:"flex items-center justify-between bg-neutral-50 p-3 rounded-lg border border-border",children:m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:Le("w-2.5 h-2.5 rounded-full",l?"bg-success":"bg-muted")}),m.jsx("span",{className:"text-sm font-medium",children:n(l?"common.running":"common.stopped")})]})})]})]}),m.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-8",children:m.jsx(ay,{})}),m.jsxs("nav",{className:"md:hidden fixed bottom-0 left-0 right-0 bg-panel border-t border-border flex justify-around p-3 z-50 pb-safe",children:[m.jsx(Hs,{to:"/dashboard",className:({isActive:r})=>Le("p-2 rounded-lg",r?"text-accent":"text-muted"),children:m.jsx(Cx,{})}),m.jsx(Hs,{to:"/channels",className:({isActive:r})=>Le("p-2 rounded-lg",r?"text-accent":"text-muted"),children:m.jsx($o,{})}),m.jsx(Hs,{to:"/doctor",className:({isActive:r})=>Le("p-2 rounded-lg",r?"text-accent":"text-muted"),children:m.jsx(Fo,{})})]})]})},IR=()=>{const{t:n}=wt(),{status:a,control:s}=vd(),[l,r]=Ye.useState(!1),[c,d]=Ye.useState({}),[h,p]=Ye.useState(null),[g,v]=Ye.useState(null),[x,S]=Ye.useState(!1),[w,j]=Ye.useState(null),[R,A]=Ye.useState(!1),[_,D]=Ye.useState(null),L=async q=>{r(!0);try{await s(q)}finally{r(!1)}},F=async q=>{try{await fetch("/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)}),v(n("common.saved"))}catch{v(n("common.saveFailed"))}},H=async()=>{S(!0),j(null);try{const q={setup_host:c.ui?.setup_host||"127.0.0.1",setup_port:c.ui?.setup_port||5123},$={...c,ui:{...c.ui||{},...q}};await fetch("/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),await fetch("/ui/reload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:q.setup_host,port:q.setup_port})}),j(n("dashboard.uiRestartMessage"));const Z=`http://${q.setup_host}:${q.setup_port}`;window.setTimeout(()=>{window.location.href=Z},2e3)}catch{j(n("common.saveFailed"))}finally{S(!1)}},Q=async()=>{A(!0),D(null);try{const q={log_level:c.runtime?.log_level||"INFO"},$={...c,runtime:{...c.runtime||{},...q}};await fetch("/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),await s("restart"),D(n("dashboard.mainServiceRestarted"))}catch{D(n("common.saveFailed"))}finally{A(!1)}};Ye.useEffect(()=>{(async()=>{try{const $=await fetch("/config");if($.ok){const re=await $.json();d(re)}const Z=await fetch("/doctor",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});Z.ok&&p(await Z.json())}catch{}})()},[]),Ye.useEffect(()=>{if(!g)return;const q=window.setTimeout(()=>{v(null)},4e3);return()=>window.clearTimeout(q)},[g]),Ye.useEffect(()=>{if(!_)return;const q=window.setTimeout(()=>{D(null)},4e3);return()=>window.clearTimeout(q)},[_]);const X=c.mode!=="self_host";return m.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[m.jsx("header",{className:"flex items-center justify-between",children:m.jsxs("div",{children:[m.jsx("h2",{className:"text-3xl font-display font-bold mb-2 text-text",children:n("dashboard.title")}),m.jsx("p",{className:"text-muted",children:n("dashboard.subtitle")})]})}),m.jsxs("div",{className:"bg-panel rounded-xl border border-border p-6 shadow-sm",children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsxs("div",{children:[m.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[n("dashboard.serviceStatus"),m.jsx("span",{className:`px-2 py-0.5 rounded-full text-xs font-medium ${a.state==="running"?"bg-success/10 text-success":"bg-muted/10 text-muted"}`,children:a.state?.toUpperCase()||n("common.unknown").toUpperCase()})]}),m.jsxs("p",{className:"text-sm text-muted mt-1",children:["PID: ",a.service_pid||a.pid||"-"]})]}),m.jsxs("div",{className:"flex gap-2",children:[a.state!=="running"&&m.jsxs("button",{onClick:()=>L("start"),disabled:l,className:"flex items-center gap-2 px-4 py-2 bg-success text-white rounded-lg hover:bg-success/90 disabled:opacity-50 font-medium shadow-sm transition-colors",children:[m.jsx(P0,{size:16})," ",n("common.start")]}),a.state==="running"&&m.jsxs("button",{onClick:()=>L("stop"),disabled:l,className:"flex items-center gap-2 px-4 py-2 bg-danger text-white rounded-lg hover:bg-danger/90 disabled:opacity-50 font-medium shadow-sm transition-colors",children:[m.jsx(F0,{size:16})," ",n("common.stop")]}),m.jsxs("button",{onClick:()=>L("restart"),disabled:l,className:"flex items-center gap-2 px-4 py-2 border border-border bg-white hover:bg-neutral-50 rounded-lg disabled:opacity-50 text-text font-medium transition-colors",children:[m.jsx(Wc,{size:16})," ",n("common.restart")]})]})]}),m.jsxs("div",{className:`grid grid-cols-1 gap-6 border-t border-border pt-6 ${X?"md:grid-cols-3":"md:grid-cols-1"}`,children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-sm text-muted mb-1",children:n("dashboard.mode")}),m.jsx("div",{className:"font-mono font-medium text-text capitalize",children:c.mode||"-"})]}),X&&m.jsxs("div",{children:[m.jsx("div",{className:"text-sm text-muted mb-1",children:n("dashboard.workspace")}),m.jsx("div",{className:"font-medium text-text",children:c.slack?.team_name||"-"}),m.jsx("div",{className:"text-xs text-muted font-mono",children:c.slack?.team_id||""})]}),X&&m.jsxs("div",{children:[m.jsx("div",{className:"text-sm text-muted mb-1",children:n("dashboard.gateway")}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:`w-2 h-2 rounded-full ${c.gateway?.relay_url?"bg-success":"bg-danger"}`}),m.jsx("span",{className:"text-text",children:c.gateway?.relay_url?n("common.online"):n("common.offline")})]})]})]})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[m.jsxs("div",{className:"bg-panel rounded-xl border border-border p-6 shadow-sm",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsxs("h3",{className:"font-semibold flex items-center gap-2 text-text",children:[m.jsx(Fo,{size:18})," ",n("dashboard.health")]}),m.jsx(Oa,{to:"/doctor",className:"text-sm text-accent hover:underline font-medium",children:n("common.viewDetails")})]}),m.jsxs("div",{className:`flex items-center gap-2 font-medium ${h?.ok?"text-success":"text-warning"}`,children:[m.jsx(yd,{size:16})," ",h?.ok?n("dashboard.allSystemsOperational"):n("dashboard.issuesDetected")]})]}),m.jsxs("div",{className:"bg-panel rounded-xl border border-border p-6 shadow-sm",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsxs("h3",{className:"font-semibold flex items-center gap-2 text-text",children:[m.jsx(TR,{size:18})," ",n("dashboard.globalPolicy")]}),m.jsx(Oa,{to:"/setup",className:"text-sm text-accent hover:underline font-medium",children:n("common.editSetup")})]}),m.jsxs("div",{className:"space-y-3 text-sm",children:[m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.mode")}),m.jsx("span",{className:"font-mono text-xs text-text capitalize",children:c.mode||"-"})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.defaultBackend")}),m.jsx("span",{className:"font-mono text-xs text-text",children:c.agents?.default_backend||"opencode"})]}),X&&m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.slackWorkspace")}),m.jsx("span",{className:"text-xs text-text",children:c.slack?.team_name||n("common.notLinked")})]}),X&&m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.gateway")}),m.jsx("span",{className:"text-xs text-text",children:c.gateway?.relay_url?n("common.online"):n("common.offline")})]})]})]}),m.jsxs("div",{className:"bg-panel rounded-xl border border-border p-6 shadow-sm",children:[m.jsx("div",{className:"flex items-center justify-between mb-4",children:m.jsxs("h3",{className:"font-semibold flex items-center gap-2 text-text",children:[m.jsx($o,{size:18})," ",n("dashboard.messageHandling")]})}),m.jsxs("div",{className:"space-y-3 text-sm",children:[m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("span",{className:"text-muted flex items-center gap-1",children:[n("dashboard.requireMention"),m.jsxs("span",{className:"relative group",children:[m.jsx(Ic,{size:12,className:"text-muted/50 cursor-help"}),m.jsx("span",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-2 py-1 bg-text text-bg text-xs rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:n("dashboard.requireMentionHint")})]})]}),m.jsx("button",{onClick:()=>{v(null);const q={...c,slack:{...c.slack||{},require_mention:!c.slack?.require_mention}};d(q),F(q)},className:`px-2 py-1 rounded text-xs font-semibold border ${c.slack?.require_mention?"bg-success/10 text-success border-success/20":"bg-neutral-100 text-muted border-border"}`,children:c.slack?.require_mention?n("common.enabled"):n("common.disabled")})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("span",{className:"text-muted flex items-center gap-1",children:[n("dashboard.ackMode"),m.jsxs("span",{className:"relative group",children:[m.jsx(Ic,{size:12,className:"text-muted/50 cursor-help"}),m.jsx("span",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-2 py-1 bg-text text-bg text-xs rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:n("dashboard.ackModeHint")})]})]}),m.jsxs("select",{value:c.ack_mode||"reaction",onChange:q=>{const $=q.target.value||"reaction";v(null);const Z={...c,ack_mode:$};d(Z),F(Z)},className:"w-36 bg-neutral-100 border border-border rounded px-2 py-1 text-xs font-mono",children:[m.jsx("option",{value:"reaction",children:n("dashboard.ackReaction")}),m.jsx("option",{value:"message",children:n("dashboard.ackMessage")})]})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("span",{className:"text-muted flex items-center gap-1",children:[n("dashboard.errorRetryLimit"),m.jsxs("span",{className:"relative group",children:[m.jsx(Ic,{size:12,className:"text-muted/50 cursor-help"}),m.jsx("span",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-2 py-1 bg-text text-bg text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 w-56 text-center",children:n("dashboard.errorRetryLimitHint")})]})]}),m.jsx("input",{type:"number",min:0,max:10,value:c.agents?.opencode?.error_retry_limit??1,onChange:q=>{const $=Math.max(0,Math.min(10,Number(q.target.value)||0));v(null);const Z={...c,agents:{...c.agents||{},opencode:{...c.agents?.opencode||{},error_retry_limit:$}}};d(Z),F(Z)},className:"w-16 bg-neutral-100 border border-border rounded px-2 py-1 text-xs font-mono text-center"})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.allowedChannels")}),m.jsx(Oa,{to:"/channels",className:"text-xs text-accent hover:underline font-medium",children:n("common.manageChannels")})]})]})]}),m.jsxs("div",{className:"bg-panel rounded-xl border border-border p-6 shadow-sm",children:[m.jsx("div",{className:"flex items-center justify-between mb-4",children:m.jsxs("h3",{className:"font-semibold flex items-center gap-2 text-text",children:[m.jsx(X0,{size:18})," ",n("dashboard.consoleServer")]})}),m.jsxs("div",{className:"space-y-3 text-sm",children:[m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.host")}),m.jsx("input",{type:"text",value:c.ui?.setup_host||"127.0.0.1",onChange:q=>{const $=q.target.value||"127.0.0.1";j(null),d(Z=>({...Z,ui:{...Z.ui||{},setup_host:$}}))},className:"w-40 bg-neutral-100 border border-border rounded px-2 py-1 text-xs font-mono"})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.port")}),m.jsx("input",{type:"number",min:1024,max:65535,value:c.ui?.setup_port||5123,onChange:q=>{const $=Number(q.target.value)||5123;j(null),d(Z=>({...Z,ui:{...Z.ui||{},setup_port:$}}))},className:"w-24 bg-neutral-100 border border-border rounded px-2 py-1 text-xs font-mono"})]})]}),m.jsxs("div",{className:"flex justify-between items-center mt-4 pt-4 border-t border-border",children:[w&&m.jsx("span",{className:"text-xs text-muted",children:w}),!w&&m.jsx("span",{}),m.jsxs("button",{onClick:H,disabled:x,className:"px-3 py-1.5 bg-accent text-white rounded-md text-xs font-semibold disabled:opacity-50 flex items-center gap-1",children:[m.jsx(Wc,{size:12})," ",n(x?"common.saving":"common.saveAndRestart")]})]})]}),m.jsxs("div",{className:"bg-panel rounded-xl border border-border p-6 shadow-sm",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsxs("h3",{className:"font-semibold flex items-center gap-2 text-text",children:[m.jsx($0,{size:18})," ",n("dashboard.diagnostics")]}),m.jsx(Oa,{to:"/doctor/logs",className:"text-sm text-accent hover:underline font-medium",children:n("common.viewLogs")})]}),m.jsxs("div",{className:"space-y-3 text-sm",children:[m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.logLevel")}),m.jsx("select",{value:c.runtime?.log_level||"INFO",onChange:q=>{const $=q.target.value||"INFO";D(null),d(Z=>({...Z,runtime:{...Z.runtime||{},log_level:$}}))},className:"w-28 bg-neutral-100 border border-border rounded px-2 py-1 text-xs font-mono",children:["DEBUG","INFO","WARNING","ERROR"].map(q=>m.jsx("option",{value:q,children:q},q))})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.configFile")}),m.jsx("code",{className:"font-mono text-xs bg-neutral-100 px-2 py-1 rounded text-text",children:"~/.vibe_remote/config/config.json"})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-muted",children:n("dashboard.logs")}),m.jsx("code",{className:"font-mono text-xs bg-neutral-100 px-2 py-1 rounded text-text",children:"~/.vibe_remote/logs/vibe_remote.log"})]})]}),m.jsxs("div",{className:"flex justify-between items-center mt-4 pt-4 border-t border-border",children:[_&&m.jsx("span",{className:"text-xs text-muted",children:_}),!_&&m.jsx("span",{}),m.jsxs("button",{onClick:Q,disabled:R,className:"px-3 py-1.5 bg-accent text-white rounded-md text-xs font-semibold disabled:opacity-50 flex items-center gap-1",children:[m.jsx(Wc,{size:12})," ",n(R?"common.saving":"common.saveAndRestart")]})]})]})]})]})},WR=({isPage:n})=>{const{t:a}=wt(),s=_n(),[l,r]=T.useState(!1),[c,d]=T.useState(null),h=async()=>{r(!0);try{const g=await s.doctor();d(g)}finally{r(!1)}};T.useEffect(()=>{h()},[]);const p=({status:g})=>{switch(g){case"pass":return m.jsx(yd,{size:18,className:"text-success"});case"warn":return m.jsx(RR,{size:18,className:"text-warning"});case"fail":return m.jsx(H0,{size:18,className:"text-danger"});default:return m.jsx("div",{className:"w-4 h-4 rounded-full bg-muted"})}};return m.jsxs("div",{className:Le("flex flex-col",n?"max-w-4xl mx-auto h-full":"w-full"),children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsxs("h2",{className:Le("font-display font-bold flex items-center gap-2",n?"text-3xl":"text-xl"),children:[m.jsx(Fo,{className:"text-accent"}),a("doctor.title")]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs(Oa,{to:"/doctor/logs",className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg text-sm text-muted hover:bg-neutral-50 hover:text-text transition-colors",children:[m.jsx(G0,{size:16})," ",a("common.viewLogs")]}),c&&m.jsxs("button",{onClick:()=>navigator.clipboard.writeText(JSON.stringify(c,null,2)),className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg text-sm text-muted hover:bg-neutral-50 hover:text-text transition-colors",children:[m.jsx(q0,{size:16})," ",a("doctor.copyReport")]}),m.jsxs("button",{onClick:h,disabled:l,className:"flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 disabled:opacity-50 transition-colors font-medium shadow-sm",children:[m.jsx(un,{size:16,className:l?"animate-spin":""})," ",a("doctor.runChecks")]})]})]}),c&&m.jsxs("div",{className:"space-y-6",children:[c.groups?.map((g,v)=>m.jsxs("div",{className:"bg-panel border border-border rounded-xl overflow-hidden shadow-sm",children:[m.jsx("div",{className:"px-4 py-3 bg-neutral-50 border-b border-border font-semibold text-sm uppercase text-muted tracking-wide",children:g.name}),m.jsx("div",{className:"divide-y divide-border",children:g.items.map((x,S)=>m.jsxs("div",{className:"p-4 flex items-start gap-4 hover:bg-neutral-50/30 transition-colors",children:[m.jsx("div",{className:"mt-0.5",children:m.jsx(p,{status:x.status})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:Le("font-medium",x.status==="fail"?"text-danger":"text-text"),children:x.message}),x.action&&m.jsx("div",{className:"mt-2 text-sm text-accent underline cursor-pointer",children:x.action})]})]},S))})]},v)),m.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[m.jsxs("div",{className:"bg-success/10 border border-success/20 rounded-lg p-4 text-center",children:[m.jsx("div",{className:"text-2xl font-bold text-success",children:c.summary?.pass||0}),m.jsx("div",{className:"text-sm text-success/80 font-medium",children:a("doctor.passed")})]}),m.jsxs("div",{className:"bg-warning/10 border border-warning/20 rounded-lg p-4 text-center",children:[m.jsx("div",{className:"text-2xl font-bold text-warning",children:c.summary?.warn||0}),m.jsx("div",{className:"text-sm text-warning/80 font-medium",children:a("doctor.warnings")})]}),m.jsxs("div",{className:"bg-danger/10 border border-danger/20 rounded-lg p-4 text-center",children:[m.jsx("div",{className:"text-2xl font-bold text-danger",children:c.summary?.fail||0}),m.jsx("div",{className:"text-sm text-danger/80 font-medium",children:a("doctor.failed")})]})]})]})]})},Ex={DEBUG:{bg:"bg-neutral-100",text:"text-neutral-500",border:"border-neutral-200"},INFO:{bg:"bg-blue-50",text:"text-blue-600",border:"border-blue-200"},WARNING:{bg:"bg-yellow-50",text:"text-yellow-600",border:"border-yellow-200"},ERROR:{bg:"bg-red-50",text:"text-red-600",border:"border-red-200"}},e3=n=>{const a=n.match(/^\[([^\]]+)\]\s*-?\s*(.*)$/s);return a?{location:a[1],content:a[2]}:{content:n}},t3=()=>{const{t:n}=wt(),a=_n(),[s,l]=T.useState([]),[r,c]=T.useState(!1),[d,h]=T.useState(0),[p,g]=T.useState(""),[v,x]=T.useState("ALL"),[S,w]=T.useState(!1),j=T.useRef(null),R=T.useRef(null),A=async()=>{c(!0);try{const H=await a.getLogs(2e3);l(H.logs),h(H.total)}finally{c(!1)}};T.useEffect(()=>{A()},[]),T.useEffect(()=>(S?R.current=setInterval(A,5e3):R.current&&(clearInterval(R.current),R.current=null),()=>{R.current&&clearInterval(R.current)}),[S]),T.useEffect(()=>{j.current&&(j.current.scrollTop=0)},[s]);const _=T.useMemo(()=>s.filter(H=>{const Q=v==="ALL"||H.level===v,X=!p||H.message.toLowerCase().includes(p.toLowerCase())||H.logger.toLowerCase().includes(p.toLowerCase())||H.timestamp.includes(p);return Q&&X}),[s,v,p]),D=T.useMemo(()=>{const H={DEBUG:0,INFO:0,WARNING:0,ERROR:0};return s.forEach(Q=>{H[Q.level]!==void 0&&H[Q.level]++}),H},[s]),L=({level:H})=>{const Q=Ex[H]||Ex.INFO;return m.jsx("span",{className:Le("px-1.5 py-0.5 rounded text-xs font-medium border min-w-[60px] text-center inline-block",Q.bg,Q.text,Q.border),children:H})},F=()=>{j.current&&(j.current.scrollTop=0)};return m.jsxs("div",{className:"max-w-6xl mx-auto flex flex-col h-full",children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsxs("h2",{className:"text-3xl font-display font-bold flex items-center gap-2",children:[m.jsx(G0,{className:"text-accent"}),n("logs.title")]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{onClick:()=>w(!S),className:Le("flex items-center gap-2 px-3 py-2 border rounded-lg text-sm transition-colors",S?"bg-accent/10 border-accent text-accent":"border-border text-muted hover:bg-neutral-50 hover:text-text"),children:[S?m.jsx(hR,{size:16}):m.jsx(P0,{size:16}),n(S?"logs.autoRefreshOn":"logs.autoRefresh")]}),m.jsxs("button",{onClick:A,disabled:r,className:"flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 disabled:opacity-50 transition-colors font-medium shadow-sm",children:[m.jsx(un,{size:16,className:r?"animate-spin":""}),n("common.refresh")]})]})]}),m.jsxs("div",{className:"space-y-4 flex-1 flex flex-col min-h-0",children:[m.jsxs("div",{className:"flex gap-3 items-center flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[m.jsx(K0,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted"}),m.jsx("input",{type:"text",placeholder:n("logs.searchPlaceholder"),value:p,onChange:H=>g(H.target.value),className:"w-full pl-10 pr-4 py-2 border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(nR,{size:16,className:"text-muted"}),m.jsxs("select",{value:v,onChange:H=>x(H.target.value),className:"px-3 py-2 border border-border rounded-lg text-sm bg-white focus:outline-none focus:ring-2 focus:ring-accent/20",children:[m.jsx("option",{value:"ALL",children:n("logs.allLevels")}),m.jsxs("option",{value:"ERROR",children:[n("logs.error")," (",D.ERROR,")"]}),m.jsxs("option",{value:"WARNING",children:[n("logs.warning")," (",D.WARNING,")"]}),m.jsxs("option",{value:"INFO",children:[n("logs.info")," (",D.INFO,")"]}),m.jsxs("option",{value:"DEBUG",children:[n("logs.debug")," (",D.DEBUG,")"]})]})]})]}),m.jsx("div",{className:"flex gap-2 flex-wrap",children:["ALL","ERROR","WARNING","INFO","DEBUG"].map(H=>m.jsxs("button",{onClick:()=>x(H),className:Le("px-3 py-1 rounded-full text-xs font-medium border transition-colors",v===H?"bg-accent text-white border-accent":"bg-white text-muted border-border hover:border-accent/50"),children:[H==="ALL"?n("logs.all"):H,H!=="ALL"&&` (${D[H]})`]},H))}),m.jsxs("div",{className:"bg-panel border border-border rounded-xl overflow-hidden shadow-sm flex-1 flex flex-col min-h-0",children:[m.jsxs("div",{className:"px-4 py-3 bg-neutral-50 border-b border-border flex justify-between items-center flex-shrink-0",children:[m.jsxs("span",{className:"font-semibold text-sm text-muted",children:[n("logs.entriesCount",{filtered:_.length,total:s.length}),d>s.length&&` ${n("logs.totalInFile",{total:d})}`]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("button",{onClick:F,className:"text-xs text-accent hover:underline flex items-center gap-1",children:[m.jsx(LA,{size:12})," ",n("logs.jumpToLatest")]}),m.jsx("code",{className:"text-xs text-muted bg-neutral-100 px-2 py-1 rounded",children:"~/.vibe_remote/logs/vibe_remote.log"})]})]}),r&&s.length===0?m.jsx("div",{className:"p-8 text-center text-muted flex-1 flex items-center justify-center",children:m.jsxs("div",{children:[m.jsx(un,{size:24,className:"animate-spin mx-auto mb-2"}),n("logs.loadingLogs")]})}):_.length===0?m.jsx("div",{className:"p-8 text-center text-muted flex-1 flex items-center justify-center",children:s.length===0?n("logs.noLogsAvailable"):n("logs.noLogsMatch")}):m.jsx("div",{ref:j,className:"divide-y divide-border overflow-y-auto flex-1 font-mono text-sm",style:{minHeight:"500px",maxHeight:"calc(100vh - 380px)"},children:_.slice().reverse().map((H,Q)=>{const{location:X,content:q}=e3(H.message);return m.jsxs("div",{className:Le("p-3 hover:bg-neutral-50/50 transition-colors",H.level==="ERROR"&&"bg-red-50/30",H.level==="WARNING"&&"bg-yellow-50/30"),children:[m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m.jsx("span",{className:"text-muted text-xs whitespace-nowrap",children:H.timestamp}),m.jsx(L,{level:H.level}),m.jsx("span",{className:"text-muted text-xs truncate max-w-[200px]",title:H.logger,children:H.logger}),X&&m.jsxs("span",{className:"text-muted/60 text-xs font-normal",children:["[",X,"]"]})]}),m.jsx("div",{className:Le("mt-1.5 whitespace-pre-wrap break-words leading-relaxed",H.level==="ERROR"?"text-red-700":H.level==="WARNING"?"text-yellow-700":"text-text"),children:q})]},Q)})})]})]})]})},n3=({children:n})=>{const{getConfig:a}=_n(),[s,l]=T.useState(!0),[r,c]=T.useState(!1);return T.useEffect(()=>{a().then(d=>{(!d||!d.mode||!d.slack?.bot_token)&&c(!0),l(!1)}).catch(()=>{c(!0),l(!1)})},[]),s?m.jsx("div",{className:"min-h-screen flex items-center justify-center bg-bg text-text",children:"Loading..."}):r?m.jsx(Jx,{to:"/setup",replace:!0}):n};function a3(){return m.jsxs(fw,{children:[m.jsx(sa,{path:"/setup",element:m.jsx(QR,{})}),m.jsxs(sa,{element:m.jsx(n3,{children:m.jsx(JR,{})}),children:[m.jsx(sa,{path:"/dashboard",element:m.jsx(IR,{})}),m.jsx(sa,{path:"/channels",element:m.jsx(W0,{isPage:!0})}),m.jsx(sa,{path:"/doctor",element:m.jsx(WR,{isPage:!0})}),m.jsx(sa,{path:"/doctor/logs",element:m.jsx(t3,{})}),m.jsx(sa,{path:"/",element:m.jsx(Jx,{to:"/dashboard",replace:!0})})]})]})}function i3(){return m.jsx(YR,{children:m.jsx(kR,{children:m.jsx(HR,{children:m.jsx(kw,{children:m.jsx(a3,{})})})})})}kS.createRoot(document.getElementById("root")).render(m.jsx(T.StrictMode,{children:m.jsx(i3,{})}));
|