levix-bot 4.0.0 → 4.0.3

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.
@@ -1,391 +0,0 @@
1
- (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function u(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(d){if(d.ep)return;d.ep=!0;const h=u(d);fetch(d.href,h)}})();function Td(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Cu={exports:{}},Li={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var cg;function J1(){if(cg)return Li;cg=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function u(c,d,h){var p=null;if(h!==void 0&&(p=""+h),d.key!==void 0&&(p=""+d.key),"key"in d){h={};for(var g in d)g!=="key"&&(h[g]=d[g])}else h=d;return d=h.ref,{$$typeof:i,type:c,key:p,ref:d!==void 0?d:null,props:h}}return Li.Fragment=r,Li.jsx=u,Li.jsxs=u,Li}var ug;function I1(){return ug||(ug=1,Cu.exports=J1()),Cu.exports}var o=I1(),Eu={exports:{}},we={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var dg;function P1(){if(dg)return we;dg=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),C=Symbol.for("react.view_transition"),U=Symbol.iterator;function Z(N){return N===null||typeof N!="object"?null:(N=U&&N[U]||N["@@iterator"],typeof N=="function"?N:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,G={};function X(N,S,P){this.props=N,this.context=S,this.refs=G,this.updater=P||D}X.prototype.isReactComponent={},X.prototype.setState=function(N,S){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,S,"setState")},X.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function le(){}le.prototype=X.prototype;function W(N,S,P){this.props=N,this.context=S,this.refs=G,this.updater=P||D}var me=W.prototype=new le;me.constructor=W,B(me,X.prototype),me.isPureReactComponent=!0;var J=Array.isArray;function Y(){}var R={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function ie(N,S,P){var ne=P.ref;return{$$typeof:i,type:N,key:S,ref:ne!==void 0?ne:null,props:P}}function $(N,S){return ie(N.type,S,N.props)}function te(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function Q(N){var S={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(P){return S[P]})}var ae=/\/+/g;function pe(N,S){return typeof N=="object"&&N!==null&&N.key!=null?Q(""+N.key):S.toString(36)}function T(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Y,Y):(N.status="pending",N.then(function(S){N.status==="pending"&&(N.status="fulfilled",N.value=S)},function(S){N.status==="pending"&&(N.status="rejected",N.reason=S)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function F(N,S,P,ne,ye){var fe=typeof N;(fe==="undefined"||fe==="boolean")&&(N=null);var Se=!1;if(N===null)Se=!0;else switch(fe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(N.$$typeof){case i:case r:Se=!0;break;case v:return Se=N._init,F(Se(N._payload),S,P,ne,ye)}}if(Se)return ye=ye(N),Se=ne===""?"."+pe(N,0):ne,J(ye)?(P="",Se!=null&&(P=Se.replace(ae,"$&/")+"/"),F(ye,S,P,"",function(L){return L})):ye!=null&&(te(ye)&&(ye=$(ye,P+(ye.key==null||N&&N.key===ye.key?"":(""+ye.key).replace(ae,"$&/")+"/")+Se)),S.push(ye)),1;Se=0;var oe=ne===""?".":ne+":";if(J(N))for(var be=0;be<N.length;be++)ne=N[be],fe=oe+pe(ne,be),Se+=F(ne,S,P,fe,ye);else if(be=Z(N),typeof be=="function")for(N=be.call(N),be=0;!(ne=N.next()).done;)ne=ne.value,fe=oe+pe(ne,be++),Se+=F(ne,S,P,fe,ye);else if(fe==="object"){if(typeof N.then=="function")return F(T(N),S,P,ne,ye);throw S=String(N),Error("Objects are not valid as a React child (found: "+(S==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":S)+"). If you meant to render a collection of children, use an array instead.")}return Se}function M(N,S,P){if(N==null)return N;var ne=[],ye=0;return F(N,ne,"","",function(fe){return S.call(P,fe,ye++)}),ne}function se(N){if(N._status===-1){var S=N._result,P=S();P.then(function(ne){(N._status===0||N._status===-1)&&(N._status=1,N._result=ne,P.status===void 0&&(P.status="fulfilled",P.value=ne))},function(ne){(N._status===0||N._status===-1)&&(N._status=2,N._result=ne,P.status===void 0&&(P.status="rejected",P.reason=ne))}),N._status===-1&&(N._status=0,N._result=P)}if(N._status===1)return N._result.default;throw N._result}var V=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var S=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(S))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function Me(N){var S=R.T,P={};P.types=S!==null?S.types:null,R.T=P;try{var ne=N(),ye=R.S;ye!==null&&ye(P,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(Y,V)}catch(fe){V(fe)}finally{S!==null&&P.types!==null&&(S.types=P.types),R.T=S}}function Ue(N){var S=R.T;if(S!==null){var P=S.types;P===null?S.types=[N]:P.indexOf(N)===-1&&P.push(N)}else Me(Ue.bind(null,N))}var Ge={map:M,forEach:function(N,S,P){M(N,function(){S.apply(this,arguments)},P)},count:function(N){var S=0;return M(N,function(){S++}),S},toArray:function(N){return M(N,function(S){return S})||[]},only:function(N){if(!te(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return we.Activity=x,we.Children=Ge,we.Component=X,we.Fragment=u,we.Profiler=d,we.PureComponent=W,we.StrictMode=c,we.Suspense=b,we.ViewTransition=C,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,we.__COMPILER_RUNTIME={__proto__:null,c:function(N){return R.H.useMemoCache(N)}},we.addTransitionType=Ue,we.cache=function(N){return function(){return N.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(N,S,P){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ne=B({},N.props),ye=N.key;if(S!=null)for(fe in S.key!==void 0&&(ye=""+S.key),S)!I.call(S,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&S.ref===void 0||(ne[fe]=S[fe]);var fe=arguments.length-2;if(fe===1)ne.children=P;else if(1<fe){for(var Se=Array(fe),oe=0;oe<fe;oe++)Se[oe]=arguments[oe+2];ne.children=Se}return ie(N.type,ye,ne)},we.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},we.createElement=function(N,S,P){var ne,ye={},fe=null;if(S!=null)for(ne in S.key!==void 0&&(fe=""+S.key),S)I.call(S,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ye[ne]=S[ne]);var Se=arguments.length-2;if(Se===1)ye.children=P;else if(1<Se){for(var oe=Array(Se),be=0;be<Se;be++)oe[be]=arguments[be+2];ye.children=oe}if(N&&N.defaultProps)for(ne in Se=N.defaultProps,Se)ye[ne]===void 0&&(ye[ne]=Se[ne]);return ie(N,fe,ye)},we.createRef=function(){return{current:null}},we.forwardRef=function(N){return{$$typeof:g,render:N}},we.isValidElement=te,we.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:se}},we.memo=function(N,S){return{$$typeof:E,type:N,compare:S===void 0?null:S}},we.startTransition=Me,we.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},we.use=function(N){return R.H.use(N)},we.useActionState=function(N,S,P){return R.H.useActionState(N,S,P)},we.useCallback=function(N,S){return R.H.useCallback(N,S)},we.useContext=function(N){return R.H.useContext(N)},we.useDebugValue=function(){},we.useDeferredValue=function(N,S){return R.H.useDeferredValue(N,S)},we.useEffect=function(N,S){return R.H.useEffect(N,S)},we.useEffectEvent=function(N){return R.H.useEffectEvent(N)},we.useId=function(){return R.H.useId()},we.useImperativeHandle=function(N,S,P){return R.H.useImperativeHandle(N,S,P)},we.useInsertionEffect=function(N,S){return R.H.useInsertionEffect(N,S)},we.useLayoutEffect=function(N,S){return R.H.useLayoutEffect(N,S)},we.useMemo=function(N,S){return R.H.useMemo(N,S)},we.useOptimistic=function(N,S){return R.H.useOptimistic(N,S)},we.useReducer=function(N,S,P){return R.H.useReducer(N,S,P)},we.useRef=function(N){return R.H.useRef(N)},we.useState=function(N){return R.H.useState(N)},we.useSyncExternalStore=function(N,S,P){return R.H.useSyncExternalStore(N,S,P)},we.useTransition=function(){return R.H.useTransition()},we.version="19.3.0",we}var fg;function Cd(){return fg||(fg=1,Eu.exports=P1()),Eu.exports}var K=Cd();const Qi=Td(K);var zu={exports:{}},qi={},Mu={exports:{}},Ou={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var hg;function F1(){return hg||(hg=1,(function(i){function r(T,F){var M=T.length;T.push(F);e:for(;0<M;){var se=M-1>>>1,V=T[se];if(0<d(V,F))T[se]=F,T[M]=V,M=se;else break e}}function u(T){return T.length===0?null:T[0]}function c(T){if(T.length===0)return null;var F=T[0],M=T.pop();if(M!==F){T[0]=M;e:for(var se=0,V=T.length,Me=V>>>1;se<Me;){var Ue=2*(se+1)-1,Ge=T[Ue],N=Ue+1,S=T[N];if(0>d(Ge,M))N<V&&0>d(S,Ge)?(T[se]=S,T[N]=M,se=N):(T[se]=Ge,T[Ue]=M,se=Ue);else if(N<V&&0>d(S,M))T[se]=S,T[N]=M,se=N;else break e}}return F}function d(T,F){var M=T.sortIndex-F.sortIndex;return M!==0?M:T.id-F.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;i.unstable_now=function(){return h.now()}}else{var p=Date,g=p.now();i.unstable_now=function(){return p.now()-g}}var b=[],E=[],v=1,x=null,C=3,U=!1,Z=!1,D=!1,B=!1,G=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function W(T){for(var F=u(E);F!==null;){if(F.callback===null)c(E);else if(F.startTime<=T)c(E),F.sortIndex=F.expirationTime,r(b,F);else break;F=u(E)}}function me(T){if(D=!1,W(T),!Z)if(u(b)!==null)Z=!0,J||(J=!0,te());else{var F=u(E);F!==null&&pe(me,F.startTime-T)}}var J=!1,Y=-1,R=5,I=-1;function ie(){return B?!0:!(i.unstable_now()-I<R)}function $(){if(B=!1,J){var T=i.unstable_now();I=T;var F=!0;try{e:{Z=!1,D&&(D=!1,X(Y),Y=-1),U=!0;var M=C;try{t:{for(W(T),x=u(b);x!==null&&!(x.expirationTime>T&&ie());){var se=x.callback;if(typeof se=="function"){x.callback=null,C=x.priorityLevel;var V=se(x.expirationTime<=T);if(T=i.unstable_now(),typeof V=="function"){x.callback=V,W(T),F=!0;break t}x===u(b)&&c(b),W(T)}else c(b);x=u(b)}if(x!==null)F=!0;else{var Me=u(E);Me!==null&&pe(me,Me.startTime-T),F=!1}}break e}finally{x=null,C=M,U=!1}F=void 0}}finally{F?te():J=!1}}}var te;if(typeof le=="function")te=function(){le($)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ae=Q.port2;Q.port1.onmessage=$,te=function(){ae.postMessage(null)}}else te=function(){G($,0)};function pe(T,F){Y=G(function(){T(i.unstable_now())},F)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(T){T.callback=null},i.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<T?Math.floor(1e3/T):5},i.unstable_getCurrentPriorityLevel=function(){return C},i.unstable_next=function(T){switch(C){case 1:case 2:case 3:var F=3;break;default:F=C}var M=C;C=F;try{return T()}finally{C=M}},i.unstable_requestPaint=function(){B=!0},i.unstable_runWithPriority=function(T,F){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var M=C;C=T;try{return F()}finally{C=M}},i.unstable_scheduleCallback=function(T,F,M){var se=i.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?se+M:se):M=se,T){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=M+V,T={id:v++,callback:F,priorityLevel:T,startTime:M,expirationTime:V,sortIndex:-1},M>se?(T.sortIndex=M,r(E,T),u(b)===null&&T===u(E)&&(D?(X(Y),Y=-1):D=!0,pe(me,M-se))):(T.sortIndex=V,r(b,T),Z||U||(Z=!0,J||(J=!0,te()))),T},i.unstable_shouldYield=ie,i.unstable_wrapCallback=function(T){var F=C;return function(){var M=C;C=F;try{return T.apply(this,arguments)}finally{C=M}}}})(Ou)),Ou}var mg;function $1(){return mg||(mg=1,Mu.exports=F1()),Mu.exports}var ku={exports:{}},vt={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var pg;function W1(){if(pg)return vt;pg=1;var i=Cd();function r(v){var x="https://react.dev/errors/"+v;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)x+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+v+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(r(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal"),h=Symbol.for("react.recoverable"),p=Symbol.for("react.optimistic_key");function g(v,x,C){var U=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:U==null?null:U===p?p:""+U,children:v,containerInfo:x,implementation:C}}var b=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(v,x){if(v==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,vt.browser=function(v){return{$$typeof:h,_reason:v}},vt.createPortal=function(v,x){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return g(v,x,null,C)},vt.flushSync=function(v){var x=b.T,C=c.p;try{if(b.T=null,c.p=2,v)return v()}finally{b.T=x,c.p=C,c.d.f()}},vt.preconnect=function(v,x){typeof v=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(v,x))},vt.prefetchDNS=function(v){typeof v=="string"&&c.d.D(v)},vt.preinit=function(v,x){if(typeof v=="string"&&x&&typeof x.as=="string"){var C=x.as,U=E(C,x.crossOrigin),Z=typeof x.integrity=="string"?x.integrity:void 0,D=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;C==="style"?c.d.S(v,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:U,integrity:Z,fetchPriority:D}):C==="script"&&c.d.X(v,{crossOrigin:U,integrity:Z,fetchPriority:D,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},vt.preinitModule=function(v,x){if(typeof v=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var C=E(x.as,x.crossOrigin);c.d.M(v,{crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0})}}else x==null&&c.d.M(v)},vt.preload=function(v,x){if(typeof v=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var C=x.as,U=E(C,x.crossOrigin);c.d.L(v,C,{crossOrigin:U,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},vt.preloadModule=function(v,x){if(typeof v=="string")if(x){var C=E(x.as,x.crossOrigin);c.d.m(v,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0})}else c.d.m(v)},vt.requestFormReset=function(v){c.d.r(v)},vt.unstable_batchedUpdates=function(v,x){return v(x)},vt.useFormState=function(v,x,C){return b.H.useFormState(v,x,C)},vt.useFormStatus=function(){return b.H.useHostTransitionStatus()},vt.version="19.3.0",vt}var gg;function ev(){if(gg)return ku.exports;gg=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),ku.exports=W1(),ku.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var xg;function tv(){if(xg)return qi;xg=1;var i=$1(),r=Cd(),u=ev();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function p(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 g(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 b(e){if(h(e)!==e)throw Error(c(188))}function E(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return b(a),e;if(s===l)return b(a),t;s=s.sibling}throw Error(c(188))}if(n.return!==l.return)n=a,l=s;else{for(var f=!1,m=a.child;m;){if(m===n){f=!0,n=a,l=s;break}if(m===l){f=!0,l=a,n=s;break}m=m.sibling}if(!f){for(m=s.child;m;){if(m===n){f=!0,n=s,l=a;break}if(m===l){f=!0,l=s,n=a;break}m=m.sibling}if(!f)throw Error(c(189))}}if(n.alternate!==l)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?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}function x(e,t,n,l,a,s){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,l,a,s)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&x(e.child,t,n,l,a,s))return!0;e=e.sibling}return!1}function C(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function U(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function Z(e){var t=[null,null],n=C(e);return n===null||D(t,e,n.child,{foundSelf:!1}),t}function D(e,t,n,l){for(;n!==null;){if(n===t)l.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(l.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&D(e,t,n.child,l))return!0;n=n.sibling}return!1}function B(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(c(559))}}var G=null,X=null;function le(e,t,n){return e===n?!0:e===t?(G=e,!0):!1}function W(e,t,n){return e===n?(X=e,!1):e===t?(X!==null&&(G=e),!0):!1}function me(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function J(e,t,n){for(var l=0,a=e;a;a=n(a))l++;a=0;for(var s=t;s;s=n(s))a++;for(;0<l-a;)e=n(e),l--;for(;0<a-l;)t=n(t),a--;for(;l--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Y=Object.assign,R=Symbol.for("react.element"),I=Symbol.for("react.transitional.element"),ie=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),pe=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),Me=Symbol.for("react.activity"),Ue=Symbol.for("react.legacy_hidden"),Ge=Symbol.for("react.memo_cache_sentinel"),N=Symbol.for("react.view_transition"),S=Symbol.for("react.recoverable"),P=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function fe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case Q:return"Profiler";case te:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case Me:return"Activity";case N:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case ie:return"Portal";case pe:return e.displayName||"Context";case ae:return(e._context.displayName||"Context")+".Consumer";case T:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case se:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var Se=Array.isArray,oe=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},je=[],nt=-1;function Le(e){return{current:e}}function ve(e){0>nt||(e.current=je[nt],je[nt]=null,nt--)}function Be(e,t){nt++,je[nt]=e.current,e.current=t}var Ze=Le(null),Qa=Le(null),Hn=Le(null),Ii=Le(null);function Pi(e,t){switch(Be(Hn,t),Be(Qa,e),Be(Ze,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=yp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ve(Ze),Be(Ze,e)}function Il(){ve(Ze),ve(Qa),ve(Hn)}function Zr(e){var t=e.memoizedState;t!==null&&(Ba._currentValue=t.memoizedState,Be(Ii,e)),t=Ze.current;var n=yp(t,e.type);t!==n&&(Be(Qa,e),Be(Ze,n))}function Fi(e){Qa.current===e&&(ve(Ze),ve(Qa)),Ii.current===e&&(ve(Ii),Ba._currentValue=L)}var Jr,Ld;function Gn(e){if(Jr===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jr=t&&t[1]||"",Ld=-1<n.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Jr+e+Ld}var Ir=!1;function Pr(e,t){if(!e||Ir)return"";Ir=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(ee){var j=ee}Reflect.construct(e,[],H)}else{try{H.call()}catch(ee){j=ee}H=!1;try{var O=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),H=!0,new e}finally{H&&(O!==void 0?Object.defineProperty(e.prototype,"props",O):delete e.prototype.props)}}}else{try{throw Error()}catch(ee){j=ee}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(ee){if(ee&&j&&typeof ee.stack=="string")return[ee.stack,j.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),f=s[0],m=s[1];if(f&&m){var y=f.split(`
44
- `),A=m.split(`
45
- `);for(a=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;if(l===y.length||a===A.length)for(l=y.length-1,a=A.length-1;1<=l&&0<=a&&y[l]!==A[a];)a--;for(;1<=l&&0<=a;l--,a--)if(y[l]!==A[a]){if(l!==1||a!==1)do if(l--,a--,0>a||y[l]!==A[a]){var k=`
46
- `+y[l].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=l&&0<=a);break}}}finally{Ir=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Gn(n):""}function $b(e,t){switch(e.tag){case 26:case 27:case 5:return Gn(e.type);case 16:return Gn("Lazy");case 13:return e.child!==t&&t!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("SuspenseList");case 0:case 15:return Pr(e.type,!1);case 11:return Pr(e.type.render,!1);case 1:return Pr(e.type,!0);case 31:return Gn("Activity");case 30:return Gn("ViewTransition");default:return""}}function qd(e){try{var t="",n=null;do t+=$b(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
47
- Error generating stack: `+l.message+`
48
- `+l.stack}}var Fr=Object.prototype.hasOwnProperty,$r=i.unstable_scheduleCallback,Wr=i.unstable_cancelCallback,Wb=i.unstable_shouldYield,e0=i.unstable_requestPaint,Ot=i.unstable_now,t0=i.unstable_getCurrentPriorityLevel,Hd=i.unstable_ImmediatePriority,Gd=i.unstable_UserBlockingPriority,$i=i.unstable_NormalPriority,n0=i.unstable_LowPriority,Vd=i.unstable_IdlePriority,l0=i.log,a0=i.unstable_setDisableYieldValue,Xa=null,kt=null;function Vn(e){if(typeof l0=="function"&&a0(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(Xa,e)}catch{}}var Rt=Math.clz32?Math.clz32:r0,i0=Math.log,s0=Math.LN2;function r0(e){return e>>>=0,e===0?32:31-(i0(e)/s0|0)|0}var Wi=256,es=262144,ts=4194304;function vl(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&-e;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 ns(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,s=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~s,l!==0?a=vl(l):(f&=m,f!==0?a=vl(f):n||(n=m&~e,n!==0&&(a=vl(n))))):(m=l&~s,m!==0?a=vl(m):f!==0?a=vl(f):n||(n=l&~e,n!==0&&(a=vl(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Ka(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yd(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-Rt(n),a=1<<l;t|=e[l],n&=~a}return t}function o0(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 Qd(){var e=ts;return ts<<=1,(ts&62914560)===0&&(ts=4194304),e}function eo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Za(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function c0(e,t,n,l,a,s){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,y=e.expirationTimes,A=e.hiddenUpdates;for(n=f&~n;0<n;){var k=31-Rt(n),H=1<<k;m[k]=0,y[k]=-1;var j=A[k];if(j!==null)for(A[k]=null,k=0;k<j.length;k++){var O=j[k];O!==null&&(O.lane&=-536870913)}n&=~H}l!==0&&Xd(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(f&~t))}function Xd(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Rt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Kd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Rt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Zd(e,t){var n=t&-t;return n=(n&42)!==0?1:to(n),(n&(e.suspendedLanes|t))!==0?0:n}function to(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 no(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Jd(){var e=be.p;return e!==0?e:(e=window.event,e===void 0?32:ng(e.type))}function Id(e,t){var n=be.p;try{return be.p=e,t()}finally{be.p=n}}var jn=Math.random().toString(36).slice(2),mt="__reactFiber$"+jn,At="__reactProps$"+jn,Pl="__reactContainer$"+jn,Pd="__reactEvents$"+jn,u0="__reactListeners$"+jn,d0="__reactHandles$"+jn,Fd="__reactResources$"+jn,Ja="__reactMarker$"+jn,ls="__reactLoad$"+jn;function as(e){delete e[mt],delete e[At],delete e[u0],delete e[d0]}function Nl(e){var t;if(t=e[mt])return t;for(var n=e.parentNode;n;){if(t=n[Pl]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bp(e);e!==null;){if(n=e[mt])return n;e=Bp(e)}return t}e=n,n=e.parentNode}return null}function Fl(e){if(e=e[mt]||e[Pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ia(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function $l(e){var t=e[Fd];return t||(t=e[Fd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[Ja]=!0}function $d(e){e[ls]=void 0}var Wd=new Set,ef={};function wl(e,t){Wl(e,t),Wl(e+"Capture",t)}function Wl(e,t){for(ef[e]=t,e=0;e<t.length;e++)Wd.add(t[e])}var f0=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]*$"),tf={},nf={};function h0(e){return Fr.call(nf,e)?!0:Fr.call(tf,e)?!1:f0.test(e)?nf[e]=!0:(tf[e]=!0,!1)}var qe=!1;function lf(){var e=qe;return qe=!1,e}function is(e,t,n){if(h0(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function ss(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function _n(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,l)}}function Dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function af(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function m0(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(f){n=""+f,s.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lo(e){if(!e._valueTracker){var t=af(e)?"checked":"value";e._valueTracker=m0(e,t,""+e[t])}}function sf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=af(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}var p0=/[\n"\\]/g;function Yt(e){return e.replace(p0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ao(e,t,n,l,a,s,f,m){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Dt(t)):e.value!==""+Dt(t)&&(e.value=""+Dt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?f==="number"&&e.value==t?io(e,Dt(e.value)):io(e,Dt(t)):n!=null?io(e,Dt(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Dt(m):e.removeAttribute("name")}function rf(e,t,n,l,a,s,f,m){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){lo(e);return}n=n!=null?""+Dt(n):"",t=t!=null?""+Dt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),lo(e)}function io(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ea(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Dt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function of(e,t,n){if(t!=null&&(t=""+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Dt(n):""}function cf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(c(92));if(Se(l)){if(1<l.length)throw Error(c(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Dt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),lo(e)}function ta(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var g0=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 uf(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||g0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function df(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="",qe=!0);for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&(uf(e,a,l),qe=!0)}else for(var s in t)t.hasOwnProperty(s)&&uf(e,s,t[s])}function so(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 x0=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"],["maskType","mask-type"],["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"]]),b0=/^[\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 rs(e){return b0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function on(){}var ro=null;function oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var na=null,la=null;function ff(e){var t=Fl(e);if(t&&(e=t.stateNode)){var n=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(ao(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Yt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[At]||null;if(!a)throw Error(c(90));ao(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&sf(l)}break e;case"textarea":of(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ea(e,!!n.multiple,t,!1)}}}var co=!1;function hf(e,t,n){if(co)return e(t,n);co=!0;try{var l=e(t);return l}finally{if(co=!1,(na!==null||la!==null)&&(rr(),na&&(t=na,e=la,la=na=null,ff(t),e)))for(t=0;t<e.length;t++)ff(e[t])}}function Pa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[At]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uo=!1;if(An)try{var Fa={};Object.defineProperty(Fa,"passive",{get:function(){uo=!0}}),window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch{uo=!1}var Yn=null,fo=null,os=null;function mf(){if(os)return os;var e,t=fo,n=t.length,l,a="value"in Yn?Yn.value:Yn.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var f=n-e;for(l=1;l<=f&&t[n-l]===a[s-l];l++);return os=a.slice(e,1<l?1-l:void 0)}function cs(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 us(){return!0}function pf(){return!1}function wt(e){function t(n,l,a,s,f){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=s,this.target=f,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(s):s[m]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?us:pf,this.isPropagationStopped=pf,this}return Y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=us)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=us)},persist:function(){},isPersistent:us}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ds=wt(Qn),$a=Y({},Qn,{view:0,detail:0}),y0=wt($a),ho,mo,Wa,fs=Y({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:go,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!==Wa&&(Wa&&e.type==="mousemove"?(ho=e.screenX-Wa.screenX,mo=e.screenY-Wa.screenY):mo=ho=0,Wa=e),ho)},movementY:function(e){return"movementY"in e?e.movementY:mo}}),gf=wt(fs),v0=Y({},fs,{dataTransfer:0}),N0=wt(v0),w0=Y({},$a,{relatedTarget:0}),po=wt(w0),S0=Y({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),j0=wt(S0),_0=Y({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),A0=wt(_0),T0=Y({},Qn,{data:0}),xf=wt(T0),C0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E0={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"},z0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=z0[e])?!!t[e]:!1}function go(){return M0}var O0=Y({},$a,{key:function(e){if(e.key){var t=C0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:go,charCode:function(e){return e.type==="keypress"?cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k0=wt(O0),R0=Y({},fs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bf=wt(R0),D0=Y({},Qn,{submitter:0}),B0=wt(D0),U0=Y({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:go}),L0=wt(U0),q0=Y({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),H0=wt(q0),G0=Y({},fs,{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}),V0=wt(G0),Y0=Y({},Qn,{newState:0,oldState:0,source:0}),Q0=wt(Y0),X0=[9,13,27,32],xo=An&&"CompositionEvent"in window,ei=null;An&&"documentMode"in document&&(ei=document.documentMode);var K0=An&&"TextEvent"in window&&!ei,yf=An&&(!xo||ei&&8<ei&&11>=ei),vf=" ",Nf=!1;function wf(e,t){switch(e){case"keyup":return X0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var aa=!1;function Z0(e,t){switch(e){case"compositionend":return Sf(t);case"keypress":return t.which!==32?null:(Nf=!0,vf);case"textInput":return e=t.data,e===vf&&Nf?null:e;default:return null}}function J0(e,t){if(aa)return e==="compositionend"||!xo&&wf(e,t)?(e=mf(),os=fo=Yn=null,aa=!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 yf&&t.locale!=="ko"?null:t.data;default:return null}}var I0={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 jf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I0[e.type]:t==="textarea"}function _f(e,t,n,l){na?la?la.push(l):la=[l]:na=l,t=hr(t,"onChange"),0<t.length&&(n=new ds("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ti=null,ni=null;function P0(e){fp(e,0)}function hs(e){var t=Ia(e);if(sf(t))return e}function Af(e,t){if(e==="change")return t}var Tf=!1;if(An){var bo;if(An){var yo="oninput"in document;if(!yo){var Cf=document.createElement("div");Cf.setAttribute("oninput","return;"),yo=typeof Cf.oninput=="function"}bo=yo}else bo=!1;Tf=bo&&(!document.documentMode||9<document.documentMode)}function Ef(){ti&&(ti.detachEvent("onpropertychange",zf),ni=ti=null)}function zf(e){if(e.propertyName==="value"&&hs(ni)){var t=[];_f(t,ni,e,oo(e)),hf(P0,t)}}function F0(e,t,n){e==="focusin"?(Ef(),ti=t,ni=n,ti.attachEvent("onpropertychange",zf)):e==="focusout"&&Ef()}function $0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hs(ni)}function W0(e,t){if(e==="click")return hs(t)}function ey(e,t){if(e==="input"||e==="change")return hs(t)}function ty(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:ty;function li(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Fr.call(t,a)||!Bt(e[a],t[a]))return!1}return!0}function vo(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}}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Of(e,t){var n=Mf(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mf(n)}}function kf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vo(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vo(e.document)}return t}function No(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 ny=An&&"documentMode"in document&&11>=document.documentMode,ia=null,wo=null,ai=null,So=!1;function Df(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;So||ia==null||ia!==vo(l)||(l=ia,"selectionStart"in l&&No(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ai&&li(ai,l)||(ai=l,l=hr(wo,"onSelect"),0<l.length&&(t=new ds("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=ia)))}function Sl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionrun:Sl("Transition","TransitionRun"),transitionstart:Sl("Transition","TransitionStart"),transitioncancel:Sl("Transition","TransitionCancel"),transitionend:Sl("Transition","TransitionEnd")},jo={},Bf={};An&&(Bf=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function jl(e){if(jo[e])return jo[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bf)return jo[e]=t[n];return e}var Uf=jl("animationend"),Lf=jl("animationiteration"),qf=jl("animationstart"),ly=jl("transitionrun"),ay=jl("transitionstart"),iy=jl("transitioncancel"),Hf=jl("transitionend"),Gf=new Map,_o="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");_o.push("scrollEnd");function Wt(e,t){Gf.set(e,t),wl(t,[e])}var sy=0;function Tn(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=ln.identifierPrefix;var n=sy++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Vf(e){if(e==null||typeof e=="string")return e;var t=null,n=Aa;if(n!==null)for(var l=0;l<n.length;l++){var a=e[n[l]];if(a!=null){if(a==="none")return"none";t=t==null?a:t+(" "+a)}}return t??e.default}function Cn(e,t){return e=Vf(e),t=Vf(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var ms=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)},Qt=[],ra=0,Ao=0;function ps(){for(var e=ra,t=Ao=ra=0;t<e;){var n=Qt[t];Qt[t++]=null;var l=Qt[t];Qt[t++]=null;var a=Qt[t];Qt[t++]=null;var s=Qt[t];if(Qt[t++]=null,l!==null&&a!==null){var f=l.pending;f===null?a.next=a:(a.next=f.next,f.next=a),l.pending=a}s!==0&&Yf(n,a,s)}}function gs(e,t,n,l){Qt[ra++]=e,Qt[ra++]=t,Qt[ra++]=n,Qt[ra++]=l,Ao|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function To(e,t,n,l){return gs(e,t,n,l),xs(e)}function _l(e,t){return gs(e,null,null,t),xs(e)}function Yf(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-Rt(n),e=s.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),s):null}function xs(e){if(50<Ai)throw Ai=0,sr=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oa={};function ry(e,t,n,l){this.tag=e,this.key=n,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(e,t,n,l){return new ry(e,t,n,l)}function Co(e){return e=e.prototype,!(!e||!e.isReactComponent)}function En(e,t){var n=e.alternate;return n===null?(n=Tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Qf(e,t){e.flags&=1206910978;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bs(e,t,n,l,a,s){var f=0;if(l=e,typeof l=="function")Co(l)&&(f=1);else if(typeof l=="string")f=D1(e,n,Ze.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(l){case Me:return e=Tt(31,n,t,a),e.elementType=Me,e.lanes=s,e;case $:return Al(n.children,a,s,t);case te:f=8,a|=24;break;case Q:return e=Tt(12,n,t,a|2),e.elementType=Q,e.lanes=s,e;case F:return e=Tt(13,n,t,a),e.elementType=F,e.lanes=s,e;case M:return e=Tt(19,n,t,a),e.elementType=M,e.lanes=s,e;case Ue:case N:return e=a|32,e=Tt(30,n,t,e),e.elementType=N,e.lanes=s,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case pe:f=10;break e;case ae:f=9;break e;case T:f=11;break e;case se:f=14;break e;case V:f=16,l=null;break e}f=29,n=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=Tt(f,n,t,a),t.elementType=e,t.type=l,t.lanes=s,t}function Al(e,t,n,l){return e=Tt(7,e,l,t),e.lanes=n,e}function Eo(e,t,n){return e=Tt(6,e,null,t),e.lanes=n,e}function Xf(e){var t=Tt(18,null,null,0);return t.stateNode=e,t}function zo(e,t,n){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kf=new WeakMap;function Xt(e,t){if(typeof e=="object"&&e!==null){var n=Kf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:qd(t)},Kf.set(e,t),t)}return{value:e,source:t,stack:qd(t)}}var ca=[],ua=0,ys=null,ii=0,Kt=[],Zt=0,Xn=null,cn=1,un="";function zn(e,t){ca[ua++]=ii,ca[ua++]=ys,ys=e,ii=t}function Zf(e,t,n){Kt[Zt++]=cn,Kt[Zt++]=un,Kt[Zt++]=Xn,Xn=e;var l=cn;e=un;var a=32-Rt(l)-1;l&=~(1<<a),n+=1;var s=32-Rt(t)+a;if(30<s){var f=a-a%5;s=(l&(1<<f)-1).toString(32),l>>=f,a-=f,cn=1<<32-Rt(t)+a|n<<a|l,un=s+e}else cn=1<<s|n<<a|l,un=e}function vs(e){e.return!==null&&(zn(e,1),Zf(e,1,0))}function Mo(e){for(;e===ys;)ys=ca[--ua],ca[ua]=null,ii=ca[--ua],ca[ua]=null;for(;e===Xn;)Xn=Kt[--Zt],Kt[Zt]=null,un=Kt[--Zt],Kt[Zt]=null,cn=Kt[--Zt],Kt[Zt]=null}function Jf(e,t){Kt[Zt++]=cn,Kt[Zt++]=un,Kt[Zt++]=Xn,cn=t.id,un=t.overflow,Xn=e}var dt=null,Ie=null,Te=!1,Kn=null,Jt=!1,Oo=Error(c(519));function Zn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw si(Xt(t,e)),Oo}function If(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[mt]=e,t[At]=l,n){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(n=0;n<Ci.length;n++)ze(Ci[n],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),rf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),cf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||gp(t.textContent,n)?(l.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),l.onScroll!=null&&ze("scroll",t),l.onScrollEnd!=null&&ze("scrollend",t),l.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||Zn(e,!0)}function Ns(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:dt=dt.return}}function da(e){if(e!==dt)return!1;if(!Te)return Ns(e),Te=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ou(e.type,e.memoizedProps)),n=!n),n&&Ie&&Zn(e),Ns(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=Dp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=Dp(e)}else t===27?(t=Ie,cl(e.type)?(e=xu,xu=null,Ie=e):Ie=t):Ie=dt?Pt(e.stateNode.nextSibling):null;return!0}function Tl(){Ie=dt=null,Te=!1}function ko(){var e=Kn;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Kn=null),e}function si(e){Kn===null?Kn=[e]:Kn.push(e)}var Ro=Le(null),Cl=null,Mn=null;function Jn(e,t,n){Be(Ro,t._currentValue),t._currentValue=n}function On(e){e._currentValue=Ro.current,ve(Ro)}function ws(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Do(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var f=a.child;s=s.firstContext;e:for(;s!==null;){var m=s;s=a;for(var y=0;y<t.length;y++)if(m.context===t[y]){s.lanes|=n,m=s.alternate,m!==null&&(m.lanes|=n),ws(s.return,n,e),l||(f=null);break e}s=m.next}}else if(a.tag===18){if(f=a.return,f===null)throw Error(c(341));f.lanes|=n,s=f.alternate,s!==null&&(s.lanes|=n),ws(f,n,e),f=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,f=a.alternate,f!==null&&(f.lanes|=n),ws(a.return,n,e),f=a.child,f=f!==null?f.sibling:null):f=a.child;if(f!==null)f.return=a;else for(f=a;f!==null;){if(f===e){f=null;break}if(a=f.sibling,a!==null){a.return=f.return,f=a;break}f=f.return}a=f}}function El(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var f=a.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var m=a.type;Bt(a.pendingProps.value,f.value)||(e!==null?e.push(m):e=[m])}}else if(a===Ii.current){if(f=a.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ba):e=[Ba])}a=a.return}return e!==null&&Do(t,e,n,l),t.flags|=262144,e!==null}function Ss(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zl(e){Cl=e,Mn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pt(e){return Pf(Cl,e)}function js(e,t){return Cl===null&&zl(e),Pf(e,t)}function Pf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Mn===null){if(e===null)throw Error(c(308));Mn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Mn=Mn.next=t;return n}var oy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},cy=i.unstable_scheduleCallback,uy=i.unstable_NormalPriority,lt={$$typeof:pe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bo(){return{controller:new oy,data:new Map,refCount:0}}function ri(e){e.refCount--,e.refCount===0&&cy(uy,function(){e.controller.abort()})}function Ff(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var l=t[e];n.indexOf(l)===-1&&n.push(l)}}}var oi=null;function dy(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ci=null,Uo=0,Ml=0,fa=null;function fy(e,t){if(ci===null){var n=ci=[];Uo=0,Ml=Wc(),fa={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Uo++,t.then($f,$f),t}function $f(){if(--Uo===0&&(oi=null,ci!==null)){fa!==null&&(fa.status="fulfilled");var e=ci;ci=null,Ml=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Wf=oe.S;oe.S=function(e,t){if(Xm=Ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&fy(e,t),oi!==null)for(var n=za;n!==null;)Ff(n,oi),n=n.next;if(n=e.types,n!==null){for(var l=za;l!==null;)Ff(l,n),l=l.next;if(Ml!==0){l=oi,l===null&&(l=oi=[]);for(var a=0;a<n.length;a++){var s=n[a];l.indexOf(s)===-1&&l.push(s)}}}Wf!==null&&Wf(e,t)};var Ol=Le(null);function Lo(){var e=Ol.current;return e!==null?e:Je.pooledCache}function _s(e,t){t===null?Be(Ol,Ol.current):Be(Ol,t.pool)}function eh(){var e=Lo();return e===null?null:{parent:lt._currentValue,pool:e}}var ha=Error(c(460)),qo=Error(c(474)),As=Error(c(542)),Ts={then:function(){}};function th(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nh(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(on,on),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ah(e),e===void 0&&!("reason"in t)?Error(c(600)):e;default:if(typeof t.status=="string")t.then(on,on);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ah(e),e}throw Rl=t,ha}}function kl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Rl=n,ha):n}}var Rl=null;function lh(){if(Rl===null)throw Error(c(459));var e=Rl;return Rl=null,e}function ah(e){if(e===ha||e===As)throw Error(c(483))}var ma=null,ui=0;function Cs(e){var t=ui;return ui+=1,ma===null&&(ma=[]),nh(ma,e,t)}function In(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Es(e,t){throw t.$$typeof===R?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ih(e){function t(_,w){if(e){var z=_.deletions;z===null?(_.deletions=[w],_.flags|=16):z.push(w)}}function n(_,w){if(!e)return null;for(;w!==null;)t(_,w),w=w.sibling;return null}function l(_){for(var w=new Map;_!==null;)_.key===null?w.set(_.index,_):w.set(_.key,_),_=_.sibling;return w}function a(_,w){return _=En(_,w),_.index=0,_.sibling=null,_}function s(_,w,z){return _.index=z,e?(z=_.alternate,z!==null?(z=z.index,z<w?(_.flags|=2,w):z):(_.flags|=134217730,w)):(_.flags|=1048576,w)}function f(_){return e&&_.alternate===null&&(_.flags|=134217730),_}function m(_,w,z,q){return w===null||w.tag!==6?(w=Eo(z,_.mode,q),w.return=_,w):(w=a(w,z),w.return=_,w)}function y(_,w,z,q){var ce=z.type;return ce===$?(_=k(_,w,z.props.children,q,z.key),In(_,z),_):w!==null&&(w.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===V&&kl(ce)===w.type)?(w=a(w,z.props),In(w,z),w.return=_,w):(w=bs(z.type,z.key,z.props,null,_.mode,q),In(w,z),w.return=_,w)}function A(_,w,z,q){return w===null||w.tag!==4||w.stateNode.containerInfo!==z.containerInfo||w.stateNode.implementation!==z.implementation?(w=zo(z,_.mode,q),w.return=_,w):(w=a(w,z.children||[]),w.return=_,w)}function k(_,w,z,q,ce){return w===null||w.tag!==7?(w=Al(z,_.mode,q,ce),w.return=_,w):(w=a(w,z),w.return=_,w)}function H(_,w,z){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=Eo(""+w,_.mode,z),w.return=_,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case I:return z=bs(w.type,w.key,w.props,null,_.mode,z),In(z,w),z.return=_,z;case ie:return w=zo(w,_.mode,z),w.return=_,w;case V:return w=kl(w),H(_,w,z)}if(Se(w)||ne(w))return w=Al(w,_.mode,z,null),w.return=_,w;if(typeof w.then=="function")return H(_,Cs(w),z);if(w.$$typeof===pe)return H(_,js(_,w),z);Es(_,w)}return null}function j(_,w,z,q){var ce=w!==null?w.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return ce!==null?null:m(_,w,""+z,q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case I:return z.key===ce?y(_,w,z,q):null;case ie:return z.key===ce?A(_,w,z,q):null;case V:return z=kl(z),j(_,w,z,q)}if(Se(z)||ne(z))return ce!==null?null:k(_,w,z,q,null);if(typeof z.then=="function")return j(_,w,Cs(z),q);if(z.$$typeof===pe)return j(_,w,js(_,z),q);Es(_,z)}return null}function O(_,w,z,q,ce){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(z)||null,m(w,_,""+q,ce);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case I:return _=_.get(q.key===null?z:q.key)||null,y(w,_,q,ce);case ie:return _=_.get(q.key===null?z:q.key)||null,A(w,_,q,ce);case V:return q=kl(q),O(_,w,z,q,ce)}if(Se(q)||ne(q))return _=_.get(z)||null,k(w,_,q,ce,null);if(typeof q.then=="function")return O(_,w,z,Cs(q),ce);if(q.$$typeof===pe)return O(_,w,z,js(w,q),ce);Es(w,q)}return null}function ee(_,w,z,q){for(var ce=null,ke=null,ge=w,Ne=w=0,st=null;ge!==null&&Ne<z.length;Ne++){ge.index>Ne?(st=ge,ge=null):st=ge.sibling;var De=j(_,ge,z[Ne],q);if(De===null){ge===null&&(ge=st);break}e&&ge&&De.alternate===null&&t(_,ge),w=s(De,w,Ne),ke===null?ce=De:ke.sibling=De,ke=De,ge=st}if(Ne===z.length)return n(_,ge),Te&&zn(_,Ne),ce;if(ge===null){for(;Ne<z.length;Ne++)ge=H(_,z[Ne],q),ge!==null&&(w=s(ge,w,Ne),ke===null?ce=ge:ke.sibling=ge,ke=ge);return Te&&zn(_,Ne),ce}for(ge=l(ge);Ne<z.length;Ne++)st=O(ge,_,Ne,z[Ne],q),st!==null&&(e&&(De=st.alternate,De!==null&&ge.delete(De.key===null?Ne:De.key)),w=s(st,w,Ne),ke===null?ce=st:ke.sibling=st,ke=st);return e&&ge.forEach(function(ml){return t(_,ml)}),Te&&zn(_,Ne),ce}function he(_,w,z,q){if(z==null)throw Error(c(151));for(var ce=null,ke=null,ge=w,Ne=w=0,st=null,De=z.next();ge!==null&&!De.done;Ne++,De=z.next()){ge.index>Ne?(st=ge,ge=null):st=ge.sibling;var ml=j(_,ge,De.value,q);if(ml===null){ge===null&&(ge=st);break}e&&ge&&ml.alternate===null&&t(_,ge),w=s(ml,w,Ne),ke===null?ce=ml:ke.sibling=ml,ke=ml,ge=st}if(De.done)return n(_,ge),Te&&zn(_,Ne),ce;if(ge===null){for(;!De.done;Ne++,De=z.next())De=H(_,De.value,q),De!==null&&(w=s(De,w,Ne),ke===null?ce=De:ke.sibling=De,ke=De);return Te&&zn(_,Ne),ce}for(ge=l(ge);!De.done;Ne++,De=z.next())De=O(ge,_,Ne,De.value,q),De!==null&&(e&&(st=De.alternate,st!==null&&ge.delete(st.key===null?Ne:st.key)),w=s(De,w,Ne),ke===null?ce=De:ke.sibling=De,ke=De);return e&&ge.forEach(function(Z1){return t(_,Z1)}),Te&&zn(_,Ne),ce}function Ae(_,w,z,q){if(typeof z=="object"&&z!==null&&z.type===$&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case I:e:{for(var ce=z.key;w!==null;){if(w.key===ce){if(ce=z.type,ce===$){if(w.tag===7){n(_,w.sibling),q=a(w,z.props.children),In(q,z),q.return=_,_=q;break e}}else if(w.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===V&&kl(ce)===w.type){n(_,w.sibling),q=a(w,z.props),In(q,z),q.return=_,_=q;break e}n(_,w);break}else t(_,w);w=w.sibling}z.type===$?(q=Al(z.props.children,_.mode,q,z.key),In(q,z),q.return=_,_=q):(q=bs(z.type,z.key,z.props,null,_.mode,q),In(q,z),q.return=_,_=q)}return f(_);case ie:e:{for(ce=z.key;w!==null;){if(w.key===ce)if(w.tag===4&&w.stateNode.containerInfo===z.containerInfo&&w.stateNode.implementation===z.implementation){n(_,w.sibling),q=a(w,z.children||[]),q.return=_,_=q;break e}else{n(_,w);break}else t(_,w);w=w.sibling}q=zo(z,_.mode,q),q.return=_,_=q}return f(_);case V:return z=kl(z),Ae(_,w,z,q)}if(Se(z))return ee(_,w,z,q);if(ne(z)){if(ce=ne(z),typeof ce!="function")throw Error(c(150));return z=ce.call(z),he(_,w,z,q)}if(typeof z.then=="function")return Ae(_,w,Cs(z),q);if(z.$$typeof===pe)return Ae(_,w,js(_,z),q);Es(_,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,w!==null&&w.tag===6?(n(_,w.sibling),q=a(w,z),q.return=_,_=q):(n(_,w),q=Eo(z,_.mode,q),q.return=_,_=q),f(_)):n(_,w)}return function(_,w,z,q){try{ui=0;var ce=Ae(_,w,z,q);return ma=null,ce}catch(ge){if(ge===ha||ge===As)throw ge;var ke=Tt(29,ge,null,_.mode);return ke.lanes=q,ke.return=_,ke}finally{}}}var Dl=ih(!0),sh=ih(!1),Pn=!1;function Ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Go(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 Fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $n(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=xs(e),Yf(e,null,n),t}return gs(e,l,t,n),xs(e)}function di(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Kd(e,n)}}function Vo(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?a=s=f:s=s.next=f,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Yo=!1;function fi(){if(Yo){var e=fa;if(e!==null)throw e}}function hi(e,t,n,l){Yo=!1;var a=e.updateQueue;Pn=!1;var s=a.firstBaseUpdate,f=a.lastBaseUpdate,m=a.shared.pending;if(m!==null){a.shared.pending=null;var y=m,A=y.next;y.next=null,f===null?s=A:f.next=A,f=y;var k=e.alternate;k!==null&&(k=k.updateQueue,m=k.lastBaseUpdate,m!==f&&(m===null?k.firstBaseUpdate=A:m.next=A,k.lastBaseUpdate=y))}if(s!==null){var H=a.baseState;f=0,k=A=y=null,m=s;do{var j=m.lane&-536870913,O=j!==m.lane;if(O?(Oe&j)===j:(l&j)===j){j!==0&&j===Ml&&(Yo=!0),k!==null&&(k=k.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ee=e,he=m;j=t;var Ae=n;switch(he.tag){case 1:if(ee=he.payload,typeof ee=="function"){H=ee.call(Ae,H,j);break e}H=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=he.payload,j=typeof ee=="function"?ee.call(Ae,H,j):ee,j==null)break e;H=Y({},H,j);break e;case 2:Pn=!0}}j=m.callback,j!==null&&(e.flags|=64,O&&(e.flags|=8192),O=a.callbacks,O===null?a.callbacks=[j]:O.push(j))}else O={lane:j,tag:m.tag,payload:m.payload,callback:m.callback,next:null},k===null?(A=k=O,y=H):k=k.next=O,f|=j;if(m=m.next,m===null){if(m=a.shared.pending,m===null)break;O=m,m=O.next,O.next=null,a.lastBaseUpdate=O,a.shared.pending=null}}while(!0);k===null&&(y=H),a.baseState=y,a.firstBaseUpdate=A,a.lastBaseUpdate=k,s===null&&(a.shared.lanes=0),il|=f,e.lanes=f,e.memoizedState=H}}function rh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function oh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)rh(n[e],t)}var Wn=Le(null),zs=Le(0);function ch(e,t){e=Un,Be(zs,e),Be(Wn,t),Un=e|t.baseLanes}function Qo(){Be(zs,Un),Be(Wn,Wn.current)}function Xo(){Un=zs.current,ve(Wn),ve(zs)}var gt=Le(null),Nt=null;function el(e){var t=e.alternate;Be(xt,xt.current&1),Be(gt,e),Nt===null&&(t===null||Wn.current!==null||t.memoizedState!==null)&&(Nt=e)}function Ko(e){Be(xt,xt.current),Be(gt,e),Nt===null&&(Nt=e)}function uh(e){e.tag===22?(Be(xt,xt.current),Be(gt,e),Nt===null&&(Nt=e)):tl()}function tl(){Be(xt,xt.current),Be(gt,gt.current)}function Ut(e){ve(gt),Nt===e&&(Nt=null),ve(xt)}var xt=Le(0);function mi(e,t){Be(gt,gt.current),Be(xt,t)}function Zo(e){ve(xt),ve(gt),Nt===e&&(Nt=null)}function Ms(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||pu(n)||gu(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 kn=0,_e=null,Ke=null,at=null,Os=!1,pa=!1,Bl=!1,ks=0,pi=0,ga=null,my=0;function We(){throw Error(c(321))}function Jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Io(e,t,n,l,a,s){return kn=s,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oe.H=e===null||e.memoizedState===null?Zh:Jh,Bl=!1,s=n(l,a),Bl=!1,pa&&(s=fh(t,n,l,a)),dh(e),s}function dh(e){oe.H=Hs;var t=Ke!==null&&Ke.next!==null;if(kn=0,at=Ke=_e=null,Os=!1,pi=0,ga=null,t)throw Error(c(300));e===null||it||(e=e.dependencies,e!==null&&Ss(e)&&(it=!0))}function fh(e,t,n,l){_e=e;var a=0;do{if(pa&&(ga=null),pi=0,pa=!1,25<=a)throw Error(c(301));if(a+=1,at=Ke=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}oe.H=wy,s=t(n,l)}while(pa);return s}function py(){var e=oe.H,t=e.useState()[0];return t=typeof t.then=="function"?gi(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(_e.flags|=1024),t}function Po(){var e=ks!==0;return ks=0,e}function Fo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function $o(e){if(Os){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Os=!1}kn=0,at=Ke=_e=null,pa=!1,pi=ks=0,ga=null}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?_e.memoizedState=at=e:at=at.next=e,at}function tt(){if(Ke===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=at===null?_e.memoizedState:at.next;if(t!==null)at=t,Ke=e;else{if(e===null)throw _e.alternate===null?Error(c(467)):Error(c(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},at===null?_e.memoizedState=at=e:at=at.next=e}return at}function Rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gi(e){var t=pi;return pi+=1,ga===null&&(ga=[]),e=nh(ga,e,t),t=_e,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,oe.H=t===null||t.memoizedState===null?Zh:Jh),e}function Ds(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gi(e);if(e.$$typeof===S)return;if(e.$$typeof===pe)return pt(e)}throw Error(c(438,String(e)))}function Wo(e){var t=null,n=_e.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=_e.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Rs(),_e.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Ge;return t.index++,n}function Rn(e,t){return typeof t=="function"?t(e):t}function Bs(e){var t=tt();return ec(t,Ke,e)}function ec(e,t,n){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var f=a.next;a.next=s.next,s.next=f}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var m=f=null,y=null,A=t,k=!1;do{var H=A.lane&-536870913;if(H!==A.lane?(Oe&H)===H:(kn&H)===H){var j=A.revertLane;if(j===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),H===Ml&&(k=!0);else if((kn&j)===j){A=A.next,j===Ml&&(k=!0);continue}else H={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},y===null?(m=y=H,f=s):y=y.next=H,_e.lanes|=j,il|=j;H=A.action,Bl&&n(s,H),s=A.hasEagerState?A.eagerState:n(s,H)}else j={lane:H,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},y===null?(m=y=j,f=s):y=y.next=j,_e.lanes|=H,il|=H;A=A.next}while(A!==null&&A!==t);if(y===null?f=s:y.next=m,!Bt(s,e.memoizedState)&&(it=!0,k&&(n=fa,n!==null)))throw n;e.memoizedState=s,e.baseState=f,e.baseQueue=y,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function tc(e){var t=tt(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var f=a=a.next;do s=e(s,f.action),f=f.next;while(f!==a);Bt(s,t.memoizedState)||(it=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function hh(e,t,n){var l=_e,a=tt(),s=Te;if(s){if(n===void 0)throw Error(c(407));n=n()}else n=t();var f=!Bt((Ke||a).memoizedState,n);if(f&&(a.memoizedState=n,it=!0),a=a.queue,ac(gh.bind(null,l,a,e),[e]),e=a.getSnapshot!==t||f||at!==null&&(at.memoizedState.tag&1)!==0,xa(e?9:8,{destroy:void 0},ph.bind(null,l,a,n,t),null),e){if(l.flags|=2048,Je===null)throw Error(c(349));s||(kn&127)!==0||mh(l,t,n)}return n}function mh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_e.updateQueue,t===null?(t=Rs(),_e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ph(e,t,n,l){t.value=n,t.getSnapshot=l,xh(t)&&bh(e)}function gh(e,t,n){return n(function(){xh(t)&&bh(e)})}function xh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function bh(e){var t=_l(e,2);t!==null&&Mt(t,e,2)}function nc(e){var t=St();if(typeof e=="function"){var n=e;if(e=n(),Bl){Vn(!0);try{n()}finally{Vn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:e},t}function yh(e,t,n,l){return e.baseState=n,ec(e,Ke,typeof l=="function"?l:Rn)}function gy(e,t,n,l,a){if(qs(e))throw Error(c(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){s.listeners.push(f)}};oe.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,vh(t,s)):(s.next=n.next,t.pending=n.next=s)}}function vh(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=oe.T,f={};f.types=s!==null?s.types:null,oe.T=f;try{var m=n(a,l),y=oe.S;y!==null&&y(f,m),Nh(e,t,m)}catch(A){lc(e,t,A)}finally{s!==null&&f.types!==null&&(s.types=f.types),oe.T=s}}else try{s=n(a,l),Nh(e,t,s)}catch(A){lc(e,t,A)}}function Nh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){wh(e,t,l)},function(l){return lc(e,t,l)}):wh(e,t,n)}function wh(e,t,n){t.status="fulfilled",t.value=n,Sh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,vh(e,n)))}function lc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Sh(t),t=t.next;while(t!==l)}e.action=null}function Sh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jh(e,t){return t}function _h(e,t){if(Te){var n=Je.formState;if(n!==null){e:{var l=_e;if(Te){if(Ie){t:{for(var a=Ie,s=Jt;a.nodeType!==8;){if(!s){a=null;break t}if(a=Pt(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Ie=Pt(a.nextSibling),l=a.data==="F!";break e}}Zn(l)}l=!1}l&&(t=n[0])}}return n=St(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jh,lastRenderedState:t},n.queue=l,n=Qh.bind(null,_e,l),l.dispatch=n,l=nc(!1),s=cc.bind(null,_e,!1,l.queue),l=St(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=gy.bind(null,_e,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Ah(e){var t=tt();return Th(t,Ke,e)}function Th(e,t,n){if(t=ec(e,t,jh)[0],e=Bs(Rn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=gi(t)}catch(f){throw f===ha?As:f}else l=t;t=tt();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(_e.flags|=2048,xa(9,{destroy:void 0},xy.bind(null,a,n),null)),[l,s,e]}function xy(e,t){e.action=t}function Ch(e){var t=tt(),n=Ke;if(n!==null)return Th(t,n,e);tt(),t=t.memoizedState,n=tt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function xa(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=_e.updateQueue,t===null&&(t=Rs(),_e.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Eh(){return tt().memoizedState}function Us(e,t,n,l){var a=St();_e.flags|=e,a.memoizedState=xa(1|t,{destroy:void 0},n,l===void 0?null:l)}function Ls(e,t,n,l){var a=tt();l=l===void 0?null:l;var s=a.memoizedState.inst;Ke!==null&&l!==null&&Jo(l,Ke.memoizedState.deps)?a.memoizedState=xa(t,s,n,l):(_e.flags|=e,a.memoizedState=xa(1|t,s,n,l))}function zh(e,t){Us(8390656,8,e,t)}function ac(e,t){Ls(2048,8,e,t)}function by(e){_e.flags|=4;var t=_e.updateQueue;if(t===null)t=Rs(),_e.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Mh(e){var t=tt().memoizedState;return by({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Oh(e,t){return Ls(4,2,e,t)}function kh(e,t){return Ls(4,4,e,t)}function Rh(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Dh(e,t,n){n=n!=null?n.concat([e]):null,Ls(4,4,Rh.bind(null,t,e),n)}function ic(){}function Bh(e,t){var n=tt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Jo(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Uh(e,t){var n=tt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Jo(t,l[1]))return l[0];if(l=e(),Bl){Vn(!0);try{e()}finally{Vn(!1)}}return n.memoizedState=[l,t],l}function sc(e,t,n){return n===void 0||(kn&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Zm(),_e.lanes|=e,il|=e,n)}function Lh(e,t,n,l){return Bt(n,t)?n:Wn.current!==null?(e=sc(e,n,l),Bt(e,t)||(it=!0),e):(kn&106)===0||(kn&1073741824)!==0&&(Oe&261930)===0?(it=!0,e.memoizedState=n):(e=Zm(),_e.lanes|=e,il|=e,t)}function qh(e,t,n,l,a){var s=be.p;be.p=s!==0&&8>s?s:8;var f=oe.T,m={};m.types=f!==null?f.types:null,oe.T=m,cc(e,!1,t,n);try{var y=a(),A=oe.S;if(A!==null&&A(m,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var k=hy(y,l);xi(e,t,k,Gt(e))}else xi(e,t,l,Gt(e))}catch(H){xi(e,t,{then:function(){},status:"rejected",reason:H},Gt())}finally{be.p=s,f!==null&&m.types!==null&&(f.types=m.types),oe.T=f}}function yy(){}function rc(e,t,n,l){if(e.tag!==5)throw Error(c(476));var a=Hh(e).queue;qh(e,a,t,L,n===null?yy:function(){return Gh(e),n(l)})}function Hh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Gh(e){var t=Hh(e);t.next===null&&(t=e.alternate.memoizedState),xi(e,t.next.queue,{},Gt())}function oc(){return pt(Ba)}function Vh(){return tt().memoizedState}function Yh(){return tt().memoizedState}function vy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gt();e=Fn(n);var l=$n(t,e,n);l!==null&&(Mt(l,t,n),di(l,t,n)),t={cache:Bo()},e.payload=t;return}t=t.return}}function Ny(e,t,n){var l=Gt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qs(e)?Xh(t,n):(n=To(e,t,n,l),n!==null&&(Mt(n,e,l),Kh(n,t,l)))}function Qh(e,t,n){var l=Gt();xi(e,t,n,l)}function xi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(qs(e))Xh(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var f=t.lastRenderedState,m=s(f,n);if(a.hasEagerState=!0,a.eagerState=m,Bt(m,f))return gs(e,t,a,0),Je===null&&ps(),!1}catch{}finally{}if(n=To(e,t,a,l),n!==null)return Mt(n,e,l),Kh(n,t,l),!0}return!1}function cc(e,t,n,l){if(l={lane:2,revertLane:Wc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qs(e)){if(t)throw Error(c(479))}else t=To(e,n,l,2),t!==null&&Mt(t,e,2)}function qs(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function Xh(e,t){pa=Os=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kh(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Kd(e,n)}}var Hs={readContext:pt,use:Ds,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We,useEffectEvent:We},Zh={readContext:pt,use:Ds,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:zh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Us(4194308,4,Rh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Us(4194308,4,e,t)},useInsertionEffect:function(e,t){Us(4,2,e,t)},useMemo:function(e,t){var n=St();t=t===void 0?null:t;var l=e();if(Bl){Vn(!0);try{e()}finally{Vn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=St();if(n!==void 0){var a=n(t);if(Bl){Vn(!0);try{n(t)}finally{Vn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Ny.bind(null,_e,e),[l.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:function(e){e=nc(e);var t=e.queue,n=Qh.bind(null,_e,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ic,useDeferredValue:function(e,t){var n=St();return sc(n,e,t)},useTransition:function(){var e=nc(!1);return e=qh.bind(null,_e,e.queue,!0,!1),St().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=_e,a=St();if(Te){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Je===null)throw Error(c(349));(Oe&127)!==0||mh(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,zh(gh.bind(null,l,s,e),[e]),l.flags|=2048,xa(9,{destroy:void 0},ph.bind(null,l,s,n,t),null),n},useId:function(){var e=St(),t=Je.identifierPrefix;if(Te){var n=un,l=cn;n=(l&~(1<<32-Rt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ks++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=my++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:oc,useFormState:_h,useActionState:_h,useOptimistic:function(e){var t=St();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,_e,!0,n),n.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return St().memoizedState=vy.bind(null,_e)},useEffectEvent:function(e){var t=St(),n={impl:e};return t.memoizedState=n,function(){if((He&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},Jh={readContext:pt,use:Ds,useCallback:Bh,useContext:pt,useEffect:ac,useImperativeHandle:Dh,useInsertionEffect:Oh,useLayoutEffect:kh,useMemo:Uh,useReducer:Bs,useRef:Eh,useState:function(){return Bs(Rn)},useDebugValue:ic,useDeferredValue:function(e,t){var n=tt();return Lh(n,Ke.memoizedState,e,t)},useTransition:function(){var e=Bs(Rn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:gi(e),t]},useSyncExternalStore:hh,useId:Vh,useHostTransitionStatus:oc,useFormState:Ah,useActionState:Ah,useOptimistic:function(e,t){var n=tt();return yh(n,Ke,e,t)},useMemoCache:Wo,useCacheRefresh:Yh,useEffectEvent:Mh},wy={readContext:pt,use:Ds,useCallback:Bh,useContext:pt,useEffect:ac,useImperativeHandle:Dh,useInsertionEffect:Oh,useLayoutEffect:kh,useMemo:Uh,useReducer:tc,useRef:Eh,useState:function(){return tc(Rn)},useDebugValue:ic,useDeferredValue:function(e,t){var n=tt();return Ke===null?sc(n,e,t):Lh(n,Ke.memoizedState,e,t)},useTransition:function(){var e=tc(Rn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:gi(e),t]},useSyncExternalStore:hh,useId:Vh,useHostTransitionStatus:oc,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var n=tt();return Ke!==null?yh(n,Ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Wo,useCacheRefresh:Yh,useEffectEvent:Mh};function uc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:Y({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Gt(),a=Fn(l);a.payload=t,n!=null&&(a.callback=n),t=$n(e,a,l),t!==null&&(Mt(t,e,l),di(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Gt(),a=Fn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=$n(e,a,l),t!==null&&(Mt(t,e,l),di(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gt(),l=Fn(n);l.tag=2,t!=null&&(l.callback=t),t=$n(e,l,n),t!==null&&(Mt(t,e,n),di(t,e,n))}};function Ih(e,t,n,l,a,s,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,f):t.prototype&&t.prototype.isPureReactComponent?!li(n,l)||!li(a,s):!0}function Ph(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&dc.enqueueReplaceState(t,t.state,null)}function Ul(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=Y({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Fh(e){ms(e)}function $h(e){console.error(e)}function Wh(e){ms(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function em(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function fc(e,t,n){return n=Fn(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function tm(e){return e=Fn(e),e.tag=3,e}function nm(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var s=l.value;e.payload=function(){return a(s)},e.callback=function(){em(t,n,l)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){em(t,n,l),typeof a!="function"&&(sl===null?sl=new Set([this]):sl.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function Sy(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&El(t,n,a,!0),n=gt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Nt===null?or():n.alternate===null&&et===0&&(et=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Ts?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Pc(e,l,a)),!1;case 22:return n.flags|=65536,l===Ts?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Pc(e,l,a)),!1}throw Error(c(435,n.tag))}return Pc(e,l,a),or(),!1}if(Te)return t=gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Oo&&(e=Error(c(422),{cause:l}),si(Xt(e,n)))):(l!==Oo&&(t=Error(c(423),{cause:l}),si(Xt(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=Xt(l,n),a=fc(e.stateNode,l,a),Vo(e,a),et!==4&&(et=2)),!1;var s=Error(c(520),{cause:l});if(s=Xt(s,n),_i===null?_i=[s]:_i.push(s),et!==4&&(et=2),t===null)return!0;l=Xt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=fc(n.stateNode,l,e),Vo(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(sl===null||!sl.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tm(a),nm(a,e,n,l),Vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var hc=Error(c(461)),it=!1;function ot(e,t,n,l){t.child=e===null?sh(t,null,n,l):Dl(t,e.child,n,l)}function lm(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var f={};for(var m in l)m!=="ref"&&(f[m]=l[m])}else f=l;return zl(t),l=Io(e,t,n,f,s,a),m=Po(),e!==null&&!it?(Fo(e,t,a),Dn(e,t,a)):(Te&&m&&vs(t),t.flags|=1,ot(e,t,l,a),t.child)}function am(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!Co(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,im(e,t,s,l,a)):(e=bs(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Nc(e,a)){var f=s.memoizedProps;if(n=n.compare,n=n!==null?n:li,n(f,l)&&e.ref===t.ref)return Dn(e,t,a)}return t.flags|=1,e=En(s,l),e.ref=t.ref,e.return=t,t.child=e}function im(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(li(s,l)&&e.ref===t.ref)if(it=!1,t.pendingProps=l=s,Nc(e,a))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,Dn(e,t,a)}return mc(e,t,n,l,a)}function sm(e,t,n,l){var a=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~s}else l=0,t.child=null;return rm(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_s(t,s!==null?s.cachePool:null),s!==null?ch(t,s):Qo(),uh(t);else return l=t.lanes=536870912,rm(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(_s(t,s.cachePool),ch(t,s),tl(),t.memoizedState=null):(e!==null&&_s(t,null),Qo(),tl());return ot(e,t,a,n),t.child}function bi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rm(e,t,n,l,a){var s=Lo();return s=s===null?null:{parent:lt._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&_s(t,null),Qo(),uh(t),e!==null&&El(e,t,l,!0),t.childLanes=a,null}function Vs(e,t){return t=Ys({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function om(e,t,n){return Dl(t,e.child,null,n),e=Vs(t,t.pendingProps),e.flags|=2,Ut(t),t.memoizedState=null,e}function jy(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(l.mode==="hidden")return e=Vs(t,l),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},bi(null,e);if(Ko(t),(e=Ie)?(e=Rp(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:cn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},n=Xf(e),n.return=t,t.child=n,dt=t,Ie=null)):e=null,e===null)throw Zn(t);return t.lanes=536870912,null}return Vs(t,l)}var s=e.memoizedState;if(s!==null){var f=s.dehydrated;if(Ko(t),a)if(t.flags&256)t.flags&=-257,t=om(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(it||El(e,t,n,!1),a=(n&e.childLanes)!==0,it||a){if(Wn.current===null){if(l=Je,l!==null&&(f=Zd(l,n),f!==0&&f!==s.retryLane))throw s.retryLane=f,_l(e,f),Mt(l,e,f),hc;or()}t=om(e,t,n)}else e=s.treeContext,Ie=Pt(f.nextSibling),dt=t,Te=!0,Kn=null,Jt=!1,e!==null&&Jf(t,e),t=Vs(t,l),t.flags|=134221824;return t}return e=En(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ba(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mc(e,t,n,l,a){return zl(t),n=Io(e,t,n,l,void 0,a),l=Po(),e!==null&&!it?(Fo(e,t,a),Dn(e,t,a)):(Te&&l&&vs(t),t.flags|=1,ot(e,t,n,a),t.child)}function cm(e,t,n,l,a,s){return zl(t),t.updateQueue=null,n=fh(t,l,n,a),dh(e),l=Po(),e!==null&&!it?(Fo(e,t,s),Dn(e,t,s)):(Te&&l&&vs(t),t.flags|=1,ot(e,t,n,s),t.child)}function um(e,t,n,l,a){if(zl(t),t.stateNode===null){var s=oa,f=n.contextType;typeof f=="object"&&f!==null&&(s=pt(f)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=dc,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},Ho(t),f=n.contextType,s.context=typeof f=="object"&&f!==null?pt(f):oa,s.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(uc(t,n,f,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(f=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),f!==s.state&&dc.enqueueReplaceState(s,s.state,null),hi(t,l,s,a),fi(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var m=t.memoizedProps,y=Ul(n,m);s.props=y;var A=s.context,k=n.contextType;f=oa,typeof k=="object"&&k!==null&&(f=pt(k));var H=n.getDerivedStateFromProps;k=typeof H=="function"||typeof s.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,k||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m||A!==f)&&Ph(t,s,l,f),Pn=!1;var j=t.memoizedState;s.state=j,hi(t,l,s,a),fi(),A=t.memoizedState,m||j!==A||Pn?(typeof H=="function"&&(uc(t,n,H,l),A=t.memoizedState),(y=Pn||Ih(t,n,y,l,j,A,f))?(k||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=A),s.props=l,s.state=A,s.context=f,l=y):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,Go(e,t),f=t.memoizedProps,k=Ul(n,f),s.props=k,H=t.pendingProps,j=s.context,A=n.contextType,y=oa,typeof A=="object"&&A!==null&&(y=pt(A)),m=n.getDerivedStateFromProps,(A=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==H||j!==y)&&Ph(t,s,l,y),Pn=!1,j=t.memoizedState,s.state=j,hi(t,l,s,a),fi();var O=t.memoizedState;f!==H||j!==O||Pn||e!==null&&e.dependencies!==null&&Ss(e.dependencies)?(typeof m=="function"&&(uc(t,n,m,l),O=t.memoizedState),(k=Pn||Ih(t,n,k,l,j,O,y)||e!==null&&e.dependencies!==null&&Ss(e.dependencies))?(A||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,O,y),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,O,y)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=O),s.props=l,s.state=O,s.context=y,l=k):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,ba(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=Dl(t,e.child,null,a),t.child=Dl(t,null,n,a)):ot(e,t,n,a),t.memoizedState=s.state,e=t.child):e=Dn(e,t,a),e}function dm(e,t,n,l){return Tl(),t.flags|=256,ot(e,t,n,l),t.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:eh()}}function xc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ht),e}function fm(e,t,n){var l=t.pendingProps,a=!1,s=(t.flags&128)!==0,f;if((f=s)||(f=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),f&&(a=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(a?el(t):tl(),(e=Ie)?(e=Rp(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:cn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},n=Xf(e),n.return=t,t.child=n,dt=t,Ie=null)):e=null,e===null)throw Zn(t);return gu(e)?t.lanes=32:t.lanes=536870912,null}return s=l.children,l=l.fallback,a?(tl(),a=t.mode,s=Ys({mode:"hidden",children:s},a),l=Al(l,a,n,null),s.return=t,l.return=t,s.sibling=l,t.child=s,l=t.child,l.memoizedState=gc(n),l.childLanes=xc(e,f,n),t.memoizedState=pc,bi(null,l)):(el(t),bc(t,s))}var m=e.memoizedState;if(m!==null){var y=m.dehydrated;if(y!==null)return _y(e,t,s,f,l,y,m,n)}return a?(tl(),a=l.fallback,s=t.mode,m=e.child,y=m.sibling,l=En(m,{mode:"hidden",children:l.children}),l.subtreeFlags=m.subtreeFlags&1206910976,y!==null?a=En(y,a):(a=Al(a,s,n,null),a.flags|=2),a.return=t,l.return=t,l.sibling=a,t.child=l,bi(null,l),l=t.child,a=e.child.memoizedState,a===null?a=gc(n):(s=a.cachePool,s!==null?(m=lt._currentValue,s=s.parent!==m?{parent:m,pool:m}:s):s=eh(),a={baseLanes:a.baseLanes|n,cachePool:s}),l.memoizedState=a,l.childLanes=xc(e,f,n),t.memoizedState=pc,bi(e.child,l)):(el(t),n=e.child,e=n.sibling,n=En(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=Ys({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ys(e,t){return e=Tt(22,e,null,t),e.lanes=0,e}function Qs(e,t,n){return Dl(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _y(e,t,n,l,a,s,f,m){if(n)return t.flags&256?(el(t),t.flags&=-257,Qs(e,t,m)):t.memoizedState!==null?(tl(),t.child=e.child,t.flags|=128,null):(tl(),s=a.fallback,f=t.mode,a=Ys({mode:"visible",children:a.children},f),s=Al(s,f,m,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,Dl(t,e.child,null,m),a=t.child,a.memoizedState=gc(m),a.childLanes=xc(e,l,m),t.memoizedState=pc,bi(null,a));if(el(t),gu(s)){if(l=s.nextSibling&&s.nextSibling.dataset,l)var y=l.dgst;return l=y,l!==""&&(a=Error(c(419)),a.stack="",a.digest=l,si({value:a,source:null,stack:null})),Qs(e,t,m)}if(it||El(e,t,m,!1),l=(m&e.childLanes)!==0,it||l){if(Wn.current!==null)return Qs(e,t,m);if(l=Je,l!==null&&(a=Zd(l,m),a!==0&&a!==f.retryLane))throw f.retryLane=a,_l(e,a),Mt(l,e,a),hc;return pu(s)||or(),Qs(e,t,m)}return pu(s)?(t.flags|=192,t.child=e.child,null):(e=f.treeContext,Ie=Pt(s.nextSibling),dt=t,Te=!0,Kn=null,Jt=!1,e!==null&&Jf(t,e),t=bc(t,a.children),t.flags|=134221824,t)}function hm(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ws(e.return,t,n)}function mm(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ms(n)===null&&(t=e),e=e.sibling}return t}function Xs(e,t,n,l,a,s){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:s}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=n,f.tailMode=a,f.treeForkCount=s)}function yc(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function vc(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var f=xt.current;if(t.flags&128)return mi(t,f),null;var m=(f&2)!==0;if(m?(f=f&1|2,t.flags|=128):f&=1,mi(t,f),a==="backwards"&&e!==null?(yc(e),ot(e,t,l,n),yc(e)):ot(e,t,l,n),l=Te?ii:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hm(e,n,t);else if(e.tag===19)hm(e,n,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(a){case"backwards":n=mm(t.child),n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null,yc(t)),Xs(t,!0,a,null,s,l);break;case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ms(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Xs(t,!0,n,null,s,l);break;case"together":Xs(t,!1,null,null,void 0,l);break;case"independent":t.memoizedState=null;break;default:n=mm(t.child),n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Xs(t,!1,a,n,s,l)}return t.child}function pm(e,t,n){var l=t.pendingProps;return Jn(t,t.type,l.value),ot(e,t,l.children,n),t.child}function Dn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),il|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(El(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=En(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=En(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ss(e)))}function Ay(e,t,n){switch(t.tag){case 3:Pi(t,t.stateNode.containerInfo),Jn(t,lt,e.memoizedState.cache),Tl();break;case 27:case 5:Zr(t);break;case 4:Pi(t,t.stateNode.containerInfo);break;case 10:Jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ko(t),null;break;case 13:var l=t.memoizedState;if(l!==null){if(l.dehydrated!==null)return el(t),t.flags|=128,null;l=El(e,t,n,!1);var a=t.child.childLanes;return l||(n&a)!==0?fm(e,t,n):(el(t),e=Dn(e,t,n),e!==null?e.sibling:null)}el(t);break;case 19:if(t.flags&128)return vc(e,t,n);if(a=(e.flags&128)!==0,l=(n&t.childLanes)!==0,l||(El(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return vc(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),mi(t,xt.current),l)break;return null;case 22:return t.lanes=0,sm(e,t,n,t.pendingProps);case 24:Jn(t,lt,e.memoizedState.cache)}return Dn(e,t,n)}function gm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!Nc(e,n)&&(t.flags&128)===0)return it=!1,Ay(e,t,n);it=(e.flags&131072)!==0}else it=!1,Te&&(t.flags&1048576)!==0&&Zf(t,ii,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=kl(t.elementType),t.type=e,typeof e=="function")Co(e)?(l=Ul(e,l),t.tag=1,t=um(null,t,e,l,n)):(t.tag=0,t=mc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===T){t.tag=11,t=lm(null,t,e,l,n);break e}else if(a===se){t.tag=14,t=am(null,t,e,l,n);break e}else if(a===pe){t.tag=10,t.type=e,t=pm(null,t,n);break e}}throw t=fe(e)||e,Error(c(306,t,""))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=Ul(l,t.pendingProps),um(e,t,l,a,n);case 3:e:{if(Pi(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var s=t.memoizedState;a=s.element,Go(e,t),hi(t,l,null,n);var f=t.memoizedState;if(l=f.cache,Jn(t,lt,l),l!==s.cache&&Do(t,[lt],n,!0),fi(),l=f.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=dm(e,t,l,n);break e}else if(l!==a){a=Xt(Error(c(424)),t),si(a),t=dm(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=Pt(e.firstChild),dt=t,Te=!0,Kn=null,Jt=!0,n=sh(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Tl(),l===a){t=Dn(e,t,n);break e}ot(e,t,l,n)}t=t.child}return t;case 26:return ba(e,t),e===null?(n=Gp(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(t.stateNode=vp(t.type,t.pendingProps,Hn.current,t)):t.memoizedState=Gp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zr(t),e===null&&Te&&(l=t.stateNode=Up(t.type,t.pendingProps,Hn.current),dt=t,Jt=!0,a=Ie,cl(t.type)?(xu=a,Ie=Pt(l.firstChild)):Ie=a),ot(e,t,t.pendingProps.children,n),ba(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((a=l=Ie)&&(l=v1(l,t.type,t.pendingProps,Jt),l!==null?(t.stateNode=l,dt=t,Ie=Pt(l.firstChild),Jt=!1,a=!0):a=!1),a||Zn(t)),Zr(t),a=t.type,s=t.pendingProps,f=e!==null?e.memoizedProps:null,l=s.children,ou(a,s)?l=null:f!==null&&ou(a,f)&&(t.flags|=32),t.memoizedState!==null&&(a=Io(e,t,py,null,null,n),Ba._currentValue=a),ba(e,t),ot(e,t,l,n),t.child;case 6:return e===null&&Te&&((e=n=Ie)&&(n=N1(n,t.pendingProps,Jt),n!==null?(t.stateNode=n,dt=t,Ie=null,e=!0):e=!1),e||Zn(t)),null;case 13:return fm(e,t,n);case 4:return Pi(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Dl(t,null,l,n):ot(e,t,l,n),t.child;case 11:return lm(e,t,t.type,t.pendingProps,n);case 7:return l=t.pendingProps,ba(e,t),ot(e,t,l,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:return pm(e,t,n);case 9:return a=t.type._context,l=t.pendingProps.children,zl(t),a=pt(a),l=l(a),t.flags|=1,ot(e,t,l,n),t.child;case 14:return am(e,t,t.type,t.pendingProps,n);case 15:return im(e,t,t.type,t.pendingProps,n);case 19:return vc(e,t,n);case 31:return jy(e,t,n);case 22:return sm(e,t,n,t.pendingProps);case 24:return zl(t),l=pt(lt),e===null?(a=Lo(),a===null&&(a=Je,s=Bo(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},Ho(t),Jn(t,lt,a)):((e.lanes&n)!==0&&(Go(e,t),hi(t,null,null,n),fi()),a=e.memoizedState,s=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Jn(t,lt,l)):(l=s.cache,Jn(t,lt,l),l!==a.cache&&Do(t,[lt],n,!0))),ot(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=t.pendingProps,l.name!=null&&l.name!=="auto"?t.flags|=e===null?18882560:18874368:Te&&vs(t),e!==null&&e.memoizedProps.name!==l.name?t.flags|=4194816:ba(e,t),ot(e,t,l.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Bn(e){e.flags|=4}function wc(e,t,n,l,a){var s;if((s=(e.mode&32)!==0)&&(s=n===null?Xp(t,l):Xp(t,l)&&(l.src!==n.src||l.srcSet!==n.srcSet)),s){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw Rl=Ts,qo}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,!Kp(t))if(Fm())e.flags|=8192;else throw Rl=Ts,qo}function Ks(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qd():536870912,e.lanes|=t,Sa|=t)}function yi(e,t){if(!Te)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&1206910976,l|=a.flags&1206910976,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Ty(e,t,n){var l=t.pendingProps;switch(Mo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),On(lt),Il(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(da(t)?Bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ko())),Pe(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(Bn(t),s!==null?(Pe(t),xm(t,s)):(Pe(t),wc(t,a,null,l,n))):s?s!==e.memoizedState?(Bn(t),Pe(t),xm(t,s)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Bn(t),Pe(t),wc(t,a,e,l,n)),null;case 27:if(Fi(t),n=Hn.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Bn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Pe(t),t.subtreeFlags&=-33554433,null}e=Ze.current,da(t)?If(t):(e=Up(a,l,n),t.stateNode=e,Bn(t))}return Pe(t),t.subtreeFlags&=-33554433,null;case 5:if(Fi(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Bn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Pe(t),t.subtreeFlags&=-33554433,null}if(s=Ze.current,da(t))If(t);else{var f=zi(Hn.current);switch(s){case 1:s=f.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=f.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=f.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=f.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=f.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?f.createElement(a,{is:l.is}):f.createElement(a)}}s[mt]=t,s[At]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=s;e:switch(yt(s,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Bn(t)}}return Pe(t),t.subtreeFlags&=-33554433,wc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Bn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=Hn.current,da(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=dt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||gp(e.nodeValue,n)),e||Zn(t,!0)}else e=zi(e).createTextNode(l),e[mt]=t,t.stateNode=e}return Pe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=da(t),n!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[mt]=t}else Tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else n=ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ut(t),t):(Ut(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Pe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=da(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(c(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[mt]=t}else Tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),a=!1}else a=ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ut(t),t):(Ut(t),null)}return Ut(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ks(t,t.updateQueue),Pe(t),null);case 4:return Il(),e===null&&lu(t.stateNode.containerInfo),t.flags|=67108864,Pe(t),null;case 10:return On(t.type),Pe(t),null;case 19:if(Zo(t),l=t.memoizedState,l===null)return Pe(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)yi(l,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Ms(e),s!==null){for(t.flags|=128,yi(l,!1),e=s.updateQueue,t.updateQueue=e,Ks(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Qf(n,e),n=n.sibling;return mi(t,xt.current&1|2),Te&&zn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ot()>ar&&(t.flags|=128,a=!0,yi(l,!1),t.lanes=4194304)}else{if(!a)if(e=Ms(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ks(t,e),yi(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!s.alternate&&!Te)return Pe(t),null}else 2*Ot()-l.renderingStartTime>ar&&n!==536870912&&(t.flags|=128,a=!0,yi(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}if(l.tail!==null){e=l.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ot(),e.sibling=null,s=xt.current,s=a?s&1|2:s&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!n||Te?mi(t,s):(n=s,Be(gt,t),Be(xt,n),Nt===null&&(Nt=t)),Te&&zn(t,l.treeForkCount),e}return Pe(t),null;case 22:case 23:return Ut(t),Xo(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),n=t.updateQueue,n!==null&&Ks(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&ve(Ol),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),On(lt),Pe(t),null;case 25:return null;case 30:return t.flags|=33554432,Pe(t),null}throw Error(c(156,t.tag))}function Cy(e,t){switch(Mo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(lt),Il(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Fi(t),null;case 31:if(t.memoizedState!==null){if(Ut(t),t.alternate===null)throw Error(c(340));Tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ut(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Il(),null;case 10:return On(t.type),null;case 22:case 23:return Ut(t),Xo(),e!==null&&ve(Ol),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return On(lt),null;case 25:return null;default:return null}}function bm(e,t){switch(Mo(t),t.tag){case 3:On(lt),Il();break;case 26:case 27:case 5:Fi(t);break;case 4:Il();break;case 31:t.memoizedState!==null&&Ut(t);break;case 13:Ut(t);break;case 19:Zo(t);break;case 10:On(t.type);break;case 22:case 23:Ut(t),Xo(),e!==null&&ve(Ol);break;case 24:On(lt)}}function vi(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,f=n.inst;l=s(),f.destroy=l}n=n.next}while(n!==a)}}catch(m){Qe(t,t.return,m)}}function nl(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){var f=l.inst,m=f.destroy;if(m!==void 0){f.destroy=void 0,a=t;var y=n,A=m;try{A()}catch(k){Qe(a,y,k)}}}l=l.next}while(l!==s)}}catch(k){Qe(t,t.return,k)}}function ym(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{oh(t,n)}catch(l){Qe(e,e.return,l)}}}function vm(e,t,n){n.props=Ul(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Qe(e,t,l)}}function dn(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:var a=e.stateNode,s=Tn(e.memoizedProps,a);(a.ref===null||a.ref.name!==s)&&(a.ref=Tp(s)),l=a.ref;break;case 7:if(e.stateNode===null){var f=new Vt(e);x(e.child,!1,b1,f,void 0,void 0),e.stateNode=f}l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(m){Qe(e,t,m)}}function bt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Qe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Qe(e,t,a)}else n.current=null}function Zs(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)kp(e.stateNode,t[n])}function Nm(e){for(var t=e.return;t!==null&&(jc(t)&&kp(e.stateNode,t.stateNode),!Sc(t));)t=t.return}function Ni(e){for(var t=e.return;t!==null&&(jc(t)&&y1(e.stateNode,t.stateNode),!Sc(t));)t=t.return}function Sc(e){return e.tag===5||e.tag===3||e.tag===27}function jc(e){return e&&e.tag===7&&e.stateNode!==null}function _c(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Qe(e,e.return,a)}}function Ac(e,t,n){try{var l=e.stateNode;e1(l,e.type,n,t),l[At]=t}catch(a){Qe(e,e.return,a)}}function wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cl(e.type)||e.tag===4}function Tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wm(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&&cl(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 Cc(e,t,n,l){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(a,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(a),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on)),Zs(e,l),qe=!0;else if(a!==4&&(a===27&&(Zs(e,l),l=null,cl(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Cc(e,t,n,l),e=e.sibling;e!==null;)Cc(e,t,n,l),e=e.sibling}function Js(e,t,n,l){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?n.insertBefore(a,t):n.appendChild(a),Zs(e,l),qe=!0;else if(a!==4&&(a===27&&(Zs(e,l),l=null,cl(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Js(e,t,n,l),e=e.sibling;e!==null;)Js(e,t,n,l),e=e.sibling}function Sm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);yt(t,l,n),t[mt]=e,t[At]=n}catch(s){Qe(e,e.return,s)}}var Is=!1,Lt=null;function jm(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Is=!0)}var fn=null;function _m(){var e=fn;return fn=null,e}var Ct=0;function ya(e,t,n,l,a){return Ct=0,Am(e.child,t,n,l,a)}function Am(e,t,n,l,a){for(var s=!1;e!==null;){if(e.tag===5){var f=e.stateNode;if(l!==null){var m=du(f);l.push(m),m.view&&(s=!0)}else s||du(f).view&&(s=!0);Is=!0,_p(f,Ct===0?t:t+"_"+Ct,n),Ct++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&a||Am(e.child,t,n,l,a)&&(s=!0));e=e.sibling}return s}function hn(e,t){for(;e!==null;)e.tag===5?Ap(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||hn(e.child,t)),e=e.sibling}function Ps(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ps(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(c(544));var n=t.name;t=Cn(t.default,t.share),t!=="none"&&(ya(e,n,t,null,!1)||hn(e.child,!1))}e=e.sibling}}function Ec(e,t){if(e.tag===30){var n=e.stateNode,l=e.memoizedProps,a=Tn(l,n),s=Cn(l.default,n.paired?l.share:l.enter);s!=="none"?ya(e,a,s,null,!1)?(Ps(e),n.paired||t||Ta(e,l.onEnter)):hn(e.child,!1):Ps(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ec(e,t),e=e.sibling;else Ps(e)}function zc(e){if(Lt!==null&&Lt.size!==0){var t=Lt;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,l=n.name;if(l!=null&&l!=="auto"){var a=t.get(l);if(a!==void 0){var s=Cn(n.default,n.share);if(s!=="none"&&(ya(e,l,s,null,!1)?(s=e.stateNode,a.paired=s,s.paired=a,Ta(e,n.onShare)):hn(e.child,!1)),t.delete(l),t.size===0)break}}}zc(e)}e=e.sibling}}}function Mc(e){if(e.tag===30){var t=e.memoizedProps,n=Tn(t,e.stateNode),l=Lt!==null?Lt.get(n):void 0,a=Cn(t.default,l!==void 0?t.share:t.exit);a!=="none"&&(ya(e,n,a,null,!1)?l!==void 0?(a=e.stateNode,l.paired=a,a.paired=l,Lt.delete(n),Ta(e,t.onShare)):Ta(e,t.onExit):hn(e.child,!1)),Lt!==null&&zc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Mc(e),e=e.sibling;else Lt!==null&&zc(e)}function Tm(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Tn(t,e.stateNode);t=Cn(t.default,t.update),e.flags&=-5,t!=="none"&&ya(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Tm(e);e=e.sibling}}function Oc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,hn(e.child,!1))}Oc(e)}e=e.sibling}}function Fs(e){if(e.tag===30)e.stateNode.paired=null,hn(e.child,!1),Oc(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Fs(e),e=e.sibling;else Oc(e)}function Cm(e){for(e=e.child;e!==null;)e.tag===30?hn(e.child,!1):(e.subtreeFlags&33554432)!==0&&Cm(e),e=e.sibling}function kc(e,t,n,l,a,s,f){for(var m=!1;t!==null;){if(t.tag===5){var y=t.stateNode;if(s!==null&&Ct<s.length){var A=s[Ct],k=du(y);(A.view||k.view)&&(m=!0);var H;if(H=(e.flags&4)===0)if(k.clip)H=!0;else{H=A.rect;var j=k.rect;H=H.y!==j.y||H.x!==j.x||H.height!==j.height||H.width!==j.width}H&&(e.flags|=4),k.abs?k=!A.abs:(A=A.rect,k=k.rect,k=A.height!==k.height||A.width!==k.width),k&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&_p(y,Ct===0?n:n+"_"+Ct,a),m&&(e.flags&4)!==0||(fn===null&&(fn=[]),fn.push(y,Ct===0?l:l+"_"+Ct,t.memoizedProps)),Ct++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f?e.flags|=t.flags&32:kc(e,t.child,n,l,a,s,f)&&(m=!0));t=t.sibling}return m}function Em(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,l=e.stateNode,a=Tn(n,l),s=Cn(n.default,n.update),f;f=e.memoizedState,e.memoizedState=null,l=e;var m=e.child;Ct=0,a=kc(l,m,a,a,s,f,!1),(e.flags&4)!==0&&a&&Ta(e,n.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Em(e);e=e.sibling}}var ft=!1,Ve=!1,mn=!1,Rc=!1,zm=typeof WeakSet=="function"?WeakSet:Set,ht=null,pn=!1,wi=!1,$s=!1,Dc=!1;function Ey(e,t,n){if(e=e.containerInfo,su=Ua,e=Rf(e),No(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var m=0,y=-1,A=-1,k=0,H=0,j=e,O=null;t:for(;;){for(var ee;j!==l||s!==0&&j.nodeType!==3||(y=m+s),j!==f||a!==0&&j.nodeType!==3||(A=m+a),j.nodeType===3&&(m+=j.nodeValue.length),(ee=j.firstChild)!==null;)O=j,j=ee;for(;;){if(j===e)break t;if(O===l&&++k===s&&(y=m),O===f&&++H===a&&(A=m),(ee=j.nextSibling)!==null)break;j=O,O=j.parentNode}j=ee}l=y===-1||A===-1?null:{start:y,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(ru={focusedElem:e,selectionRange:l},Ua=!1,n=(n&335544064)===n,ht=t,t=n?9270:1024;ht!==null;){if(e=ht,n&&(l=e.deletions,l!==null))for(s=0;s<l.length;s++)n&&Mc(l[s]);if(e.alternate===null&&(e.flags&2)!==0)n&&jm(e),Ws(n);else{if(e.tag===22){if(l=e.alternate,e.memoizedState!==null){l!==null&&l.memoizedState===null&&n&&Mc(l),Ws(n);continue}else if(l!==null&&l.memoizedState!==null){n&&jm(e),Ws(n);continue}}l=e.child,(e.subtreeFlags&t)!==0&&l!==null?(l.return=e,ht=l):(n&&Tm(e),Ws(n))}}Lt=null}function Ws(e){for(;ht!==null;){var t=ht,n=e,l=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((a&1024)!==0&&l!==null){n=void 0,a=l.memoizedProps,l=l.memoizedState;var s=t.stateNode;try{var f=Ul(t.type,a);n=s.getSnapshotBeforeUpdate(f,l),s.__reactInternalSnapshotBeforeUpdate=n}catch(m){Qe(t,t.return,m)}}break;case 3:if((a&1024)!==0){if(l=t.stateNode.containerInfo,n=l.nodeType,n===9)mu(l);else if(n===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":mu(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&l!==null&&(n=Tn(l.memoizedProps,l.stateNode),a=t.memoizedProps,a=Cn(a.default,a.update),a!=="none"&&ya(l,n,a,l.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(c(163))}if(l=t.sibling,l!==null){l.return=t.return,ht=l;break}ht=t.return}}function Mm(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:gn(e,n),l&4&&vi(5,n);break;case 1:if(gn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(f){Qe(n,n.return,f)}else{var a=Ul(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Qe(n,n.return,f)}}l&64&&ym(n),l&512&&dn(n,n.return);break;case 3:if(gn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{oh(e,t)}catch(f){Qe(n,n.return,f)}}break;case 27:t===null&&l&4&&Sm(n);case 26:case 5:gn(e,n),t===null&&l&4&&_c(n),l&512&&dn(n,n.return);break;case 12:gn(e,n);break;case 31:gn(e,n),l&4&&Dm(e,n);break;case 13:gn(e,n),l&4&&Bm(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Gy.bind(null,n),w1(e,n))));break;case 22:if(l=n.memoizedState!==null||ft,!l){var s=t!==null&&t.memoizedState!==null||Ve;t=ft,a=Ve,ft=l,(Ve=s)&&!a?(l=2,(n.subtreeFlags&8772)!==0&&(l|=1),nn(e,n,l)):gn(e,n),ft=t,Ve=a}break;case 30:gn(e,n),l&512&&dn(n,n.return);break;case 7:l&512&&dn(n,n.return);default:gn(e,n)}}function Bc(e,t){for(e=e.child;e!==null;)Om(e,t),e=e.sibling}function Om(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var l=n.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var a=e.stateNode,s=e.memoizedProps.style,f=s!=null&&s.hasOwnProperty("display")?s.display:null;a.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(y){Qe(e,e.return,y)}Uc(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,qe=!0}catch(y){Qe(e,e.return,y)}break;case 18:try{var m=e.stateNode;t?jp(m,!0):jp(e.stateNode,!1)}catch(y){Qe(e,e.return,y)}break;case 22:case 23:e.memoizedState===null&&Bc(e,t);break;default:Bc(e,t)}}function Uc(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,l=t;switch(n.tag){case 4:Om(n,l);break e;case 22:n.memoizedState===null&&Uc(n,l);break e;default:Uc(n,l)}}e=e.sibling}}function km(e){var t=e.alternate;t!==null&&(e.alternate=null,km(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&as(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 Fe=null,Et=!1;function en(e,t,n){for(n=n.child;n!==null;)Rm(e,t,n),n=n.sibling}function Rm(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Xa,n)}catch{}switch(n.tag){case 26:Ve||bt(n,t),en(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ve&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ve||bt(n,t),Ni(n);var l=Fe,a=Et;cl(n.type)&&(Fe=n.stateNode,Et=!1),en(e,t,n),Lp(n.stateNode,n.type,n.memoizedProps),Fe=l,Et=a;break;case 5:Ve||bt(n,t),Ni(n);case 6:if(n.tag===6&&Ni(n),l=Fe,a=Et,Fe=null,en(e,t,n),Fe=l,Et=a,Fe!==null)if(Et)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(n.stateNode),qe=!0}catch(s){Qe(n,t,s)}else try{Fe.removeChild(n.stateNode),qe=!0}catch(s){Qe(n,t,s)}break;case 18:Fe!==null&&(Et?(e=Fe,Sp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),La(e)):Sp(Fe,n.stateNode));break;case 4:l=Fe,a=Et,Fe=n.stateNode.containerInfo,Et=!0,en(e,t,n),Fe=l,Et=a;break;case 0:case 11:case 14:case 15:nl(2,n,t),Ve||nl(4,n,t),en(e,t,n);break;case 1:Ve||(bt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&vm(n,t,l)),en(e,t,n);break;case 21:en(e,t,n);break;case 22:Ve=(l=Ve)||n.memoizedState!==null,en(e,t,n),Ve=l;break;case 30:bt(n,t),en(e,t,n);break;case 7:Ve||bt(n,t),en(e,t,n);break;default:en(e,t,n)}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{La(e)}catch(n){Qe(t,t.return,n)}}}function Bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{La(e)}catch(n){Qe(t,t.return,n)}}function zy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zm),t;default:throw Error(c(435,e.tag))}}function er(e,t){var n=zy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Vy.bind(null,e,l);l.then(a,a)}})}function jt(e,t,n){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],f=e,m=t,y=m;e:for(;y!==null;){switch(y.tag){case 27:if(cl(y.type)){Fe=y.stateNode,Et=!1;break e}break;case 5:Fe=y.stateNode,Et=!1;break e;case 3:case 4:Fe=y.stateNode.containerInfo,Et=!0;break e}y=y.return}if(Fe===null)throw Error(c(160));Rm(f,m,s),Fe=null,Et=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Um(t,e,n),t=t.sibling}var tn=null;function Um(e,t,n){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(l=e.updateQueue,l=l!==null?l.events:null,l!==null))for(var s=0;s<l.length;s++){var f=l[s];f.ref.impl=f.nextImpl}jt(t,e,n),_t(e),a&4&&(nl(3,e,e.return),vi(3,e),nl(5,e,e.return));break;case 1:jt(t,e,n),_t(e),a&512&&(Ve||l===null||bt(l,l.return)),a&64&&ft&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(s=tn,jt(t,e,n),_t(e),a&512&&(Ve||l===null||bt(l,l.return)),a&4)if(a=l!==null?l.memoizedState:null,n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null)if(ft)e.stateNode=vp(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,a=s.ownerDocument||s;t:switch(t){case"title":l=a.getElementsByTagName("title")[0],(!l||l[Ja]||l[mt]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=a.createElement(t),a.head.insertBefore(l,a.querySelector("head > title"))),yt(l,t,n),l[mt]=e,ut(l),t=l;break e;case"link":if(s=Qp("link","href",a).get(t+(n.href||""))){for(f=0;f<s.length;f++)if(l=s[f],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(f,1);break t}}l=a.createElement(t),yt(l,t,n),a.head.appendChild(l);break;case"meta":if(s=Qp("meta","content",a).get(t+(n.content||""))){for(f=0;f<s.length;f++)if(l=s[f],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(f,1);break t}}l=a.createElement(t),yt(l,t,n),a.head.appendChild(l);break;default:throw Error(c(468,t))}l[mt]=e,ut(l),t=l}e.stateNode=t}else ft||Nu(s,e.type,e.stateNode);else e.stateNode=Yp(s,n,e.memoizedProps);else a!==n?(a===null?(t=l.stateNode,t===null||Ve||t.parentNode.removeChild(t)):a.count--,n===null?ft||Nu(s,e.type,e.stateNode):Yp(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Ac(e,e.memoizedProps,l.memoizedProps);break;case 27:jt(t,e,n),_t(e),a&512&&(Ve||l===null||bt(l,l.return)),l!==null&&a&4&&Ac(e,e.memoizedProps,l.memoizedProps);break;case 5:if(s=mn,mn=!1,jt(t,e,n),mn=s,_t(e),a&512&&(Ve||l===null||bt(l,l.return)),e.flags&32){t=e.stateNode;try{ta(t,""),qe=!0}catch(k){Qe(e,e.return,k)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ac(e,t,l!==null?l.memoizedProps:t)),a&1024&&(Rc=!0);break;case 6:if(jt(t,e,n),_t(e),a&4){if(e.stateNode===null)throw Error(c(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,qe=!0}catch(k){Qe(e,e.return,k)}}break;case 3:if(qe=!1,pr=null,s=tn,tn=Mi(t.containerInfo),jt(t,e,n),tn=s,_t(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{La(t.containerInfo)}catch(k){Qe(e,e.return,k)}Rc&&(Rc=!1,Lm(e)),qe=!1;break;case 4:a=mn,mn=ft,l=lf(),s=tn,tn=Mi(e.stateNode.containerInfo),jt(t,e,n),_t(e),tn=s,qe&&wi&&($s=!0),qe=l,mn=a;break;case 12:jt(t,e,n),_t(e);break;case 31:jt(t,e,n),_t(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,er(e,t)));break;case 13:jt(t,e,n),_t(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(lr=Ot()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,er(e,t)));break;case 22:s=e.memoizedState!==null,f=l!==null&&l.memoizedState!==null;var m=ft,y=Ve,A=mn;ft=m||s,mn=A||s,Ve=y||f,jt(t,e,n),Ve=y,mn=A,ft=m,_t(e),a&8192&&(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,!s||l===null||f||ft||Ve||(t=f||Ve,n=ft,l=Ve,ft=s||ft,Ve=t,ll(e,2),ft=n,Ve=l),!s&&mn||Bc(e,s)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,er(e,n))));break;case 19:jt(t,e,n),_t(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,er(e,t)));break;case 30:a&512&&(Ve||l===null||bt(l,l.return)),a=lf(),s=wi,f=(n&335544064)===n,m=e.memoizedProps,wi=f&&Cn(m.default,m.update)!=="none",jt(t,e,n),_t(e),f&&l!==null&&qe&&(e.flags|=4),wi=s,qe=a;break;case 21:break;case 7:a&512&&(Ve||l===null||bt(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=e);default:jt(t,e,n),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(wm(l)){n=l;break}l=l.return}l=null;for(var a=e.return;a!==null;){if(jc(a)){var s=a.stateNode;l===null?l=[s]:l.push(s)}if(Sc(a))break;a=a.return}var f=l;if(n==null)throw Error(c(160));switch(n.tag){case 27:var m=n.stateNode,y=Tc(e);Js(e,y,m,f);break;case 5:var A=n.stateNode;n.flags&32&&(ta(A,""),n.flags&=-33);var k=Tc(e);Js(e,k,A,f);break;case 3:case 4:var H=n.stateNode.containerInfo,j=Tc(e);Cc(e,j,H,f);break;default:throw Error(c(161))}}catch(O){Qe(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lm(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ua=!0,t.reset(),Ua=!1),e=e.sibling}}function va(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)qm(t,e),t=t.sibling;else Em(t)}function qm(e,t){var n=e.alternate;if(n===null)Ec(e,!1);else switch(e.tag){case 3:if(Dc=pn=!1,_m(),va(t,e),!pn&&!$s){if(e=fn,e!==null)for(var l=0;l<e.length;l+=3){n=e[l];var a=e[l+1];Ap(n,e[l+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+a+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Dc=!0}fn=null;break;case 5:va(t,e);break;case 4:l=pn,pn=!1,va(t,e),pn&&($s=!0),pn=l;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Ec(e,!1):va(t,e));break;case 30:l=pn,a=_m(),pn=!1,va(t,e),pn&&(e.flags|=4);var s=e.memoizedProps,f=e.stateNode;t=Tn(s,f),f=Tn(n.memoizedProps,f);var m=Cn(s.default,s.update);m==="none"?t=!1:(s=n.memoizedState,n.memoizedState=null,n=e.child,Ct=0,t=kc(e,n,t,f,m,s,!0),Ct!==(s===null?0:s.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Ta(e,e.memoizedProps.onUpdate),fn=a):a!==null&&(a.push.apply(a,fn),fn=a),pn=(e.flags&32)!==0?!0:l;break;default:va(t,e)}}function gn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Mm(e,t.alternate,t),t=t.sibling}function ll(e,t){for(e=e.child;e!==null;){var n=e,l=t;switch(n.tag){case 0:case 11:case 14:case 15:nl(4,n,n.return),ll(n,l);break;case 1:bt(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&vm(n,n.return,a),ll(n,l);break;case 27:(l&2)!==0&&Lp(n.stateNode,n.type,n.memoizedProps);case 5:bt(n,n.return),n.tag!==5&&n.tag!==27||Ni(n),ll(n,l);break;case 6:Ni(n);break;case 26:bt(n,n.return),a=n.stateNode,n.memoizedState!==null||a===null||Ve||a.parentNode.removeChild(a),ll(n,l);break;case 22:n.memoizedState===null&&ll(n,l);break;case 30:bt(n,n.return),ll(n,l);break;case 7:bt(n,n.return);default:ll(n,l)}e=e.sibling}}function nn(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var l=t.alternate,a=e,s=t,f=s.flags,m=(n&1)!==0;switch(s.tag){case 0:case 11:case 15:nn(a,s,n),vi(4,s);break;case 1:if(nn(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(k){Qe(l,l.return,k)}if(l=s,a=l.updateQueue,a!==null){var y=l.stateNode;try{var A=a.shared.hiddenCallbacks;if(A!==null)for(a.shared.hiddenCallbacks=null,a=0;a<A.length;a++)rh(A[a],y)}catch(k){Qe(l,l.return,k)}}m&&f&64&&ym(s),dn(s,s.return);break;case 27:(n&2)!==0&&Sm(s);case 5:s.tag!==5&&s.tag!==27||Nm(s),nn(a,s,n),m&&l===null&&f&4&&_c(s),dn(s,s.return);break;case 6:Nm(s);break;case 26:y=s.stateNode,s.memoizedState!==null||y===null||ft||Nu(Mi(y.ownerDocument),s.type,y),nn(a,s,n),m&&l===null&&f&4&&_c(s),dn(s,s.return);break;case 12:nn(a,s,n);break;case 31:nn(a,s,n),m&&f&4&&Dm(a,s);break;case 13:nn(a,s,n),m&&f&4&&Bm(a,s);break;case 22:s.memoizedState===null&&nn(a,s,n),dn(s,s.return);break;case 30:nn(a,s,n),dn(s,s.return);break;case 7:dn(s,s.return);default:nn(a,s,n)}t=t.sibling}}function Lc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ri(n))}function qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ri(e))}function It(e,t,n,l){var a=(n&335544064)===n;if(t.subtreeFlags&(a?10262:10256))for(t=t.child;t!==null;)Hm(e,t,n,l),t=t.sibling;else a&&Cm(t)}function Hm(e,t,n,l){var a=(n&335544064)===n;a&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Fs(t);var s=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,n,l),s&2048&&vi(9,t);break;case 1:It(e,t,n,l);break;case 3:It(e,t,n,l),a&&Dc&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),s&2048&&(s=null,t.alternate!==null&&(s=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==s&&(t.refCount++,s!=null&&ri(s)));break;case 12:if(s&2048){It(e,t,n,l),s=t.stateNode;try{var f=t.memoizedProps,m=f.id,y=f.onPostCommit;typeof y=="function"&&y(m,t.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(A){Qe(t,t.return,A)}}else It(e,t,n,l);break;case 31:It(e,t,n,l);break;case 13:It(e,t,n,l);break;case 23:break;case 22:f=t.stateNode,m=t.alternate,t.memoizedState!==null?(a&&m!==null&&m.memoizedState===null&&Fs(m),f._visibility&2?It(e,t,n,l):Si(e,t)):(a&&m!==null&&m.memoizedState!==null&&Fs(t),f._visibility&2?It(e,t,n,l):(f._visibility|=2,Na(e,t,n,l,(t.subtreeFlags&10256)!==0||!1))),s&2048&&Lc(m,t);break;case 24:It(e,t,n,l),s&2048&&qc(t.alternate,t);break;case 30:a&&(s=t.alternate,s!==null&&(hn(s.child,!0),hn(t.child,!0))),It(e,t,n,l);break;default:It(e,t,n,l)}}function Na(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,f=t,m=n,y=l,A=f.flags;switch(f.tag){case 0:case 11:case 15:Na(s,f,m,y,a),vi(8,f);break;case 23:break;case 22:var k=f.stateNode;f.memoizedState!==null?k._visibility&2?Na(s,f,m,y,a):Si(s,f):(k._visibility|=2,Na(s,f,m,y,a)),a&&A&2048&&Lc(f.alternate,f);break;case 24:Na(s,f,m,y,a),a&&A&2048&&qc(f.alternate,f);break;default:Na(s,f,m,y,a)}t=t.sibling}}function Si(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Si(n,l),a&2048&&Lc(l.alternate,l);break;case 24:Si(n,l),a&2048&&qc(l.alternate,l);break;default:Si(n,l)}t=t.sibling}}var Ll=8192;function ql(e,t,n){if(e.subtreeFlags&Ll)for(e=e.child;e!==null;)Gm(e,t,n),e=e.sibling}function Gm(e,t,n){switch(e.tag){case 26:ql(e,t,n),e.flags&Ll&&(e.memoizedState!==null?B1(n,tn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Jp(n,e)));break;case 5:ql(e,t,n),e.flags&Ll&&(e=e.stateNode,(t&335544128)===t&&Jp(n,e));break;case 3:case 4:var l=tn;tn=Mi(e.stateNode.containerInfo),ql(e,t,n),tn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ll,Ll=16777216,ql(e,t,n),Ll=l):ql(e,t,n));break;case 30:if((e.flags&Ll)!==0&&(l=e.memoizedProps.name,l!=null&&l!=="auto")){var a=e.stateNode;a.paired=null,Lt===null&&(Lt=new Map),Lt.set(l,a)}ql(e,t,n);break;default:ql(e,t,n)}}function Vm(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 ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];ht=l,Qm(l,e)}Vm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ym(e),e=e.sibling}function Ym(e){switch(e.tag){case 0:case 11:case 15:ji(e),e.flags&2048&&nl(9,e,e.return);break;case 3:ji(e);break;case 12:ji(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,tr(e)):ji(e);break;default:ji(e)}}function tr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];ht=l,Qm(l,e)}Vm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:nl(8,t,t.return),tr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,tr(t));break;default:tr(t)}e=e.sibling}}function Qm(e,t){for(;ht!==null;){var n=ht;switch(n.tag){case 0:case 11:case 15:nl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ri(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,ht=l;else e:for(n=e;ht!==null;){l=ht;var a=l.sibling,s=l.return;if(km(l),l===n){ht=null;break e}if(a!==null){a.return=s,ht=a;break e}ht=s}}}var My={getCacheForType:function(e){var t=pt(lt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return pt(lt).controller.signal}},Oy=typeof WeakMap=="function"?WeakMap:Map,He=0,Je=null,Ee=null,Oe=0,Ye=0,qt=null,al=!1,wa=!1,Hc=!1,Un=0,et=0,il=0,Hl=0,nr=0,Ht=0,Sa=0,_i=null,zt=null,Gc=!1,lr=0,Xm=0,ar=1/0,ir=null,sl=null,$e=0,ln=null,Gl=null,xn=0,Vc=0,Yc=null,Km=null,ja=null,_a=null,Aa=null,Ai=0,sr=null;function Gt(){return(He&2)!==0&&Oe!==0?Oe&-Oe:oe.T!==null?Wc():Jd()}function Zm(){if(Ht===0)if((Oe&536870912)===0||Te){var e=es;es<<=1,(es&3932160)===0&&(es=262144),Ht=e}else Ht=536870912;return e=gt.current,e!==null&&(e.flags|=32),Ht}function Ta(e,t){if(t!=null){var n=e.stateNode,l=n.ref;l===null&&(l=n.ref=Tp(Tn(e.memoizedProps,n))),_a===null&&(_a=[]),_a.push(t.bind(null,l))}}function Mt(e,t,n){(e===Je&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(Ca(e,0),rl(e,Oe,Ht,!1)),Za(e,n),((He&2)===0||e!==Je)&&(e===Je&&((He&2)===0&&(Hl|=n),et===4&&rl(e,Oe,Ht,!1)),bn(e))}function Jm(e,t,n){if((He&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ka(e,t),a=l?Dy(e,t):Xc(e,t,!0),s=l;do{if(a===0){wa&&!l&&rl(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!ky(n)){a=Xc(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var m=e;a=_i;var y=m.current.memoizedState.isDehydrated;if(y&&(Ca(m,f).flags|=256),f=Xc(m,f,!1),f!==2&&f!==6){if(Hc&&!y){m.errorRecoveryDisabledLanes|=s,Hl|=s,a=4;break e}s=zt,zt=a,s!==null&&(zt===null?zt=s:zt.push.apply(zt,s))}a=f}if(s=!1,a!==2)continue}}if(a===1){Ca(e,0),rl(e,t,0,!0);break}e:{switch(l=e,s=a,s){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:rl(l,t,Ht,!al);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(a=lr+300-Ot(),10<a)){if(rl(l,t,Ht,!al),ns(l,0,!0)!==0)break e;xn=t,l.timeoutHandle=uu(Im.bind(null,l,n,zt,ir,Gc,t,Ht,Hl,Sa,al,s,"Throttled",-0,0),a);break e}Im(l,n,zt,ir,Gc,t,Ht,Hl,Sa,al,s,null,-0,0)}}break}while(!0);bn(e)}function Im(e,t,n,l,a,s,f,m,y,A,k,H,j,O){e.timeoutHandle=-1;var ee=t.subtreeFlags,he=(s&335544064)===s;if(H=null,(he||ee&8192||(ee&16785408)===16785408)&&(H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:on},Lt=null,Gm(t,s,H),he&&(ee=H,he=e.containerInfo,he=(he.nodeType===9?he:he.ownerDocument).__reactViewTransition,he!=null&&(ee.count++,ee.waitingForViewTransition=!0,ee=Ri.bind(ee),he.finished.then(ee,ee))),ee=(s&62914560)===s?lr-Ot():(s&4194048)===s?Xm-Ot():0,ee=U1(H,ee),ee!==null)){xn=s,e.cancelPendingCommit=ee(lp.bind(null,e,t,s,n,l,a,f,m,y,A,k,H,null,j,O)),rl(e,s,f,!A);return}lp(e,t,s,n,l,a,f,m,y,A,k,H)}function ky(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],s=a.getSnapshot;a=a.value;try{if(!Bt(s(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 rl(e,t,n,l){t=Yd(e,t),t&=~nr,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-Rt(a),f=1<<s;l[s]=-1,a&=~f}n!==0&&Xd(e,n,t)}function rr(){return(He&6)===0?(Ti(0),!1):!0}function Qc(){if(Ee!==null){if(Ye===0)var e=Ee.return;else e=Ee,Mn=Cl=null,$o(e),ma=null,ui=0,e=Ee;for(;e!==null;)bm(e.alternate,e),e=e.return;Ee=null}}function Ca(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,l1(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xn=0,Qc(),Je=e,Ee=n=En(e.current,null),Oe=t,Ye=0,qt=null,al=!1,wa=Ka(e,t),Hc=!1,Sa=Ht=nr=Hl=il=et=0,zt=_i=null,Gc=!1,Un=Yd(e,t),ps(),n}function Pm(e,t){_e=null,oe.H=Hs,t===ha||t===As?(t=lh(),Ye=3):t===qo?(t=lh(),Ye=4):Ye=t===hc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,Ee===null&&(et=1,Gs(e,Xt(t,e.current)))}function Fm(){var e=gt.current;return e===null?!0:(Oe&4194048)===Oe?Nt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===Nt:!1}function $m(){var e=oe.H;return oe.H=Hs,e===null?Hs:e}function Wm(){var e=oe.A;return oe.A=My,e}function or(){et=4,al||(Oe&4194048)!==Oe&&gt.current!==null||(wa=!0),(il&134217727)===0&&(Hl&134217727)===0||Je===null||rl(Je,Oe,Ht,!1)}function Xc(e,t,n){var l=He;He|=2;var a=$m(),s=Wm();(Je!==e||Oe!==t)&&(ir=null,Ca(e,t)),t=!1;var f=et;e:do try{if(Ye!==0&&Ee!==null){var m=Ee,y=qt;switch(Ye){case 8:Qc(),f=6;break e;case 3:case 2:case 9:case 6:gt.current===null&&(t=!0);var A=Ye;if(Ye=0,qt=null,Ea(e,m,y,A),n&&wa){f=0;break e}break;default:A=Ye,Ye=0,qt=null,Ea(e,m,y,A)}}Ry(),f=et;break}catch(k){Pm(e,k)}while(!0);return t&&e.shellSuspendCounter++,Mn=Cl=null,He=l,oe.H=a,oe.A=s,Ee===null&&(Je=null,Oe=0,ps()),f}function Ry(){for(;Ee!==null;)ep(Ee)}function Dy(e,t){var n=He;He|=2;var l=$m(),a=Wm();Je!==e||Oe!==t?(ir=null,ar=Ot()+500,Ca(e,t)):wa=Ka(e,t);e:do try{if(Ye!==0&&Ee!==null){t=Ee;var s=qt;t:switch(Ye){case 1:Ye=0,qt=null,Ea(e,t,s,1);break;case 2:case 9:if(th(s)){Ye=0,qt=null,tp(t);break}t=function(){Ye!==2&&Ye!==9||Je!==e||(Ye=7),bn(e)},s.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:th(s)?(Ye=0,qt=null,tp(t)):(Ye=0,qt=null,Ea(e,t,s,7));break;case 5:var f=null;switch(Ee.tag){case 26:f=Ee.memoizedState;case 5:case 27:var m=Ee;if(f?Kp(f):m.stateNode.complete){Ye=0,qt=null;var y=m.sibling;if(y!==null)Ee=y;else{var A=m.return;A!==null?(Ee=A,cr(A)):Ee=null}break t}}Ye=0,qt=null,Ea(e,t,s,5);break;case 6:Ye=0,qt=null,Ea(e,t,s,6);break;case 8:Qc(),et=6;break e;default:throw Error(c(462))}}By();break}catch(k){Pm(e,k)}while(!0);return Mn=Cl=null,oe.H=l,oe.A=a,He=n,Ee!==null?0:(Je=null,Oe=0,ps(),et)}function By(){for(;Ee!==null&&!Wb();)ep(Ee)}function ep(e){var t=gm(e.alternate,e,Un);e.memoizedProps=e.pendingProps,t===null?cr(e):Ee=t}function tp(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=cm(n,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=cm(n,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:$o(t);var l=t;l===dt&&(Te?(Ns(l),l.tag===5&&l.stateNode!=null&&(Ie=l.stateNode)):(Ns(l),Te=!0));default:bm(n,t),t=Ee=Qf(t,Un),t=gm(n,t,Un)}e.memoizedProps=e.pendingProps,t===null?cr(e):Ee=t}function Ea(e,t,n,l){Mn=Cl=null,$o(t),ma=null,ui=0;var a=t.return;try{if(Sy(e,a,t,n,Oe)){et=1,Gs(e,Xt(n,e.current)),Ee=null;return}}catch(s){if(a!==null)throw Ee=a,s;et=1,Gs(e,Xt(n,e.current)),Ee=null;return}t.flags&32768?(Te||l===1?e=!0:wa||(Oe&536870912)!==0?e=!1:(al=e=!0,(l===2||l===9||l===3||l===6)&&(l=gt.current,l!==null&&l.tag===13&&(l.flags|=16384))),np(t,e)):cr(t)}function cr(e){var t=e;do{if((t.flags&32768)!==0){np(t,al);return}e=t.return;var n=Ty(t.alternate,t,Un);if(n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);et===0&&(et=5)}function np(e,t){do{var n=Cy(e.alternate,e);if(n!==null){n.flags&=32767,Ee=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=n}while(e!==null);et=6,Ee=null}function lp(e,t,n,l,a,s,f,m,y,A,k,H){e.cancelPendingCommit=null;do ur();while($e!==0);if((He&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));e===Je&&(Ee=Je=null,Oe=0),Gl=t,ln=e,xn=n,Yc=a,Km=l,Uy(e,t,n,f,m,y,H)}}function Uy(e,t,n,l,a,s,f){var m=t.lanes|t.childLanes;if(Vc=m,m|=Ao,c0(e,n,m,l,a,s),_a=null,(n&335544064)===n?(Aa=dy(e),l=10262):(Aa=null,l=10256),(t.subtreeFlags&l)!==0||(t.flags&l)!==0?(e.callbackNode=null,e.callbackPriority=0,Yy($i,function(){return Ic(),null})):(e.callbackNode=null,e.callbackPriority=0),Is=!1,l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=oe.T,oe.T=null,a=be.p,be.p=2,s=He,He|=4;try{Ey(e,t,n)}finally{He=s,be.p=a,oe.T=l}}$e=1,Is?ja=c1(f,e.containerInfo,Aa,Kc,Zc,qy,Jc,Ic,Ly):(Kc(),Zc(),Jc())}function Ly(e){if($e!==0){var t=ln.onRecoverableError;t(e,{componentStack:null})}}function qy(){$e===3&&($e=0,qm(Gl,ln),$e=4)}function Kc(){if($e===1){$e=0;var e=ln,t=Gl,n=xn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=oe.T,oe.T=null;var a=be.p;be.p=2;var s=He;He|=4;try{wi=$s=!1,Um(t,e,n),n=ru;var f=Rf(e.containerInfo),m=n.focusedElem,y=n.selectionRange;if(f!==m&&m&&m.ownerDocument&&kf(m.ownerDocument.documentElement,m)){if(y!==null&&No(m)){var A=y.start,k=y.end;if(k===void 0&&(k=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(k,m.value.length);else{var H=m.ownerDocument||document,j=H&&H.defaultView||window;if(j.getSelection){var O=j.getSelection(),ee=m.textContent.length,he=Math.min(y.start,ee),Ae=y.end===void 0?he:Math.min(y.end,ee);!O.extend&&he>Ae&&(f=Ae,Ae=he,he=f);var _=Of(m,he),w=Of(m,Ae);if(_&&w&&(O.rangeCount!==1||O.anchorNode!==_.node||O.anchorOffset!==_.offset||O.focusNode!==w.node||O.focusOffset!==w.offset)){var z=H.createRange();z.setStart(_.node,_.offset),O.removeAllRanges(),he>Ae?(O.addRange(z),O.extend(w.node,w.offset)):(z.setEnd(w.node,w.offset),O.addRange(z))}}}}for(H=[],O=m;O=O.parentNode;)O.nodeType===1&&H.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<H.length;m++){var q=H[m];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Ua=!!su,ru=su=null}finally{He=s,be.p=a,oe.T=l}}e.current=t,$e=2}}function Zc(){if($e===2){$e=0;var e=ln,t=Gl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=oe.T,oe.T=null;var l=be.p;be.p=2;var a=He;He|=4;try{Mm(e,t.alternate,t)}finally{He=a,be.p=l,oe.T=n}}$e=3}}function Jc(){if($e===4||$e===3){$e=0;var e=ja;ja=null,e0();var t=ln,n=Gl,l=xn,a=Km,s=(l&335544064)===l?10262:10256;if((n.subtreeFlags&s)!==0||(n.flags&s)!==0?$e=5:($e=0,Gl=ln=null,ap(t,t.pendingLanes)),s=t.pendingLanes,s===0&&(sl=null),no(l),n=n.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Xa,n,void 0,(n.current.flags&128)===128)}catch{}if(a!==null){n=oe.T,s=be.p,be.p=2,oe.T=null;try{for(var f=t.onRecoverableError,m=0;m<a.length;m++){var y=a[m];f(y.value,{componentStack:y.stack})}}finally{oe.T=n,be.p=s}}if(a=_a,f=Aa,Aa=null,a!==null&&(_a=null,f===null&&(f=[]),e!==null))for(y=0;y<a.length;y++)n=(0,a[y])(f),n!==void 0&&e.finished.finally(n);(xn&3)!==0&&ur(),bn(t),s=t.pendingLanes,(l&261930)!==0&&(s&42)!==0?t===sr?Ai++:(Ai=0,sr=t):(Ai=0,sr=null),Ti(0)}}function ap(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ri(t)))}function ur(){return ja!==null&&(ja.skipTransition(),ja=null),Kc(),Zc(),Jc(),Ic()}function Ic(){if($e!==5)return!1;var e=ln,t=Vc;Vc=0;var n=no(xn),l=oe.T,a=be.p;try{be.p=32>n?32:n,oe.T=null,n=Yc,Yc=null;var s=ln,f=xn;if($e=0,Gl=ln=null,xn=0,(He&6)!==0)throw Error(c(331));var m=He;if(He|=4,Ym(s.current),Hm(s,s.current,f,n),He=m,Ti(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Xa,s)}catch{}return!0}finally{be.p=a,oe.T=l,ap(e,t)}}function ip(e,t,n){t=Xt(n,t),t=fc(e.stateNode,t,2),e=$n(e,t,2),e!==null&&(Za(e,2),bn(e))}function Qe(e,t,n){if(e.tag===3)ip(e,e,n);else for(;t!==null;){if(t.tag===3){ip(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(sl===null||!sl.has(l))){e=Xt(n,e),n=tm(2),l=$n(t,n,2),l!==null&&(nm(n,l,t,e),Za(l,2),bn(l));break}}t=t.return}}function Pc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Oy;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(Hc=!0,a.add(n),e=Hy.bind(null,e,t,n),t.then(e,e))}function Hy(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Je===e&&(Oe&n)===n&&((et===4||et===3&&(Oe&62914560)===Oe&&300>Ot()-lr)&&(He&2)===0?Ca(e,0):nr|=n,Sa===Oe&&(Sa=0)),bn(e)}function sp(e,t){t===0&&(t=Qd()),e=_l(e,t),e!==null&&(Za(e,t),bn(e))}function Gy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sp(e,n)}function Vy(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),sp(e,n)}function Yy(e,t){return $r(e,t)}var za=null,Ma=null,Fc=!1,dr=!1,$c=!1,ol=0;function bn(e){e!==Ma&&e.next===null&&(Ma===null?za=Ma=e:Ma=Ma.next=e),dr=!0,Fc||(Fc=!0,Xy())}function Ti(e,t){if(!$c&&dr){$c=!0;do for(var n=!1,l=za;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var f=l.suspendedLanes,m=l.pingedLanes;s=(1<<31-Rt(42|e)+1)-1,s&=a&~(f&~m),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,up(l,s))}else s=Oe,s=ns(l,l===Je?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Ka(l,s)||(n=!0,up(l,s));l=l.next}while(n);$c=!1}}function Qy(){rp()}function rp(){dr=Fc=!1;var e=0;ol!==0&&n1()&&(e=ol);for(var t=Ot(),n=null,l=za;l!==null;){var a=l.next,s=op(l,t);s===0?(l.next=null,n===null?za=a:n.next=a,a===null&&(Ma=n)):(n=l,(e!==0||(s&3)!==0)&&(dr=!0)),l=a}$e!==0&&$e!==5||Ti(e),ol!==0&&(ol=0)}function op(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var f=31-Rt(s),m=1<<f,y=a[f];y===-1?((m&n)===0||(m&l)!==0)&&(a[f]=o0(m,t)):y<=t&&(e.expiredLanes|=m),s&=~m}if(t=Je,n=Oe,n=ns(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Wr(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ka(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Wr(l),no(n)){case 2:case 8:n=Gd;break;case 32:n=$i;break;case 268435456:n=Vd;break;default:n=$i}return l=cp.bind(null,e),n=$r(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Wr(l),e.callbackPriority=2,e.callbackNode=null,2}function cp(e,t){if($e!==0&&$e!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ur()&&e.callbackNode!==n)return null;var l=Oe;return l=ns(e,e===Je?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Jm(e,l,t),op(e,Ot()),e.callbackNode!=null&&e.callbackNode===n?cp.bind(null,e):null)}function up(e,t){if(ur())return null;Jm(e,t,!0)}function Xy(){a1(function(){(He&6)!==0?$r(Hd,Qy):rp()})}function Wc(){if(ol===0){var e=Ml;e===0&&(e=Wi,Wi<<=1,(Wi&261888)===0&&(Wi=256)),ol=e}return ol}function dp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rs(e)}function Ky(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=dp((a[At]||null).action),f=l.submitter;f&&(t=(t=f[At]||null)?dp(t.formAction):f.getAttribute("formAction"),t!==null&&(s=t,f=null));var m=new ds("action","action",null,l,a);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ol!==0){var y=new FormData(a,f);rc(n,{pending:!0,data:y,method:a.method,action:s},null,y)}}else typeof s=="function"&&(m.preventDefault(),y=new FormData(a,f),rc(n,{pending:!0,data:y,method:a.method,action:s},s,y))},currentTarget:a}]})}}for(var eu=0;eu<_o.length;eu++){var tu=_o[eu],Zy=tu.toLowerCase(),Jy=tu[0].toUpperCase()+tu.slice(1);Wt(Zy,"on"+Jy)}Wt(Uf,"onAnimationEnd"),Wt(Lf,"onAnimationIteration"),Wt(qf,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(ly,"onTransitionRun"),Wt(ay,"onTransitionStart"),Wt(iy,"onTransitionCancel"),Wt(Hf,"onTransitionEnd"),Wl("onMouseEnter",["mouseout","mouseover"]),Wl("onMouseLeave",["mouseout","mouseover"]),Wl("onPointerEnter",["pointerout","pointerover"]),Wl("onPointerLeave",["pointerout","pointerover"]),wl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wl("onBeforeInput",["compositionend","keypress","textInput","paste"]),wl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),Iy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function fp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var f=l.length-1;0<=f;f--){var m=l[f],y=m.instance,A=m.currentTarget;if(m=m.listener,y!==s&&a.isPropagationStopped())break e;s=m,a.currentTarget=A;try{s(a)}catch(k){ms(k)}a.currentTarget=null,s=y}else for(f=0;f<l.length;f++){if(m=l[f],y=m.instance,A=m.currentTarget,m=m.listener,y!==s&&a.isPropagationStopped())break e;s=m,a.currentTarget=A;try{s(a)}catch(k){ms(k)}a.currentTarget=null,s=y}}}}function ze(e,t){var n=t[Pd];n===void 0&&(n=t[Pd]=new Set);var l=e+"__bubble";n.has(l)||(hp(t,e,2,!1),n.add(l))}function nu(e,t,n){var l=0;t&&(l|=4),hp(n,e,l,t)}var fr="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[fr]){e[fr]=!0,Wd.forEach(function(n){n!=="selectionchange"&&(Iy.has(n)||nu(n,!1,e),nu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fr]||(t[fr]=!0,nu("selectionchange",!1,t))}}function hp(e,t,n,l){switch(ng(t)){case 2:var a=G1;break;case 8:a=V1;break;default:a=Su}n=a.bind(null,t,n,e),a=void 0,!uo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function au(e,t,n,l,a){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var m=l.stateNode.containerInfo;if(m===a)break;if(f===4)for(f=l.return;f!==null;){var y=f.tag;if((y===3||y===4)&&f.stateNode.containerInfo===a)return;f=f.return}for(;m!==null;){if(f=Nl(m),f===null)return;if(y=f.tag,y===5||y===6||y===26||y===27){l=s=f;continue e}m=m.parentNode}}l=l.return}hf(function(){var A=s,k=oo(n),H=[];e:{var j=Gf.get(e);if(j!==void 0){var O=ds,ee=e;switch(e){case"keypress":if(cs(n)===0)break e;case"keydown":case"keyup":O=k0;break;case"focusin":ee="focus",O=po;break;case"focusout":ee="blur",O=po;break;case"beforeblur":case"afterblur":O=po;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=gf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=N0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=L0;break;case Uf:case Lf:case qf:O=j0;break;case Hf:O=H0;break;case"scroll":case"scrollend":O=y0;break;case"wheel":O=V0;break;case"copy":case"cut":case"paste":O=A0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=bf;break;case"submit":O=B0;break;case"toggle":case"beforetoggle":O=Q0}var he=(t&4)!==0,Ae=!he&&(e==="scroll"||e==="scrollend"),_=he?j!==null?j+"Capture":null:j;he=[];for(var w=A,z;w!==null;){var q=w;if(z=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||z===null||_===null||(q=Pa(w,_),q!=null&&he.push(Ei(w,q,z))),Ae)break;w=w.return}0<he.length&&(j=new O(j,ee,null,n,k),H.push({event:j,listeners:he}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",j=e==="mouseout"||e==="pointerout",O&&n!==ro&&(ee=n.relatedTarget||n.fromElement)&&(Nl(ee)||ee[Pl]))break e;(j||O)&&(ee=k.window===k?k:(O=k.ownerDocument)?O.defaultView||O.parentWindow:window,j?(O=n.relatedTarget||n.toElement,j=A,O=O?Nl(O):null,O!==null&&(Ae=h(O),he=O.tag,O!==Ae||he!==5&&he!==27&&he!==6)&&(O=null)):(j=null,O=A),j!==O&&(he=gf,q="onMouseLeave",_="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(he=bf,q="onPointerLeave",_="onPointerEnter",w="pointer"),Ae=j==null?ee:Ia(j),z=O==null?ee:Ia(O),ee=new he(q,w+"leave",j,n,k),ee.target=Ae,ee.relatedTarget=z,q=null,Nl(k)===A&&(he=new he(_,w+"enter",O,n,k),he.target=z,he.relatedTarget=Ae,q=he),Ae=q,he=j&&O?J(j,O,Py):null,j!==null&&mp(H,ee,j,he,!1),O!==null&&Ae!==null&&mp(H,Ae,O,he,!0)))}e:{if(j=A?Ia(A):window,O=j.nodeName&&j.nodeName.toLowerCase(),O==="select"||O==="input"&&j.type==="file")var ce=Af;else if(jf(j))if(Tf)ce=ey;else{ce=$0;var ke=F0}else O=j.nodeName,!O||O.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?A&&so(A.elementType)&&(ce=Af):ce=W0;if(ce&&(ce=ce(e,A))){_f(H,ce,n,k);break e}ke&&ke(e,j,A)}switch(ke=A?Ia(A):window,e){case"focusin":(jf(ke)||ke.contentEditable==="true")&&(ia=ke,wo=A,ai=null);break;case"focusout":ai=wo=ia=null;break;case"mousedown":So=!0;break;case"contextmenu":case"mouseup":case"dragend":So=!1,Df(H,n,k);break;case"selectionchange":if(ny)break;case"keydown":case"keyup":Df(H,n,k)}var ge;if(xo)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else aa?wf(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(yf&&n.locale!=="ko"&&(aa||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&aa&&(ge=mf()):(Yn=k,fo="value"in Yn?Yn.value:Yn.textContent,aa=!0)),ke=hr(A,Ne),0<ke.length&&(Ne=new xf(Ne,e,null,n,k),H.push({event:Ne,listeners:ke}),ge?Ne.data=ge:(ge=Sf(n),ge!==null&&(Ne.data=ge)))),(ge=K0?Z0(e,n):J0(e,n))&&(Ne=hr(A,"onBeforeInput"),0<Ne.length&&(ke=new xf("onBeforeInput","beforeinput",null,n,k),H.push({event:ke,listeners:Ne}),ke.data=ge)),Ky(H,e,A,n,k)}fp(H,t)})}function Ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hr(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=Pa(e,n),a!=null&&l.unshift(Ei(e,a,s)),a=Pa(e,t),a!=null&&l.push(Ei(e,a,s))),e.tag===3)return l;e=e.return}return[]}function Py(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function mp(e,t,n,l,a){for(var s=t._reactName,f=[];n!==null&&n!==l;){var m=n,y=m.alternate,A=m.stateNode;if(m=m.tag,y!==null&&y===l)break;m!==5&&m!==26&&m!==27||A===null||(y=A,a?(A=Pa(n,s),A!=null&&f.unshift(Ei(n,A,y))):a||(A=Pa(n,s),A!=null&&f.push(Ei(n,A,y)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var Fy=/\r\n?/g,$y=/\u0000|\uFFFD/g;function pp(e){return(typeof e=="string"?e:""+e).replace(Fy,`
49
- `).replace($y,"")}function gp(e,t){return t=pp(t),pp(e)===t}function Xe(e,t,n,l,a,s){switch(n){case"children":if(typeof l=="string")t==="body"||t==="textarea"&&l===""||ta(e,l);else if(typeof l=="number"||typeof l=="bigint")t!=="body"&&ta(e,""+l);else return;break;case"className":ss(e,"class",l);break;case"tabIndex":ss(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ss(e,n,l);break;case"style":df(e,l,s);return;case"data":if(t!=="object"){ss(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=rs(l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 s=="function"&&(n==="formAction"?(t!=="input"&&Xe(e,t,"name",a.name,a,null),Xe(e,t,"formEncType",a.formEncType,a,null),Xe(e,t,"formMethod",a.formMethod,a,null),Xe(e,t,"formTarget",a.formTarget,a,null)):(Xe(e,t,"encType",a.encType,a,null),Xe(e,t,"method",a.method,a,null),Xe(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=rs(l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=on);return;case"onScroll":l!=null&&ze("scroll",e);return;case"onScrollEnd":l!=null&&ze("scrollend",e);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(c(60));(s!=null?s.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=rs(l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":ze("beforetoggle",e),ze("toggle",e),is(e,"popover",l);break;case"xlinkActuate":_n(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":_n(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":_n(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":_n(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":_n(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":_n(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":_n(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":_n(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":_n(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":is(e,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=x0.get(n)||n,is(e,n,l);else return}qe=!0}function iu(e,t,n,l,a,s){switch(n){case"style":df(e,l,s);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(c(60));(s!=null?s.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof l=="string")ta(e,l);else if(typeof l=="number"||typeof l=="bigint")ta(e,""+l);else return;break;case"onScroll":l!=null&&ze("scroll",e);return;case"onScrollEnd":l!=null&&ze("scrollend",e);return;case"onClick":l!=null&&(e.onclick=on);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ef.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),s=n.slice(2,a?n.length-7:void 0),t=e[At]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(s,t,a),typeof l=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(s,l,a);break e}qe=!0,n in e?e[n]=l:l===!0?e.setAttribute(n,""):is(e,n,l)}return}qe=!0}function yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var l=!1,a=!1,s;for(s in n)if(n.hasOwnProperty(s)){var f=n[s];if(f!=null)switch(s){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Xe(e,t,s,f,n,null)}}a&&Xe(e,t,"srcSet",n.srcSet,n,null),l&&Xe(e,t,"src",n.src,n,null);return;case"input":ze("invalid",e);var m=s=f=a=null,y=null,A=null;for(l in n)if(n.hasOwnProperty(l)){var k=n[l];if(k!=null)switch(l){case"name":a=k;break;case"type":f=k;break;case"checked":y=k;break;case"defaultChecked":A=k;break;case"value":s=k;break;case"defaultValue":m=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(c(137,t));break;default:Xe(e,t,l,k,n,null)}}rf(e,s,m,y,A,f,a,!1);return;case"select":ze("invalid",e),l=f=s=null;for(a in n)if(n.hasOwnProperty(a)&&(m=n[a],m!=null))switch(a){case"value":s=m;break;case"defaultValue":f=m;break;case"multiple":l=m;default:Xe(e,t,a,m,n,null)}t=s,n=f,e.multiple=!!l,t!=null?ea(e,!!l,t,!1):n!=null&&ea(e,!!l,n,!0);return;case"textarea":ze("invalid",e),s=a=l=null;for(f in n)if(n.hasOwnProperty(f)&&(m=n[f],m!=null))switch(f){case"value":l=m;break;case"defaultValue":a=m;break;case"children":s=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:Xe(e,t,f,m,n,null)}cf(e,l,a,s);return;case"option":for(y in n)if(n.hasOwnProperty(y)&&(l=n[y],l!=null))switch(y){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Xe(e,t,y,l,n,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(l=0;l<Ci.length;l++)ze(Ci[l],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("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(A in n)if(n.hasOwnProperty(A)&&(l=n[A],l!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Xe(e,t,A,l,n,null)}return;default:if(so(t)){for(k in n)n.hasOwnProperty(k)&&(l=n[k],l!==void 0&&iu(e,t,k,l,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null&&Xe(e,t,m,l,n,null))}var Wy={};function e1(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,f=null,m=null,y=null,A=null,k=null;for(O in n){var H=n[O];if(n.hasOwnProperty(O)&&H!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":y=H;default:l.hasOwnProperty(O)||Xe(e,t,O,null,l,H)}}for(var j in l){var O=l[j];if(H=n[j],l.hasOwnProperty(j)&&(O!=null||H!=null))switch(j){case"type":O!==H&&(qe=!0),s=O;break;case"name":O!==H&&(qe=!0),a=O;break;case"checked":O!==H&&(qe=!0),A=O;break;case"defaultChecked":O!==H&&(qe=!0),k=O;break;case"value":O!==H&&(qe=!0),f=O;break;case"defaultValue":O!==H&&(qe=!0),m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:O!==H&&Xe(e,t,j,O,l,H)}}ao(e,f,m,y,A,k,s,a);return;case"select":O=f=m=j=null;for(s in n)if(y=n[s],n.hasOwnProperty(s)&&y!=null)switch(s){case"value":break;case"multiple":O=y;default:l.hasOwnProperty(s)||Xe(e,t,s,null,l,y)}for(a in l)if(s=l[a],y=n[a],l.hasOwnProperty(a)&&(s!=null||y!=null))switch(a){case"value":s!==y&&(qe=!0),j=s;break;case"defaultValue":s!==y&&(qe=!0),m=s;break;case"multiple":s!==y&&(qe=!0),f=s;default:s!==y&&Xe(e,t,a,s,l,y)}t=m,n=f,l=O,j!=null?ea(e,!!n,j,!1):!!l!=!!n&&(t!=null?ea(e,!!n,t,!0):ea(e,!!n,n?[]:"",!1));return;case"textarea":O=j=null;for(m in n)if(a=n[m],n.hasOwnProperty(m)&&a!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Xe(e,t,m,null,l,a)}for(f in l)if(a=l[f],s=n[f],l.hasOwnProperty(f)&&(a!=null||s!=null))switch(f){case"value":a!==s&&(qe=!0),j=a;break;case"defaultValue":a!==s&&(qe=!0),O=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==s&&Xe(e,t,f,a,l,s)}of(e,j,O);return;case"option":for(var ee in n)if(j=n[ee],n.hasOwnProperty(ee)&&j!=null&&!l.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Xe(e,t,ee,null,l,j)}for(y in l)if(j=l[y],O=n[y],l.hasOwnProperty(y)&&j!==O&&(j!=null||O!=null))switch(y){case"selected":j!==O&&(qe=!0),e.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:Xe(e,t,y,j,l,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in n)j=n[he],n.hasOwnProperty(he)&&j!=null&&!l.hasOwnProperty(he)&&Xe(e,t,he,null,l,j);for(A in l)if(j=l[A],O=n[A],l.hasOwnProperty(A)&&j!==O&&(j!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(c(137,t));break;default:Xe(e,t,A,j,l,O)}return;default:if(so(t)){for(var Ae in n)j=n[Ae],n.hasOwnProperty(Ae)&&j!==void 0&&!l.hasOwnProperty(Ae)&&iu(e,t,Ae,void 0,l,j);for(k in l)j=l[k],O=n[k],!l.hasOwnProperty(k)||j===O||j===void 0&&O===void 0||iu(e,t,k,j,l,O);return}}for(var _ in n)j=n[_],n.hasOwnProperty(_)&&j!=null&&!l.hasOwnProperty(_)&&Xe(e,t,_,null,l,j);for(H in l)j=l[H],O=n[H],!l.hasOwnProperty(H)||j===O||j==null&&O==null||Xe(e,t,H,j,l,O)}function xp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,f=a.initiatorType,m=a.duration;if(s&&m&&xp(f)){for(f=0,m=a.responseEnd,l+=1;l<n.length;l++){var y=n[l],A=y.startTime;if(A>m)break;var k=y.transferSize,H=y.initiatorType;k&&xp(H)&&(y=y.responseEnd,f+=k*(y<m?1:(m-A)/(y-A)))}if(--l,t+=8*(s+f)/(a.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 su=null,ru=null;function zi(e){return e.nodeType===9?e:e.ownerDocument}function bp(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 yp(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 vp(e,t,n,l){return n=zi(n).createElement(e),n[mt]=l,n[At]=t,yt(n,e,t),ut(n),n}function ou(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 cu=null;function n1(){var e=window.event;return e&&e.type==="popstate"?e===cu?!1:(cu=e,!0):(cu=null,!1)}var uu=typeof setTimeout=="function"?setTimeout:void 0,l1=typeof clearTimeout=="function"?clearTimeout:void 0,Np=typeof Promise=="function"?Promise:void 0,wp=typeof requestAnimationFrame=="function"?requestAnimationFrame:uu,a1=typeof queueMicrotask=="function"?queueMicrotask:typeof Np<"u"?function(e){return Np.resolve(null).then(e).catch(i1)}:uu;function i1(e){setTimeout(function(){throw e})}function cl(e){return e==="head"}function Sp(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),La(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")bu(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,bu(n);for(var s=n.firstChild;s;){var f=s.nextSibling,m=s.nodeName;s[Ja]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=f}}else n==="body"&&bu(e.ownerDocument.body);n=a}while(n);La(t)}function jp(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function _p(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var l=1;else for(var a=l=0;a<t.length;a++){var s=t[a];0<s.width&&0<s.height&&l++}l===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function Ap(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function s1(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function du(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return s1(t,n,e)}function r1(e){return e.documentElement.clientHeight}function o1(e){this.addEventListener("load",e),this.addEventListener("error",e)}function c1(e,t,n,l,a,s,f,m,y){var A=t.nodeType===9?t:t.ownerDocument;try{var k=A.startViewTransition({update:function(){var j=A.defaultView,O=j.navigation&&j.navigation.transition,ee=A.fonts.status;l();var he=[];if(ee==="loaded"&&(r1(A),A.fonts.status==="loading"&&he.push(A.fonts.ready)),ee=he.length,e!==null)for(var Ae=e.suspenseyImages,_=0,w=0;w<Ae.length;w++){var z=Ae[w];if(!z.complete){var q=z.getBoundingClientRect();if(0<q.bottom&&0<q.right&&q.top<j.innerHeight&&q.left<j.innerWidth){if(_+=Zp(z),_>gr){he.length=ee;break}z=new Promise(o1.bind(z)),he.push(z)}}}if(0<he.length)return j=Promise.race([Promise.all(he),new Promise(function(ce){return setTimeout(ce,500)})]).then(a,a),(O?Promise.allSettled([O.finished,j]):j).then(s,s);if(a(),O)return O.finished.then(s,s);s()},types:n});A.__reactViewTransition=k;var H=[];return k.ready.then(function(){for(var j=A.documentElement.getAnimations({subtree:!0}),O=0;O<j.length;O++){var ee=j[O],he=ee.effect,Ae=he.pseudoElement;if(Ae!=null&&Ae.startsWith("::view-transition")){H.push(ee),ee=he.getKeyframes();for(var _=Ae=void 0,w=!0,z=0;z<ee.length;z++){var q=ee[z],ce=q.width;if(Ae===void 0)Ae=ce;else if(Ae!==ce){w=!1;break}if(ce=q.height,_===void 0)_=ce;else if(_!==ce){w=!1;break}delete q.width,delete q.height,q.transform==="none"&&delete q.transform}w&&Ae!==void 0&&_!==void 0&&(he.setKeyframes(ee),w=getComputedStyle(he.target,he.pseudoElement),w.width!==Ae||w.height!==_)&&(w=ee[0],w.width=Ae,w.height=_,w=ee[ee.length-1],w.width=Ae,w.height=_,he.setKeyframes(ee))}}f()},function(j){A.__reactViewTransition===k&&(A.__reactViewTransition=null);try{if(typeof j=="object"&&j!==null)switch(j.name){case"InvalidStateError":(j.message==="View transition was skipped because document visibility state is hidden."||j.message==="Skipping view transition because document visibility state has become hidden."||j.message==="Skipping view transition because viewport size changed."||j.message==="Transition was aborted because of invalid state")&&(j=null)}j!==null&&y(j)}finally{l(),a(),f()}}),k.finished.finally(function(){for(var j=0;j<H.length;j++)H[j].cancel();A.__reactViewTransition===k&&(A.__reactViewTransition=null),m()}),k}catch{return l(),a(),f(),null}}function Vl(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Vl.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Y({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Vl.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),l=[],a=0;a<n.length;a++){var s=n[a].effect;s!==null&&s.target===e&&s.pseudoElement===t&&l.push(n[a])}return l},Vl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Tp(e){return{name:e,group:new Vl("group",e),imagePair:new Vl("image-pair",e),old:new Vl("old",e),new:new Vl("new",e)}}function Vt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Vt.prototype.addEventListener=function(e,t,n){var l=null,a=null;if(!(n!=null&&typeof n!="boolean"&&(l=n.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var s=this._eventListeners;if(Ep(s,e,t,n)===-1){var f=this,m=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(m=function(y){f.removeEventListener(e,t,n),typeof t=="function"?t.call(this,y):t.handleEvent(y)}),l!==null&&(a=f.removeEventListener.bind(f,e,t,n),l.addEventListener("abort",a,{once:!0}),a=l.removeEventListener.bind(l,"abort",a)),l=Oa(n),s.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:m,cleanup:a}),x(this._fragmentFiber.child,!1,u1,e,m,l)}this._eventListeners=s}};function u1(e,t,n,l){return B(e).addEventListener(t,n,l),!1}Vt.prototype.removeEventListener=function(e,t,n){var l=this._eventListeners;if(l!==null&&(t=Ep(l,e,t,n),t!==-1)){var a=l[t];n=a.attachedListener;var s=a.cleanup;a=Oa(a.optionsOrUseCapture),x(this._fragmentFiber.child,!1,d1,e,n,a),l.splice(t,1),s!==null&&s()}};function d1(e,t,n,l){return B(e).removeEventListener(t,n,l),!1}function Oa(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Cp(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Ep(e,t,n,l){if(e.length===0)return-1;l=Cp(l);for(var a=0;a<e.length;a++){var s=e[a];if(s.type===t&&s.listener===n&&Cp(s.optionsOrUseCapture)===l)return a}return-1}Vt.prototype.dispatchEvent=function(e){var t=C(this._fragmentFiber);if(t===null)return!0;t=B(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var l=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var a=0;a<n.length;a++){var s=n[a];l.addEventListener(s.type,s.attachedListener,Oa(s.optionsOrUseCapture))}if(t.appendChild(l),e=l.dispatchEvent(e),n)for(a=0;a<n.length;a++)s=n[a],l.removeEventListener(s.type,s.attachedListener,Oa(s.optionsOrUseCapture));return t.removeChild(l),e}return t.dispatchEvent(e)},Vt.prototype.focus=function(e){x(this._fragmentFiber.child,!0,zp,e,void 0,void 0)};function zp(e,t){return e.tag===6?!1:(e=B(e),S1(e,t))}Vt.prototype.focusLast=function(e){var t=[];x(this._fragmentFiber.child,!0,fu,t,void 0,void 0);for(var n=t.length-1;0<=n&&!zp(t[n],e);n--);};function fu(e,t){return t.push(e),!1}Vt.prototype.blur=function(){var e=C(this._fragmentFiber);e!==null&&(e=B(e),e=zi(e).activeElement,e!==null&&x(this._fragmentFiber.child,!1,f1,e,void 0,void 0))};function f1(e,t){return e.tag===6?!1:(e=B(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Vt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),x(this._fragmentFiber.child,!1,h1,e,void 0,void 0)};function h1(e,t){return e.tag===6||(e=B(e),t.observe(e)),!1}Vt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),x(this._fragmentFiber.child,!1,m1,e,void 0,void 0);for(var n=t=0;n<an.length;n++){var l=an[n];l.fragmentInstance===this&&l.observer===e?e.unobserve(l.instance):an[t++]=l}an.length=t}};function m1(e,t){return e.tag===6||(e=B(e),t.unobserve(e)),!1}var an=[],hu=!1;function p1(e,t,n){an.push({fragmentInstance:e,observer:t,instance:n}),hu||(hu=!0,j1(function(){hu=!1;var l=an;an=[];for(var a=0;a<l.length;a++){var s=l[a];s.observer.unobserve(s.instance)}}))}Vt.prototype.getClientRects=function(){var e=[];return x(this._fragmentFiber.child,!1,g1,e,void 0,void 0),e};function g1(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=B(e),t.push.apply(t,e.getClientRects());return!1}Vt.prototype.getRootNode=function(e){var t=C(this._fragmentFiber);return t===null?this:B(t).getRootNode(e)},Vt.prototype.compareDocumentPosition=function(e){var t=C(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];x(this._fragmentFiber.child,!1,fu,n,void 0,void 0);var l=B(t);if(n.length===0){if(n=l,U(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var a=l=n.compareDocumentPosition(e);return n===e?a=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=Z(t)[1],n===null?a=Node.DOCUMENT_POSITION_PRECEDING:(e=B(n).compareDocumentPosition(e),a=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=B(n[0]),a=B(n[n.length-1]);var s=U(this._fragmentFiber)?t.parentElement:l;if(s==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=s.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,s=s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var f=t.compareDocumentPosition(e),m=a.compareDocumentPosition(e),y=f&Node.DOCUMENT_POSITION_CONTAINED_BY||m&Node.DOCUMENT_POSITION_CONTAINED_BY;return m=l&&s&&f&Node.DOCUMENT_POSITION_FOLLOWING&&m&Node.DOCUMENT_POSITION_PRECEDING,t=l&&t===e||s&&a===e||y||m?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&t===e||!s&&a===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:f,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||x1(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function x1(e,t,n,l,a){var s=Nl(a);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!s)e:{for(;s!==null;){if(s.tag===7&&(s===t||s.alternate===t)){n=!0;break e}s=s.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(s===null)return s=a.ownerDocument,a===s||a===s.documentElement||a===s.body;e:{for(s=t,t=C(t);s!==null;){if(!(s.tag!==5&&s.tag!==3&&s.tag!==27||s!==t&&s.alternate!==t)){s=!0;break e}s=s.return}s=!1}return s}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!s)&&!(t=s===n)&&(t=J(n,s,me),t===null?t=!1:(x(t,!0,le,s,n),s=G,G=null,t=s!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!s)&&!(t=s===l)&&(t=J(l,s,me),t===null?t=!1:(x(t,!0,W,s,l),s=G,X=G=null,t=s!==null)),t):!1}function Mp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Vt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(c(566));var t=[];x(this._fragmentFiber.child,!1,fu,t,void 0,void 0);var n=e!==!1;if(t.length===0){var l=Z(this._fragmentFiber);if(l=n?l[1]||l[0]||C(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){e=B(l),Mp(e,n);return}if(l=B(l),l.nodeType!==9){if(l.nodeType===11){n="host"in l?l.host:null,n!==null&&n.scrollIntoView(e);return}l.scrollIntoView(e)}}for(l=n?t.length-1:0;l!==(n?-1:t.length);){var a=t[l];a.tag===6?(a=B(a),Mp(a,n)):B(a).scrollIntoView(e),l+=n?-1:1}};function b1(e,t){return e=B(e),Op(e,t),!1}function Op(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function kp(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];e.addEventListener(a.type,a.attachedListener,Oa(a.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(s){for(var f=0,m=0;m<an.length;m++){var y=an[m];(y.fragmentInstance!==t||y.observer!==s||y.instance!==e)&&(an[f++]=y)}an.length=f,s.observe(e)}),Op(e,t))}function y1(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];e.removeEventListener(a.type,a.attachedListener,Oa(a.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(s){typeof s.rootMargin=="string"?p1(t,s,e):s.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function mu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":mu(n),as(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function v1(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ja])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Pt(e.nextSibling),e===null)break}return null}function N1(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pt(e.nextSibling),e===null))return null;return e}function Rp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pt(e.nextSibling),e===null))return null;return e}function pu(e){return e.data==="$?"||e.data==="$~"}function gu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function w1(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Pt(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 xu=null;function Dp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Pt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Bp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function S1(e,t){function n(){l=!0}if(e.ownerDocument.activeElement===e)return!0;var l=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return l}function j1(e){wp(function(){wp(function(t){return e(t)})})}function Up(e,t,n){switch(t=zi(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Lp(e,t,n){for(var l in n){var a=n[l];n.hasOwnProperty(l)&&a!=null&&Xe(e,t,l,null,Wy,a)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===on&&(e.onclick=null),as(e)}function bu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);as(e)}var Ft=new Map,qp=new Set;function Mi(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Ln=be.d;be.d={f:_1,r:A1,D:T1,C:C1,L:E1,m:z1,X:O1,S:M1,M:k1};function _1(){var e=Ln.f(),t=rr();return e||t}function A1(e){var t=Fl(e);t!==null&&t.tag===5&&t.type==="form"?Gh(t):Ln.r(e)}var ka=typeof document>"u"?null:document;function Hp(e,t,n){var l=ka;if(l&&typeof t=="string"&&t){var a=Yt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),qp.has(a)||(qp.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),yt(t,"link",e),ut(t),l.head.appendChild(t)))}}function T1(e){Ln.D(e),Hp("dns-prefetch",e,null)}function C1(e,t){Ln.C(e,t),Hp("preconnect",e,t)}function E1(e,t,n){Ln.L(e,t,n);var l=ka;if(l&&e&&t){var a='link[rel="preload"][as="'+Yt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Yt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Yt(n.imageSizes)+'"]')):a+='[href="'+Yt(e)+'"]';var s=a;switch(t){case"style":s=Ra(e);break;case"script":s=Da(e)}if(!(Ft.has(s)||(e=Y({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ft.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Oi(s))||t==="script"&&l.querySelector(ki(s))))){var f=l.createElement("link");yt(f,"link",e),t==="style"&&(f[ls]=!0,f.onload=f.onerror=function(){$d(f)}),ut(f),l.head.appendChild(f)}}}function z1(e,t){Ln.m(e,t);var n=ka;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Yt(l)+'"][href="'+Yt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Da(e)}if(!Ft.has(s)&&(e=Y({rel:"modulepreload",href:e},t),Ft.set(s,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ki(s)))return}l=n.createElement("link"),yt(l,"link",e),ut(l),n.head.appendChild(l)}}}function M1(e,t,n){Ln.S(e,t,n);var l=ka;if(l&&e){var a=$l(l).hoistableStyles,s=Ra(e);t=t||"default";var f=a.get(s);if(!f){var m={loading:0,preload:null};if(f=l.querySelector(Oi(s)))m.loading=5;else{e=Y({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ft.get(s))&&yu(e,n);var y=f=l.createElement("link");ut(y),yt(y,"link",e),y._p=new Promise(function(A,k){y.onload=A,y.onerror=k}),y.addEventListener("load",function(){m.loading|=1}),y.addEventListener("error",function(){m.loading|=2}),m.loading|=4,mr(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:m},a.set(s,f)}}}function O1(e,t){Ln.X(e,t);var n=ka;if(n&&e){var l=$l(n).hoistableScripts,a=Da(e),s=l.get(a);s||(s=n.querySelector(ki(a)),s||(e=Y({src:e,async:!0},t),(t=Ft.get(a))&&vu(e,t),s=n.createElement("script"),ut(s),yt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function k1(e,t){Ln.M(e,t);var n=ka;if(n&&e){var l=$l(n).hoistableScripts,a=Da(e),s=l.get(a);s||(s=n.querySelector(ki(a)),s||(e=Y({src:e,async:!0,type:"module"},t),(t=Ft.get(a))&&vu(e,t),s=n.createElement("script"),ut(s),yt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Gp(e,t,n,l){var a=(a=Hn.current)?Mi(a):null;if(!a)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Ra(n.href),t=$l(a).hoistableStyles,l=t.get(n),l||(l={type:"style",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ra(n.href);var s=$l(a).hoistableStyles,f=s.get(e);if(f||(a=a.ownerDocument||a,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,f),(s=a.querySelector(Oi(e)))?s._p||(f.instance=s,f.state.loading=5):(s=Ft.get(e),s||(s={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ft.set(e,s)),R1(a,e,s,f.state))),t&&l===null)throw Error(c(528,""));return f}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Da(n),t=$l(a).hoistableScripts,l=t.get(n),l||(l={type:"script",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ra(e){return'href="'+Yt(e)+'"'}function Oi(e){return'link[rel="stylesheet"]['+e+"]"}function Vp(e){return Y({},e,{"data-precedence":e.precedence,precedence:null})}function R1(e,t,n,l){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ls]!==!0){l.loading=1;return}}else t=e.createElement("link"),t[ls]=!0,t.onload=t.onerror=$d.bind(null,t),yt(t,"link",n),ut(t),e.head.appendChild(t);l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2})}function Da(e){return'[src="'+Yt(e)+'"]'}function ki(e){return"script[async]"+e}function Yp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Yt(n.href)+'"]');if(l)return t.instance=l,ut(l),l;var a=Y({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ut(l),yt(l,"style",a),mr(l,n.precedence,e),t.instance=l;case"stylesheet":a=Ra(n.href);var s=e.querySelector(Oi(a));if(s)return t.state.loading|=4,t.instance=s,ut(s),s;l=Vp(n),(a=Ft.get(a))&&yu(l,a),s=(e.ownerDocument||e).createElement("link"),ut(s);var f=s;return f._p=new Promise(function(m,y){f.onload=m,f.onerror=y}),yt(s,"link",l),t.state.loading|=4,mr(s,n.precedence,e),t.instance=s;case"script":return s=Da(n.src),(a=e.querySelector(ki(s)))?(t.instance=a,ut(a),a):(l=n,(a=Ft.get(s))&&(l=Y({},n),vu(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),ut(a),yt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,mr(l,n.precedence,e));return t.instance}function mr(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,s=a,f=0;f<l.length;f++){var m=l[f];if(m.dataset.precedence===t)s=m;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var pr=null;function Qp(e,t,n){if(pr===null){var l=new Map,a=pr=new Map;a.set(n,l)}else a=pr,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[Ja]||s[mt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var f=s.getAttribute(t)||"";f=e+f;var m=l.get(f);m?m.push(s):l.set(f,[s])}}return l}function Nu(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function D1(e,t,n){if(n===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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Xp(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Kp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Zp(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Jp(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Zp(t),e.suspenseyImages.push(t)),e=L1.bind(e),t.decode().then(e,e))}function B1(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Ra(l.href),s=t.querySelector(Oi(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ri.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,ut(s);return}s=t.ownerDocument||t,l=Vp(l),(a=Ft.get(a))&&yu(l,a),s=s.createElement("link"),ut(s);var f=s;f._p=new Promise(function(m,y){f.onload=m,f.onerror=y}),yt(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ri.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var gr=0;function U1(e,t){return e.stylesheets&&e.count===0&&br(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&br(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&gr===0&&(gr=62500*t1());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&br(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>gr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Ip(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)br(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Ri(){this.count--,Ip(this)}function L1(){this.imgCount--,Ip(this)}var xr=null;function br(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xr=new Map,t.forEach(q1,e),xr=null,Ri.call(e))}function q1(e,t){if(!(t.state.loading&4)){var n=xr.get(e);if(n)var l=n.get(null);else{n=new Map,xr.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var f=a[s];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),l=f)}l&&n.set(null,l)}a=t.instance,f=a.getAttribute("data-precedence"),s=n.get(f)||l,s===l&&n.set(null,a),n.set(f,a),this.count++,l=Ri.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ba={$$typeof:pe,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function H1(e,t,n,l,a,s,f,m,y){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=eo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eo(0),this.hiddenUpdates=eo(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.transitionTypes=null,this.incompleteTransitions=new Map}function Pp(e,t,n,l,a,s,f,m,y,A,k,H){return e=new H1(e,t,n,f,y,A,k,H,m),t=1,s===!0&&(t|=24),s=Tt(3,null,null,t),e.current=s,s.stateNode=e,t=Bo(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},Ho(s),e}function Fp(e){return e?(e=oa,e):oa}function $p(e,t,n,l,a,s){a=Fp(a),l.context===null?l.context=a:l.pendingContext=a,l=Fn(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=$n(e,l,t),n!==null&&(Mt(n,e,t),di(n,e,t))}function Wp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function wu(e,t){Wp(e,t),(e=e.alternate)&&Wp(e,t)}function eg(e){if(e.tag===13||e.tag===31){var t=_l(e,67108864);t!==null&&Mt(t,e,67108864),wu(e,67108864)}}function tg(e){if(e.tag===13||e.tag===31){var t=Gt();t=to(t);var n=_l(e,t);n!==null&&Mt(n,e,t),wu(e,t)}}var Ua=!0;function G1(e,t,n,l){var a=oe.T;oe.T=null;var s=be.p;try{be.p=2,Su(e,t,n,l)}finally{be.p=s,oe.T=a}}function V1(e,t,n,l){var a=oe.T;oe.T=null;var s=be.p;try{be.p=8,Su(e,t,n,l)}finally{be.p=s,oe.T=a}}function Su(e,t,n,l){if(Ua){var a=ju(l);if(a===null)au(e,t,l,yr,n),lg(e,l);else if(Q1(a,e,t,n,l))l.stopPropagation();else if(lg(e,l),t&4&&-1<Y1.indexOf(e)){for(;a!==null;){var s=Fl(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var f=vl(s.pendingLanes);if(f!==0){var m=s;for(m.pendingLanes|=2,m.entangledLanes|=2;f;){var y=1<<31-Rt(f);m.entanglements[1]|=y,f&=~y}bn(s),(He&6)===0&&(ar=Ot()+500,Ti(0))}}break;case 31:case 13:m=_l(s,2),m!==null&&Mt(m,s,2),rr(),wu(s,2)}if(s=ju(l),s===null&&au(e,t,l,yr,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else au(e,t,l,null,n)}}function ju(e){return e=oo(e),_u(e)}var yr=null;function _u(e){if(yr=null,e=Nl(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=g(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yr=e,null}function ng(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(t0()){case Hd:return 2;case Gd:return 8;case $i:case n0:return 32;case Vd:return 268435456;default:return 32}default:return 32}}var Au=!1,ul=null,dl=null,fl=null,Di=new Map,Bi=new Map,hl=[],Y1="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 lg(e,t){switch(e){case"focusin":case"focusout":ul=null;break;case"dragenter":case"dragleave":dl=null;break;case"mouseover":case"mouseout":fl=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(t.pointerId)}}function Ui(e,t,n,l,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[a]},t!==null&&(t=Fl(t),t!==null&&eg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Q1(e,t,n,l,a){switch(t){case"focusin":return ul=Ui(ul,e,t,n,l,a),!0;case"dragenter":return dl=Ui(dl,e,t,n,l,a),!0;case"mouseover":return fl=Ui(fl,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Di.set(s,Ui(Di.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,Bi.set(s,Ui(Bi.get(s)||null,e,t,n,l,a)),!0}return!1}function ag(e){var t=Nl(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,Id(e.priority,function(){tg(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,Id(e.priority,function(){tg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ju(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ro=l,n.target.dispatchEvent(l),ro=null}else return t=Fl(n),t!==null&&eg(t),e.blockedOn=n,!1;t.shift()}return!0}function ig(e,t,n){vr(e)&&n.delete(t)}function X1(){Au=!1,ul!==null&&vr(ul)&&(ul=null),dl!==null&&vr(dl)&&(dl=null),fl!==null&&vr(fl)&&(fl=null),Di.forEach(ig),Bi.forEach(ig)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,Au||(Au=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,X1)))}var wr=null;function sg(e){wr!==e&&(wr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){wr===e&&(wr=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(_u(l||n)===null)continue;break}var s=Fl(n);s!==null&&(e.splice(t,3),t-=3,rc(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function La(e){function t(y){return Nr(y,e)}ul!==null&&Nr(ul,e),dl!==null&&Nr(dl,e),fl!==null&&Nr(fl,e),Di.forEach(t),Bi.forEach(t);for(var n=0;n<hl.length;n++){var l=hl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<hl.length&&(n=hl[0],n.blockedOn===null);)ag(n),n.blockedOn===null&&hl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],s=n[l+1],f=a[At]||null;if(typeof s=="function")f||sg(n);else if(f){var m=null;if(s&&s.hasAttribute("formAction")){if(a=s,f=s[At]||null)m=f.formAction;else if(_u(a)!==null)continue}else m=f.action;typeof m=="function"?n[l+1]=m:(n.splice(l,3),l-=3),sg(n)}}}function rg(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(f){return a=f})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Tu(e){this._internalRoot=e}Sr.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=Gt();$p(n,l,e,t,null,null)},Sr.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$p(e.current,2,null,e,null,null),rr(),t[Pl]=null}};function Sr(e){this._internalRoot=e}Sr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hl.length&&t!==0&&t<hl[n].priority;n++);hl.splice(n,0,e),n===0&&ag(e)}};var og=r.version;if(og!=="19.3.0")throw Error(c(527,og,"19.3.0"));be.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=E(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var K1={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:oe,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jr.isDisabled&&jr.supportsFiber)try{Xa=jr.inject(K1),kt=jr}catch{}}return qi.createRoot=function(e,t){if(!d(e))throw Error(c(299));var n=!1,l="",a=Fh,s=$h,f=Wh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Pp(e,1,!1,null,null,n,l,null,a,s,f,rg),e[Pl]=t.current,lu(e),new Tu(t)},qi.hydrateRoot=function(e,t,n){if(!d(e))throw Error(c(299));var l=!1,a="",s=Fh,f=$h,m=Wh,y=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=Pp(e,1,!0,t,n??null,l,a,y,s,f,m,rg),t.context=Fp(null),n=t.current,l=Gt(),l=to(l),a=Fn(l),a.callback=null,$n(n,a,l),n=l,t.current.lanes=n,Za(t,n),bn(t),e[Pl]=t.current,lu(e),new Sr(t)},qi.version="19.3.0",qi}var bg;function nv(){if(bg)return zu.exports;bg=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),zu.exports=tv(),zu.exports}var lv=nv();const av=Td(lv);class yg extends Error{constructor(r,u,c){super(u),this.status=r,this.data=c,this.name="ApiError"}}async function Hi(i,r={}){const u=i.startsWith("/dashboard/api")?i:`/dashboard/api${i.startsWith("/")?i:`/${i}`}`,c={"Content-Type":"application/json",...r.headers},d=await fetch(u,{...r,headers:c});if(d.status===401)throw window.location.href="/login",new yg(401,"Session expired, redirecting to login...");const h=await d.json().catch(()=>null);if(!d.ok)throw new yg(d.status,(h==null?void 0:h.error)||(h==null?void 0:h.message)||`HTTP ${d.status}: Request failed`,h);return h}const re={get:i=>Hi(i,{method:"GET"}),post:(i,r)=>Hi(i,{method:"POST",body:r?JSON.stringify(r):void 0}),patch:(i,r)=>Hi(i,{method:"PATCH",body:r?JSON.stringify(r):void 0}),put:(i,r)=>Hi(i,{method:"PUT",body:r?JSON.stringify(r):void 0}),delete:i=>Hi(i,{method:"DELETE"}),getStats:()=>re.get("/stats"),getSession:()=>re.get("/bot/session"),startSession:i=>re.post("/bot/session/start",i),reconnectSession:()=>re.post("/bot/session/reconnect"),stopSession:()=>re.post("/bot/session/stop"),unlinkSession:()=>re.post("/bot/logout"),restartBot:()=>re.post("/bot/restart"),getSettings:()=>re.get("/settings"),updateSetting:(i,r)=>re.patch("/settings",{key:i,value:r}),updatePrefix:i=>re.patch("/settings",{key:"prefix",value:i}),getCommands:()=>re.get("/commands"),updateCommand:(i,r)=>re.patch(`/commands/${encodeURIComponent(i)}`,r),getSchedules:()=>re.get("/schedules"),createSchedule:i=>re.post("/schedules",i),deleteSchedule:i=>re.delete(`/schedules/${encodeURIComponent(i)}`),retrySchedule:i=>re.post(`/schedules/${encodeURIComponent(i)}/retry`),getGroups:()=>re.get("/groups"),updateGroup:(i,r)=>re.patch(`/groups/${encodeURIComponent(i)}`,r),getPersona:()=>re.get("/ai/persona"),updatePersona:i=>re.put("/ai/persona",{body:i}),getMemoryFiles:()=>re.get("/ai/memory"),getMemoryFile:i=>re.get(`/ai/memory/${encodeURIComponent(i)}`),updateMemoryFile:(i,r)=>re.put(`/ai/memory/${encodeURIComponent(i)}`,{content:r}),deleteMemoryFile:i=>re.delete(`/ai/memory/${encodeURIComponent(i)}`),getRecipients:()=>re.get("/recipients"),fetchAiModels:i=>re.post("/ai/models",i||{}),changePassword:(i,r)=>re.post("/security/password",{current:i,next:r}),getLogs:()=>re.get("/logs")};/**
50
- * @license lucide-react v1.46.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const iv=i=>i==null?void 0:i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
55
- * @license lucide-react v1.46.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */function sv(i,r,u=[]){if(r==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:iv(i),size:24,node:r,...u.length>0?{aliases:u}:{}}}/**
60
- * @license lucide-react v1.46.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const rv=i=>{let r="",u=!1;for(const c of i){if(c==="-"||c==="_"||c<=" "){u=r.length>0;continue}r.length===0?r+=c.toLowerCase():r+=u?c.toUpperCase():c,u=!1}return r};/**
65
- * @license lucide-react v1.46.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const ov=i=>{const r=rv(i);return r.charAt(0).toUpperCase()+r.slice(1)};/**
70
- * @license lucide-react v1.46.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */const xd=(...i)=>i.filter((r,u,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===u).join(" ").trim();/**
75
- * @license lucide-react v1.46.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const Yl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
80
- * @license lucide-react v1.46.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */function Ru(i){return i!=null}function cv(i,r={}){var C,U;const u=r.attributeNames??{},c=Z=>u[Z]??Z,d=i.size??i.width??Yl.width,h=i.size??i.height??Yl.height,p=((C=i.aliases)==null?void 0:C.filter(Z=>typeof Z=="string"&&Z.trim()!=="").map(Z=>`lucide-${Z}`))??[],g=[...i.name?[`lucide-${i.name}`]:[],...p],b=((U=r.className)==null?void 0:U.split(" ").filter(Boolean))??[],E=r.includeDefaultClasses===!1?xd(...b):xd("lucide",...g,...b),v=r.absoluteStrokeWidth?Number(r.strokeWidth??Yl["stroke-width"])*Number(i.size??i.width??Yl.width)/Number(r.size??r.width??Yl.width):r.strokeWidth??Yl["stroke-width"];return["svg",{...Object.entries(Yl).reduce((Z,[D,B])=>(Z[c(D)]=B,Z),{}),..."color"in r&&r.color&&{[c("stroke")]:r.color},..."size"in r&&Ru(r.size)&&{[c("width")]:r.size,[c("height")]:r.size},..."width"in r&&Ru(r.width)&&{[c("width")]:r.width},..."height"in r&&Ru(r.height)&&{[c("height")]:r.height},[c("stroke-width")]:v,...E&&{[c("class")]:E},[c("viewBox")]:`0 0 ${d} ${h}`,...r.hasA11yProp===!1?{[c("aria-hidden")]:"true"}:{},..."attributes"in r&&r.attributes},i.node.map(Z=>{const[D,B,G]=Z,X=r.nonScalingStroke?{[c("vector-effect")]:"non-scaling-stroke",...B}:B;return G?[D,X,G]:[D,X]})]}/**
85
- * @license lucide-react v1.46.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */function uv(i,r={}){return cv(i,{...r,attributeNames:{...r.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
90
- * @license lucide-react v1.46.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const dv=i=>{for(const r in i)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},fv=K.createContext({}),hv=()=>K.useContext(fv),mv=K.forwardRef(({color:i,size:r,width:u,height:c,strokeWidth:d,absoluteStrokeWidth:h,nonScalingStroke:p,className:g="",children:b,iconNode:E=[],icon:v={node:E,aliases:[],size:24},...x},C)=>{const{size:U=24,strokeWidth:Z=2,absoluteStrokeWidth:D=!1,nonScalingStroke:B=!1,color:G="currentColor",className:X=""}=hv()??{},le=!!b||dv(x),[W,me,J=[]]=uv(v,{color:i??G,width:u??r??U,height:c??r??U,strokeWidth:d??Z,absoluteStrokeWidth:h??D,nonScalingStroke:p??B,className:xd(X,g),hasA11yProp:le,attributes:x});return K.createElement(W,{ref:C,...me},[...J.map(([Y,R])=>K.createElement(Y,R)),...Array.isArray(b)?b:[b]])});/**
95
- * @license lucide-react v1.46.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */function xe(i,r=[],u=[]){const c=typeof i=="string"?sv(i,r,u):i,d=K.forwardRef(({className:h,...p},g)=>K.createElement(mv,{ref:g,icon:c,className:h,...p}));return c.name&&(d.displayName=ov(c.name)),d}/**
100
- * @license lucide-react v1.46.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const cx={name:"activity",size:24,node:[["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"}]]};cx.node;const pv=xe(cx);/**
105
- * @license lucide-react v1.46.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const ux={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};ux.node;const gv=xe(ux);/**
110
- * @license lucide-react v1.46.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const dx={name:"book-user",size:24,node:[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]]};dx.node;const xv=xe(dx);/**
115
- * @license lucide-react v1.46.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const fx={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};fx.node;const Ed=xe(fx);/**
120
- * @license lucide-react v1.46.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const hx={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};hx.node;const bd=xe(hx);/**
125
- * @license lucide-react v1.46.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const mx={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};mx.node;const Lr=xe(mx);/**
130
- * @license lucide-react v1.46.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const px={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};px.node;const bv=xe(px);/**
135
- * @license lucide-react v1.46.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const gx={name:"circle-alert",size:24,node:[["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"}]],aliases:["alert-circle"]};gx.node;const qr=xe(gx);/**
140
- * @license lucide-react v1.46.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const xx={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};xx.node;const Qr=xe(xx);/**
145
- * @license lucide-react v1.46.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const bx={name:"circle-x",size:24,node:[["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"}]],aliases:["x-circle"]};bx.node;const yv=xe(bx);/**
150
- * @license lucide-react v1.46.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const yx={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};yx.node;const vv=xe(yx);/**
155
- * @license lucide-react v1.46.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const vx={name:"copy",size:24,node:[["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"}]]};vx.node;const Nv=xe(vx);/**
160
- * @license lucide-react v1.46.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const Nx={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};Nx.node;const wv=xe(Nx);/**
165
- * @license lucide-react v1.46.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const wx={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};wx.node;const Du=xe(wx);/**
170
- * @license lucide-react v1.46.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const Sx={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};Sx.node;const Ha=xe(Sx);/**
175
- * @license lucide-react v1.46.0 - ISC
176
- *
177
- * This source code is licensed under the ISC license.
178
- * See the LICENSE file in the root directory of this source tree.
179
- */const jx={name:"file-text",size:24,node:[["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"}]]};jx.node;const Mr=xe(jx);/**
180
- * @license lucide-react v1.46.0 - ISC
181
- *
182
- * This source code is licensed under the ISC license.
183
- * See the LICENSE file in the root directory of this source tree.
184
- */const _x={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};_x.node;const Sv=xe(_x);/**
185
- * @license lucide-react v1.46.0 - ISC
186
- *
187
- * This source code is licensed under the ISC license.
188
- * See the LICENSE file in the root directory of this source tree.
189
- */const Ax={name:"funnel",size:24,node:[["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"}]],aliases:["filter"]};Ax.node;const jv=xe(Ax);/**
190
- * @license lucide-react v1.46.0 - ISC
191
- *
192
- * This source code is licensed under the ISC license.
193
- * See the LICENSE file in the root directory of this source tree.
194
- */const Tx={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};Tx.node;const Hr=xe(Tx);/**
195
- * @license lucide-react v1.46.0 - ISC
196
- *
197
- * This source code is licensed under the ISC license.
198
- * See the LICENSE file in the root directory of this source tree.
199
- */const Cx={name:"hard-drive",size:24,node:[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]};Cx.node;const vg=xe(Cx);/**
200
- * @license lucide-react v1.46.0 - ISC
201
- *
202
- * This source code is licensed under the ISC license.
203
- * See the LICENSE file in the root directory of this source tree.
204
- */const Ex={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};Ex.node;const _v=xe(Ex);/**
205
- * @license lucide-react v1.46.0 - ISC
206
- *
207
- * This source code is licensed under the ISC license.
208
- * See the LICENSE file in the root directory of this source tree.
209
- */const zx={name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]};zx.node;const yd=xe(zx);/**
210
- * @license lucide-react v1.46.0 - ISC
211
- *
212
- * This source code is licensed under the ISC license.
213
- * See the LICENSE file in the root directory of this source tree.
214
- */const Mx={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};Mx.node;const Av=xe(Mx);/**
215
- * @license lucide-react v1.46.0 - ISC
216
- *
217
- * This source code is licensed under the ISC license.
218
- * See the LICENSE file in the root directory of this source tree.
219
- */const Ox={name:"lock",size:24,node:[["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"}]]};Ox.node;const Tv=xe(Ox);/**
220
- * @license lucide-react v1.46.0 - ISC
221
- *
222
- * This source code is licensed under the ISC license.
223
- * See the LICENSE file in the root directory of this source tree.
224
- */const kx={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};kx.node;const Cv=xe(kx);/**
225
- * @license lucide-react v1.46.0 - ISC
226
- *
227
- * This source code is licensed under the ISC license.
228
- * See the LICENSE file in the root directory of this source tree.
229
- */const Rx={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};Rx.node;const Ev=xe(Rx);/**
230
- * @license lucide-react v1.46.0 - ISC
231
- *
232
- * This source code is licensed under the ISC license.
233
- * See the LICENSE file in the root directory of this source tree.
234
- */const Dx={name:"message-square",size:24,node:[["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"}]]};Dx.node;const zv=xe(Dx);/**
235
- * @license lucide-react v1.46.0 - ISC
236
- *
237
- * This source code is licensed under the ISC license.
238
- * See the LICENSE file in the root directory of this source tree.
239
- */const Bx={name:"mic",size:24,node:[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]};Bx.node;const Bu=xe(Bx);/**
240
- * @license lucide-react v1.46.0 - ISC
241
- *
242
- * This source code is licensed under the ISC license.
243
- * See the LICENSE file in the root directory of this source tree.
244
- */const Ux={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};Ux.node;const Mv=xe(Ux);/**
245
- * @license lucide-react v1.46.0 - ISC
246
- *
247
- * This source code is licensed under the ISC license.
248
- * See the LICENSE file in the root directory of this source tree.
249
- */const Lx={name:"pen-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-3"]};Lx.node;const Ov=xe(Lx);/**
250
- * @license lucide-react v1.46.0 - ISC
251
- *
252
- * This source code is licensed under the ISC license.
253
- * See the LICENSE file in the root directory of this source tree.
254
- */const qx={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]};qx.node;const kv=xe(qx);/**
255
- * @license lucide-react v1.46.0 - ISC
256
- *
257
- * This source code is licensed under the ISC license.
258
- * See the LICENSE file in the root directory of this source tree.
259
- */const Hx={name:"play",size:24,node:[["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"}]]};Hx.node;const Rv=xe(Hx);/**
260
- * @license lucide-react v1.46.0 - ISC
261
- *
262
- * This source code is licensed under the ISC license.
263
- * See the LICENSE file in the root directory of this source tree.
264
- */const Gx={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};Gx.node;const Vx=xe(Gx);/**
265
- * @license lucide-react v1.46.0 - ISC
266
- *
267
- * This source code is licensed under the ISC license.
268
- * See the LICENSE file in the root directory of this source tree.
269
- */const Yx={name:"qr-code",size:24,node:[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]};Yx.node;const Uu=xe(Yx);/**
270
- * @license lucide-react v1.46.0 - ISC
271
- *
272
- * This source code is licensed under the ISC license.
273
- * See the LICENSE file in the root directory of this source tree.
274
- */const Qx={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};Qx.node;const Ki=xe(Qx);/**
275
- * @license lucide-react v1.46.0 - ISC
276
- *
277
- * This source code is licensed under the ISC license.
278
- * See the LICENSE file in the root directory of this source tree.
279
- */const Xx={name:"refresh-cw",size:24,node:[["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"}]]};Xx.node;const Gr=xe(Xx);/**
280
- * @license lucide-react v1.46.0 - ISC
281
- *
282
- * This source code is licensed under the ISC license.
283
- * See the LICENSE file in the root directory of this source tree.
284
- */const Kx={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};Kx.node;const _r=xe(Kx);/**
285
- * @license lucide-react v1.46.0 - ISC
286
- *
287
- * This source code is licensed under the ISC license.
288
- * See the LICENSE file in the root directory of this source tree.
289
- */const Zx={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};Zx.node;const Vr=xe(Zx);/**
290
- * @license lucide-react v1.46.0 - ISC
291
- *
292
- * This source code is licensed under the ISC license.
293
- * See the LICENSE file in the root directory of this source tree.
294
- */const Jx={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Jx.node;const Ix=xe(Jx);/**
295
- * @license lucide-react v1.46.0 - ISC
296
- *
297
- * This source code is licensed under the ISC license.
298
- * See the LICENSE file in the root directory of this source tree.
299
- */const Px={name:"settings",size:24,node:[["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"}]]};Px.node;const Dv=xe(Px);/**
300
- * @license lucide-react v1.46.0 - ISC
301
- *
302
- * This source code is licensed under the ISC license.
303
- * See the LICENSE file in the root directory of this source tree.
304
- */const Fx={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};Fx.node;const Bv=xe(Fx);/**
305
- * @license lucide-react v1.46.0 - ISC
306
- *
307
- * This source code is licensed under the ISC license.
308
- * See the LICENSE file in the root directory of this source tree.
309
- */const $x={name:"shield",size:24,node:[["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"}]]};$x.node;const Wx=xe($x);/**
310
- * @license lucide-react v1.46.0 - ISC
311
- *
312
- * This source code is licensed under the ISC license.
313
- * See the LICENSE file in the root directory of this source tree.
314
- */const eb={name:"sliders-vertical",size:24,node:[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],aliases:["sliders"]};eb.node;const tb=xe(eb);/**
315
- * @license lucide-react v1.46.0 - ISC
316
- *
317
- * This source code is licensed under the ISC license.
318
- * See the LICENSE file in the root directory of this source tree.
319
- */const nb={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]};nb.node;const Lu=xe(nb);/**
320
- * @license lucide-react v1.46.0 - ISC
321
- *
322
- * This source code is licensed under the ISC license.
323
- * See the LICENSE file in the root directory of this source tree.
324
- */const lb={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};lb.node;const Ng=xe(lb);/**
325
- * @license lucide-react v1.46.0 - ISC
326
- *
327
- * This source code is licensed under the ISC license.
328
- * See the LICENSE file in the root directory of this source tree.
329
- */const ab={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};ab.node;const vd=xe(ab);/**
330
- * @license lucide-react v1.46.0 - ISC
331
- *
332
- * This source code is licensed under the ISC license.
333
- * See the LICENSE file in the root directory of this source tree.
334
- */const ib={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};ib.node;const Uv=xe(ib);/**
335
- * @license lucide-react v1.46.0 - ISC
336
- *
337
- * This source code is licensed under the ISC license.
338
- * See the LICENSE file in the root directory of this source tree.
339
- */const sb={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};sb.node;const Lv=xe(sb);/**
340
- * @license lucide-react v1.46.0 - ISC
341
- *
342
- * This source code is licensed under the ISC license.
343
- * See the LICENSE file in the root directory of this source tree.
344
- */const rb={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};rb.node;const Va=xe(rb);/**
345
- * @license lucide-react v1.46.0 - ISC
346
- *
347
- * This source code is licensed under the ISC license.
348
- * See the LICENSE file in the root directory of this source tree.
349
- */const ob={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};ob.node;const cb=xe(ob);/**
350
- * @license lucide-react v1.46.0 - ISC
351
- *
352
- * This source code is licensed under the ISC license.
353
- * See the LICENSE file in the root directory of this source tree.
354
- */const ub={name:"triangle-alert",size:24,node:[["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"}]],aliases:["alert-triangle"]};ub.node;const Or=xe(ub);/**
355
- * @license lucide-react v1.46.0 - ISC
356
- *
357
- * This source code is licensed under the ISC license.
358
- * See the LICENSE file in the root directory of this source tree.
359
- */const db={name:"unlink",size:24,node:[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]};db.node;const qu=xe(db);/**
360
- * @license lucide-react v1.46.0 - ISC
361
- *
362
- * This source code is licensed under the ISC license.
363
- * See the LICENSE file in the root directory of this source tree.
364
- */const fb={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};fb.node;const Hu=xe(fb);/**
365
- * @license lucide-react v1.46.0 - ISC
366
- *
367
- * This source code is licensed under the ISC license.
368
- * See the LICENSE file in the root directory of this source tree.
369
- */const hb={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};hb.node;const Ga=xe(hb);/**
370
- * @license lucide-react v1.46.0 - ISC
371
- *
372
- * This source code is licensed under the ISC license.
373
- * See the LICENSE file in the root directory of this source tree.
374
- */const mb={name:"volume-2",size:24,node:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]};mb.node;const qv=xe(mb);/**
375
- * @license lucide-react v1.46.0 - ISC
376
- *
377
- * This source code is licensed under the ISC license.
378
- * See the LICENSE file in the root directory of this source tree.
379
- */const pb={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};pb.node;const Ji=xe(pb);/**
380
- * @license lucide-react v1.46.0 - ISC
381
- *
382
- * This source code is licensed under the ISC license.
383
- * See the LICENSE file in the root directory of this source tree.
384
- */const gb={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};gb.node;const Hv=xe(gb),Gu={ar:{overview:"نظرة عامة",connection:"حالة الاتصال",control:"التحكم والإدارة",commands:"كتالوج الأوامر",ai:"الذكاء الاصطناعي",groups:"المجموعات",roles:"الأدوار والمشرفين",schedules:"الرسائل المجدولة",notes:"الملاحظات والقوائم",settings:"الإعدادات العامة",logs:"السجلات المباشرة",connected:"متصل بالواتساب",disconnected:"غير متصل",starting:"جاري إنشاء الاتصال...",waiting_for_qr:"بانتظار مسح رمز الـ QR",linking:"جاري ربط الجلسة...",reconnecting:"جاري إعادة الاتصال...",retry_exhausted:"استُنفذت محاولات الاتصال",logged_out:"تم تسجيل الخروج من الهاتف",idle:"الجلسة خاملة",paused:"متوقف مؤقتاً",resume:"استئناف الجلسة",connectSession:"الاتصال",start:"بدء الاتصال",stop:"إيقاف مؤقت",reconnect:"إعادة الاتصال",unlink:"إلغاء الربط (Unlink)",restart:"إعادة تشغيل البوت",save:"حفظ التغييرات",saving:"جاري الحفظ...",cancel:"إلغاء",delete:"حذف",edit:"تعديل",add:"إضافة",refresh:"تحديث",logout:"تسجيل الخروج",close:"إغلاق",copy:"نسخ",copied:"تم النسخ!",clientIdentity:"هوية العميل",noPhonePaired:"لم يتم ربط أي هاتف بعد",linkedAs:"مرتبط كـ",datastoreHealth:"حالة قاعدة البيانات",datastoreHealthy:"بيانات الاعتماد ومفاتيح الجلسة ومطابقات LID سليمة ومستقرة.",reconnectPolicy:"سياسة إعادة الاتصال",reconnectPolicyDesc:"تراجع خطي تدريجي (5ث، 10ث، 15ث، 20ث، 25ث) مع محاولات محدودة.",maxAttemptsAutoPause:"الحد الأقصى: 5 محاولات · إيقاف تلقائي دون إنترنت",platformWeb:"المنصة: واتساب ويب (v7 Multi-Device)",databaseNodeSqlite:"قاعدة البيانات: node:sqlite (تزامني)",totalGroups:"إجمالي المجموعات",totalUsers:"المستخدمين المسجلين",commandCount:"الأوامر المفعلة",uptime:"مدة التشغيل",dataDir:"مجلد البيانات",quickStatus:"حالة النظام",activeSchedules:"المهام المجدولة النشطة",activeListening:"المساعد نشط ويستقبل الرسائل",pausedOrLinking:"اتصال واتساب متوقف حالياً أو قيد المزامنة",aiTitle:"إعدادات الذكاء الاصطناعي",aiSubtitle:"اختر المزود المناسب بضغطة زر أو خصص النماذج والمفاتيح",aiAgentEnabled:"تفعيل وكيل الذكاء الاصطناعي",aiProvider:"المزود النشط",quickSetup:"معالج الإعداد السريع للمزودين",aiVision:"تحليل وفهم الصور (Vision)",aiVisionDesc:"تحويل الصور وتمريرها لنماذج الرؤية الذكية المتوافقة",aiStt:"محرك تحويل الصوت إلى نص (STT)",sttDesc:"محرك تفريغ الرسائل الصوتية وتحويلها إلى نص",sttAuto:"تلقائي (مطابق للمزود النشط)",sttGemini:"Google Gemini Audio API",sttOpenAI:"OpenAI / Groq Whisper API",botLanguage:"لغة ردود البوت",botLanguageDesc:"تحديد لغة ردود البوت أو تغييرها عبر الأمر !lang",langAuto:"تلقائي (حسب لغة رسالة المستخدم)",langAr:"العربية الفصحى (دائماً)",langEn:"English (دائماً)",modelName:"النموذج",apiKey:"مفتاح API",baseUrl:"Base URL",maxToolSteps:"الحد الأقصى لخطوات الأدوات",googleSearch:"أداة بحث جوجل المدمجة (Google Search)",personaPrompt:"برومبت شخصية البوت (AI Persona)",personaDesc:"تعديل التوجيه الأساسي الذي يحدد أسلوب وشخصية مساعدك الذكي",editPersona:"تعديل برومبت الشخصية",memoryFiles:"ملفات الذاكرة طويلة المدى",memoryDesc:"استعراض وتعديل ملفات الذاكرة التراكمية المحفوظة بصيغة Markdown",manageMemory:"إدارة ملفات الذاكرة",capabilities:"القدرات والميزات المتقدمة",modelsAvailableLive:"نماذج متاحة لحسابك (تم التحقق عبر API)",modelsRecommendedSeed:"نماذج مقترحة / معروفة (دليل النماذج)",connectKeyFirstPrompt:"يرجى إدخال مفتاح API أولاً لاكتشاف النماذج المتاحة لحسابك",refreshModels:"تحديث قائمة النماذج",refreshing:"جارِ التحديث...",fetchModels:"فحص النماذج المتاحة",fetchingModels:"جارِ فحص النماذج...",capVision:"الرؤية",capStt:"الصوت",capAudio:"إدخال الصوت",capText:"نص",capPdf:"PDF",capVideo:"فيديو",supported:"مدعوم",unsupported:"غير مدعوم",sourceLive:"حسابك",sourceSeed:"مقترح",sourceUnknown:"غير معروف",visionUnsupportedNotice:"النموذج المختار لا يدعم معالجة الصور والرؤية (Vision)، تم تعطيل الميزة تلقائياً.",sttUnsupportedNotice:"النموذج المختار لا يدعم تحويل وفهم الصوت (STT)، تم تعطيل الميزة تلقائياً.",aiSttEnabled:"تفعيل تحويل وفهم الصوت (STT)",aiSttEnabledDesc:"تفريغ الرسائل الصوتية وفهم الملفات الصوتية عبر النموذج المختار",providerGemini:"Google Gemini",providerGeminiDesc:"الافتراضي، يدعم البحث والملفات والصور والصوتيات محلياً",providerGroq:"Groq Cloud",providerGroqDesc:"فائق السرعة لنماذج Llama 3 و Mixtral مع دعم Vision",providerOpenAI:"OpenAI / Compatible",providerOpenAIDesc:"لنماذج GPT-4o أو أي خادم متوافق مع API OpenAI",providerOllama:"Ollama (محلي)",providerOllamaDesc:"تشغيل النماذج محلياً على جهازك مجاناً بدون إنترنت",providerAnthropic:"Anthropic Claude",providerAnthropicDesc:"لنماذج Claude 3.5 Sonnet الذكية والمتقدمة",scanQrHint:"افتح تطبيق واتساب على هاتفك > الأجهزة المرتبطة > ربط جهاز، وامسح الرمز أدناه.",pairingCode:"رمز الربط (Pairing Code)",reconnectingSoon:"إعادة الاتصال قريباً...",nextAttemptIn:"المحاولة القادمة خلال",seconds:"ثوانٍ",tabGeneral:"عام والبادئة",tabAI:"الذكاء الاصطناعي",tabSecurity:"الأمان والوصول",tabProxy:"بروكسي واتساب",tabStorage:"التخزين والوسائط",tabLogs:"سجلات النظام",prefixTitle:"بادئة أوامر البوت (Command Prefix)",prefixDesc:"الرمز أو الحرف الذي تبدأ به جميع الأوامر الموجهة للبوت في واتساب (مثل !help أو /ping)",prefixPlaceholder:"مثال: !",prefixPresets:"بادئات شائعة سريعة:",prefixPreview:"معاينة حية لشكل الأوامر:",prefixSaveBtn:"حفظ البادئة الجديدة",prefixUpdated:"تم تحديث بادئة الأوامر بنجاح!",prefixValidation:"يجب أن تكون البادئة من رمز واحد إلى 3 رموز",activePrefix:"البادئة الحالية",changePrefix:"تعديل البادئة",prefix:"بادئة الأوامر (Prefix)",botTimezone:"المنطقة الزمنية (Timezone)",botTimezoneDesc:"المنطقة الزمنية المعتمدة لحساب أوقات الصلاة والمهام المجدولة (مثل Africa/Cairo)",botMinDelay:"الحد الأدنى للتأخير البشري (ms)",botMaxDelay:"الحد الأقصى للتأخير البشري (ms)",delaysDesc:"فترة انتظار قصيرة قبل إرسال الردود ليبدو سلوك البوت طبيعياً وبشرياً",changePassword:"تغيير كلمة مرور لوحة التحكم",currentPassword:"كلمة المرور الحالية",newPassword:"كلمة المرور الجديدة",confirmPassword:"تأكيد كلمة المرور الجديدة",passwordMatchError:"كلمتا المرور غير متطابقتين",passwordMinLength:"يجب ألا تقل كلمة المرور عن 8 خانات",passwordChangedSuccess:"تم تغيير كلمة مرور لوحة التحكم بنجاح!",proxyTitle:"بروكسي واتساب الصادر (Outbound Proxy)",proxyDesc:"توجيه اتصالات Baileys إلى واتساب عبر بروكسي خارجي لتجاوز قيود الشبكة أو الحظر",proxyEnabled:"تفعيل البروكسي لاتصالات واتساب",proxyProtocol:"بروتوكول البروكسي (Protocol)",proxyHost:"عنوان المضيف (Host / IP)",proxyPort:"المنفذ (Port)",proxyUsername:"اسم المستخدم (اختياري)",proxyPassword:"كلمة المرور (اختياري)",proxyApplyHint:"⚠️ ملاحظة: عند تعديل إعدادات البروكسي، اضغط على زر إعادة الاتصال في صفحة الاتصال لتطبيق التغييرات.",storageTitle:"إدارة البيانات والاحتفاظ بها",storageDesc:"تحديد مدد صلاحية البيانات المؤقتة وسجلات الرسائل الموجهة والحدود القصوى للجلب",forwardTtl:"صلاحية سجلات الرسائل الموجهة (أيام)",forwardTtlDesc:"حذف إحصائيات الرسائل الموجهة القديمة تلقائياً بعد مرور هذا العدد من الأيام",maxFetchBytes:"الحد الأقصى لجلب محتوى صفحات الويب (Bytes)",maxFetchBytesDesc:"حجم المحتوى الأقصى المسموح لأدوات الذكاء الاصطناعي بجلبه من صفحات الويب (افتراضي: 512KB)",ffmpegPath:"مسار محرك FFmpeg مخصص (اختياري)",weatherApiKey:"مفتاح OpenWeatherMap API (اختياري)",chooseLanguage:"اختر اللغة",langCardTitle:"لغة الواجهة: العربية (RTL)",langCardDesc:"تصميم مخصص بالكامل لاتجاه الكتابة العربي من اليمين لليسار مع خط تجوال",langSwitchBtn:"Switch to English",langName:"العربية",interfaceLanguage:"لغة لوحة التحكم",interfaceLanguageDesc:"التبديل الفوري بين الواجهة العربية (RTL) والإنجليزية (LTR)",botPort:"منفذ خادم لوحة التحكم (Port)",botPortHint:"* يتطلب تغيير المنفذ إعادة تشغيل البوت ليأخذ مفعوله",searchPlaceholder:"ابحث في الأوامر أو الأسماء البديلة...",thCommand:"الأمر",thAliases:"الأسماء البديلة",thDescription:"الوصف",thScope:"النطاق",thRequiredRole:"الرتبة المطلوبة",thStatus:"الحالة",thGroupName:"اسم المجموعة",thGroupJid:"معرف المجموعة (JID)",thMembers:"الأعضاء",thAntiLink:"مانع الروابط",thMedia:"الوسائط",thWelcome:"الترحيب",thTarget:"الوجهة",thMessage:"الرسالة",thSchedule:"الموعد",thType:"النوع",thDelivery:"حالة الإرسال",thActions:"إجراءات",scheduleNewMsg:"جدولة رسالة جديدة",liveServerLogs:"سجلات النظام المباشرة",clearLogs:"مسح السجلات",allLogs:"جميع المستويات",noLogs:"لا توجد سجلات مسجلة حتى الآن.",savedSuccessfully:"تم حفظ الإعدادات بنجاح!",saveFailed:"حدث خطأ أثناء حفظ الإعدادات.",connectionStatusUpdated:"تم تحديث حالة الاتصال.",networkError:"تعذر الاتصال بالخادم.",loading:"جاري التحميل...",aiAssistantDesc:"وكيل ذكي متعدد الأدوات مع ذاكرة طويلة الأمد",settingsSub:"البادئة، التأخير، الخدمات، والأمان",editAliases:"تعديل الأسماء المستعارة",aliasesFor:"الأسماء المستعارة لـ",addAlias:"إضافة اسم مستعار",newAliasPlaceholder:"اكتب اسماً جديداً...",noAliases:"لا توجد أسماء مستعارة",selectRecipient:"اختر المحادثة المستهدفة",searchRecipients:"ابحث بالاسم أو رقم الهاتف...",recipients:"المستلمون",chooseChat:"اختر جهة اتصال أو مجموعة...",noRecipientsFound:"لم يتم العثور على محادثات",pickPhoneContact:"من دليل الهاتف",pickPhoneContactHint:"اختر جهة اتصال من هاتف أندرويد",maxSchedulesReached:"تم بلوغ الحد الأقصى (3 رسائل مجدولة)",limitReached:"الحد الأقصى مكتمل",tabIntegrations:"الربط والخدمات",integrationsDesc:"مفاتيح واجهات البرمجة (API) للخدمات الخارجية المرتبطة بالبوت",youtubeApiKey:"مفتاح YouTube Data API (اختياري)",selectModel:"اختر نموذجاً من القائمة...",availableModels:"النماذج المتاحة من المزود",customModel:"أو اكتب اسم نموذج مخصص",sessionStatus:"حالة الجلسة",sessionActive:"الجلسة متصلة وتستقبل الرسائل",sessionOffline:"الجلسة غير متصلة حالياً",connectedNumber:"الرقم المرتبط"},en:{overview:"Overview",connection:"Connection",control:"Control & Management",commands:"Command Catalog",ai:"AI & Memory",groups:"Groups",roles:"Roles & Admins",schedules:"Scheduled Messages",notes:"Notes & Lists",settings:"Settings",logs:"Live Logs",connected:"Connected to WhatsApp",disconnected:"Disconnected",starting:"Starting socket...",waiting_for_qr:"Waiting for QR scan",linking:"Linking session...",reconnecting:"Reconnecting...",retry_exhausted:"Retries exhausted",logged_out:"Logged out from phone",idle:"Session idle",paused:"Paused",resume:"Resume session",connectSession:"Connect",start:"Start Connection",stop:"Pause",reconnect:"Reconnect",unlink:"Unlink Device",restart:"Restart Bot",save:"Save Changes",saving:"Saving...",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",refresh:"Refresh",logout:"Sign Out",close:"Close",copy:"Copy",copied:"Copied!",clientIdentity:"Client Identity",noPhonePaired:"No phone paired yet",linkedAs:"Linked as",datastoreHealth:"Datastore Health",datastoreHealthy:"SQLite credentials, auth keys, and LID mappings are healthy.",reconnectPolicy:"Reconnect Policy",reconnectPolicyDesc:"Staged linear backoff (5s, 10s, 15s, 20s, 25s) with bounded retries.",maxAttemptsAutoPause:"Max attempts: 5 • Auto-pause offline",platformWeb:"Platform: WhatsApp Web (v7 Multi-Device)",databaseNodeSqlite:"Database: node:sqlite (Synchronous)",totalGroups:"Total Groups",totalUsers:"Registered Users",commandCount:"Enabled Commands",uptime:"Uptime",dataDir:"Data Directory",quickStatus:"System Status",activeSchedules:"Active Schedules",activeListening:"Active and listening to messages",pausedOrLinking:"WhatsApp connection is currently paused or linking",aiTitle:"AI Assistant Configuration",aiSubtitle:"Select a provider with one click or configure custom endpoints and keys",aiAgentEnabled:"Enable AI Agent",aiProvider:"Active Provider",quickSetup:"Quick Provider Setup Wizard",aiVision:"Image Understanding (Vision)",aiVisionDesc:"Encode attached images and pass to supported multimodal vision models",aiStt:"Speech-to-Text Provider (STT)",sttDesc:"Speech-to-text transcription engine for voice notes",sttAuto:"Auto (Matches active provider)",sttGemini:"Google Gemini Audio API",sttOpenAI:"OpenAI / Groq Whisper API",botLanguage:"Bot Response Language",botLanguageDesc:"Set bot response language directly or via command !lang",langAuto:"Auto-detect (matches user's language)",langAr:"Modern Standard Arabic (Always)",langEn:"English (Always)",modelName:"Model",apiKey:"API key",baseUrl:"Base URL",maxToolSteps:"Max Tool Steps",googleSearch:"Built-in Google Search Grounding",personaPrompt:"AI Persona System Prompt",personaDesc:"Edit the live system prompt that shapes your AI assistant's persona, tone, and behavior.",editPersona:"Edit System Prompt",memoryFiles:"Long-term Memory Files",memoryDesc:"Inspect and manage markdown memory documents stored inside the data directory.",manageMemory:"Manage Memory Files",capabilities:"Capabilities & Toggles",modelsAvailableLive:"Models Available for Your Account (Live API Verified)",modelsRecommendedSeed:"Recommended / Known Models (Catalog)",connectKeyFirstPrompt:"Please connect your API key first to discover models available to your account",refreshModels:"Refresh Models",refreshing:"Refreshing...",fetchModels:"Fetch Available Models",fetchingModels:"Discovering models...",capVision:"Vision",capStt:"Speech",capAudio:"Audio in",capText:"Text",capPdf:"PDF",capVideo:"Video",supported:"Supported",unsupported:"Unsupported",sourceLive:"Your account",sourceSeed:"Catalog",sourceUnknown:"Unknown",visionUnsupportedNotice:"The selected model does not support Vision (image understanding). Feature disabled automatically.",sttUnsupportedNotice:"The selected model does not support Speech-to-Text (STT). Feature disabled automatically.",aiSttEnabled:"Enable Speech-to-Text (STT)",aiSttEnabledDesc:"Audio transcription and voice note understanding using the active model",providerGemini:"Google Gemini",providerGeminiDesc:"Default provider with native Google Search, Files upload, and Multimodal support",providerGroq:"Groq Cloud",providerGroqDesc:"Ultra-fast inference for Llama 3 & Mixtral models with Vision support",providerOpenAI:"OpenAI / Compatible",providerOpenAIDesc:"For GPT-4o models or any OpenAI-compatible API gateway",providerOllama:"Ollama (Local)",providerOllamaDesc:"Run local open-source models completely offline on your own machine",providerAnthropic:"Anthropic Claude",providerAnthropicDesc:"For Claude 3.5 Sonnet advanced reasoning models",scanQrHint:"Open WhatsApp on your phone > Settings > Linked Devices > Link a Device, and scan the QR code below.",pairingCode:"Pairing Code",reconnectingSoon:"Reconnecting soon...",nextAttemptIn:"Next attempt in",seconds:"seconds",tabGeneral:"General & Prefix",tabAI:"AI Assistant",tabSecurity:"Security & Access",tabProxy:"WhatsApp Proxy",tabStorage:"Storage & Media",tabLogs:"System Logs",prefixTitle:"Bot Command Prefix",prefixDesc:"The leading character or symbol that triggers commands in WhatsApp chats (e.g. !help, /ping)",prefixPlaceholder:"e.g. !",prefixPresets:"Common Quick Presets:",prefixPreview:"Live Command Syntax Preview:",prefixSaveBtn:"Save New Prefix",prefixUpdated:"Command prefix updated successfully!",prefixValidation:"Prefix must be 1 to 3 characters long",activePrefix:"Active Prefix",changePrefix:"Change Prefix",prefix:"Command Prefix",botTimezone:"Timezone",botTimezoneDesc:"IANA timezone used for prayer times, AI context, and cron schedules (e.g. Africa/Cairo)",botMinDelay:"Min Human Delay (ms)",botMaxDelay:"Max Human Delay (ms)",delaysDesc:"Simulated human typing pause before replying to avoid robotic triggers",changePassword:"Change Dashboard Password",currentPassword:"Current Password",newPassword:"New Password",confirmPassword:"Confirm New Password",passwordMatchError:"Passwords do not match",passwordMinLength:"Password must be at least 8 characters long",passwordChangedSuccess:"Dashboard password changed successfully!",proxyTitle:"Outbound WhatsApp Proxy",proxyDesc:"Route Baileys WhatsApp traffic through an HTTP or SOCKS5 proxy to bypass restrictions",proxyEnabled:"Enable Outbound Proxy for WhatsApp",proxyProtocol:"Proxy Protocol",proxyHost:"Proxy Host / IP",proxyPort:"Proxy Port",proxyUsername:"Username (Optional)",proxyPassword:"Password (Optional)",proxyApplyHint:"⚠️ Note: To apply proxy changes, go to Connection and reconnect WhatsApp.",storageTitle:"Data Retention & Storage Limits",storageDesc:"Configure data cleanup thresholds, forward score retention, and fetch limits",forwardTtl:"Forward Score Expiry (Days)",forwardTtlDesc:"Automatically purge forwarded message scores after this many days",maxFetchBytes:"Web Fetch Byte Limit",maxFetchBytesDesc:"Maximum response body size AI tools are allowed to fetch from web pages (default: 512KB)",ffmpegPath:"Custom FFmpeg Binary Path (Optional)",weatherApiKey:"OpenWeatherMap API Key (Optional)",chooseLanguage:"Choose Language",langCardTitle:"Interface Language: English (LTR)",langCardDesc:"Full bidirectional layout support with optimized Arabic RTL & English LTR",langSwitchBtn:"التبديل إلى العربية",langName:"English",interfaceLanguage:"Dashboard Interface Language",interfaceLanguageDesc:"Instantly toggle between Arabic (RTL) and English (LTR)",botPort:"Control Panel Port",botPortHint:"* Changing port takes effect on next process restart",searchPlaceholder:"Search commands or aliases...",thCommand:"Command",thAliases:"Aliases",thDescription:"Description",thScope:"Scope",thRequiredRole:"Required Role",thStatus:"Status",thGroupName:"Group Name",thGroupJid:"Group JID",thMembers:"Members",thAntiLink:"Anti-Link",thMedia:"Media",thWelcome:"Welcome",thTarget:"Target",thMessage:"Message",thSchedule:"Schedule",thType:"Type",thDelivery:"Delivery Status",thActions:"Actions",scheduleNewMsg:"Schedule New Message",liveServerLogs:"Live Server Logs",clearLogs:"Clear Logs",allLogs:"All Levels",noLogs:"No log entries to display.",savedSuccessfully:"Settings saved successfully!",saveFailed:"Failed to save settings.",connectionStatusUpdated:"Connection status updated.",networkError:"Network error connecting to server.",loading:"Loading...",aiAssistantDesc:"Autonomous tool-calling AI agent with long-term memory",settingsSub:"Prefix, delays, integrations, & security",editAliases:"Edit Aliases",aliasesFor:"Aliases for",addAlias:"Add Alias",newAliasPlaceholder:"Type new alias...",noAliases:"No custom aliases",selectRecipient:"Select Target Chat",searchRecipients:"Search by name or phone...",recipients:"Recipients",chooseChat:"Choose a contact or group...",noRecipientsFound:"No matching chats found",pickPhoneContact:"From phone book",pickPhoneContactHint:"Pick a contact from this Android phone",maxSchedulesReached:"Maximum limit reached (3 scheduled messages)",limitReached:"Limit Reached",tabIntegrations:"Integrations",integrationsDesc:"API keys for external services connected to the bot",youtubeApiKey:"YouTube Data API Key (Optional)",selectModel:"Select a model from list...",availableModels:"Models Available from Provider",customModel:"Or type a custom model name",sessionStatus:"Session Status",sessionActive:"Session active and receiving messages",sessionOffline:"Session currently offline",connectedNumber:"Linked Phone"}},xb=K.createContext(null),Gv=({children:i})=>{const[r,u]=K.useState(()=>{const p=localStorage.getItem("levix_lang");return p==="ar"||p==="en"?p:navigator.language.startsWith("ar")?"ar":"en"}),c=r==="ar"?"rtl":"ltr";K.useEffect(()=>{localStorage.setItem("levix_lang",r),document.documentElement.lang=r,document.documentElement.dir=c},[r,c]);const d=p=>{u(p)},h=K.useMemo(()=>(p,g)=>(Gu[r]||Gu.en)[p]??Gu.en[p]??g??String(p),[r]);return o.jsx(xb.Provider,{value:{language:r,direction:c,setLanguage:d,t:h},children:i})},rn=()=>{const i=K.useContext(xb);if(!i)throw new Error("useI18n must be used within an I18nProvider");return i},Vv=({onToggleMobileMenu:i,title:r,status:u})=>{const{language:c,setLanguage:d,t:h}=rn(),[p,g]=Qi.useState(!1),b=Qi.useRef(null);Qi.useEffect(()=>{if(!p)return;const C=Z=>{b.current&&!b.current.contains(Z.target)&&g(!1)},U=Z=>{Z.key==="Escape"&&g(!1)};return document.addEventListener("mousedown",C),document.addEventListener("keydown",U),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",U)}},[p]);const[E,v]=Qi.useState(()=>{const C=localStorage.getItem("levix_theme");return C?(document.documentElement.setAttribute("data-theme",C),C):document.documentElement.getAttribute("data-theme")||"dark"}),x=()=>{const C=E==="dark"?"light":"dark";v(C),document.documentElement.setAttribute("data-theme",C),localStorage.setItem("levix_theme",C)};return o.jsxs("header",{className:"h-16 sticky top-0 z-30 flex items-center justify-between px-4 md:px-6 bg-panel/85 backdrop-blur-md border-b border-line",children:[o.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[o.jsx("button",{type:"button",onClick:i,className:"inline-flex md:hidden items-center justify-center w-11 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50",id:"mobile-menu-btn","aria-label":"Open navigation menu",children:o.jsx(Ev,{size:20})}),o.jsx("h1",{className:"text-lg md:text-xl font-bold tracking-tight text-text-main truncate",title:r,children:r})]}),o.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[o.jsxs("div",{className:"relative",ref:b,children:[o.jsx("button",{type:"button",onClick:()=>g(C=>!C),className:"inline-flex items-center justify-center w-11 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50",title:h("chooseLanguage","Choose Language"),"aria-label":h("chooseLanguage","Choose Language"),"aria-expanded":p,"aria-haspopup":"true",id:"btn-header-lang",children:o.jsx(Hr,{size:18,className:"text-brand-cyan"})}),p&&o.jsxs("div",{role:"menu","aria-orientation":"vertical","aria-labelledby":"btn-header-lang",className:"absolute end-0 mt-2 w-48 rounded-2xl border border-line bg-panel-solid shadow-2xl p-1.5 z-50 ring-1 ring-black/10 animate-in fade-in zoom-in-95 duration-150",children:[o.jsx("div",{className:"px-2.5 py-1.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider",children:h("chooseLanguage","Choose Language")}),o.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{d("ar"),g(!1)},className:`w-full flex items-center justify-between px-3 py-2 text-xs md:text-sm font-medium rounded-lg transition-colors ${c==="ar"?"bg-brand-blue/15 text-brand-cyan font-bold":"text-text-main hover:bg-panel-hover"}`,children:[o.jsx("span",{children:"العربية"}),c==="ar"&&o.jsx(Lr,{size:16,className:"text-brand-cyan"})]}),o.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{d("en"),g(!1)},className:`w-full flex items-center justify-between px-3 py-2 text-xs md:text-sm font-medium rounded-lg transition-colors ${c==="en"?"bg-brand-blue/15 text-brand-cyan font-bold":"text-text-main hover:bg-panel-hover"}`,children:[o.jsx("span",{children:"English"}),c==="en"&&o.jsx(Lr,{size:16,className:"text-brand-cyan"})]})]})]}),o.jsx("button",{type:"button",onClick:x,className:"inline-flex items-center justify-center w-11 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50",title:"Toggle Theme","aria-label":"Toggle dark/light theme",children:E==="dark"?o.jsx(Uv,{size:18}):o.jsx(Mv,{size:18})}),o.jsx("form",{action:"/logout",method:"POST",className:"m-0",children:o.jsx("button",{type:"submit",className:"inline-flex items-center justify-center w-11 h-11 rounded-xl border border-line bg-panel-raised hover:bg-danger/15 hover:border-danger/40 hover:text-danger text-text-main transition-colors focus-visible:ring-2 focus-visible:ring-danger/50",title:h("logout"),"aria-label":"Sign out",children:o.jsx(Cv,{size:18,className:"rtl:-scale-x-100 transition-transform"})})})]})]})};function bb(i){var r,u,c="";if(typeof i=="string"||typeof i=="number")c+=i;else if(typeof i=="object")if(Array.isArray(i)){var d=i.length;for(r=0;r<d;r++)i[r]&&(u=bb(i[r]))&&(c&&(c+=" "),c+=u)}else for(u in i)i[u]&&(c&&(c+=" "),c+=u);return c}function Yv(){for(var i,r,u=0,c="",d=arguments.length;u<d;u++)(i=arguments[u])&&(r=bb(i))&&(c&&(c+=" "),c+=r);return c}const Qv=(i,r)=>{const u=new Array(i.length+r.length);for(let c=0;c<i.length;c++)u[c]=i[c];for(let c=0;c<r.length;c++)u[i.length+c]=r[c];return u},Xv=(i,r)=>({classGroupId:i,validator:r}),yb=(i=new Map,r=null,u)=>({nextPart:i,validators:r,classGroupId:u}),Yr="-",wg=[],Kv="arbitrary..",Zv=i=>{const r=Iv(i),{conflictingClassGroups:u,conflictingClassGroupModifiers:c}=i;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return Jv(p);const g=p.split(Yr),b=g[0]===""&&g.length>1?1:0;return vb(g,b,r)},getConflictingClassGroupIds:(p,g)=>{if(g){const b=c[p],E=u[p];return b?E?Qv(E,b):b:E||wg}return u[p]||wg}}},vb=(i,r,u)=>{if(i.length-r===0)return u.classGroupId;const d=i[r],h=u.nextPart.get(d);if(h){const E=vb(i,r+1,h);if(E)return E}const p=u.validators;if(p===null)return;const g=r===0?i.join(Yr):i.slice(r).join(Yr),b=p.length;for(let E=0;E<b;E++){const v=p[E];if(v.validator(g))return v.classGroupId}},Jv=i=>i.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=i.slice(1,-1),u=r.indexOf(":"),c=r.slice(0,u);return c?Kv+c:void 0})(),Iv=i=>{const{theme:r,classGroups:u}=i;return Pv(u,r)},Pv=(i,r)=>{const u=yb();for(const c in i){const d=i[c];zd(d,u,c,r)}return u},zd=(i,r,u,c)=>{const d=i.length;for(let h=0;h<d;h++){const p=i[h];Fv(p,r,u,c)}},Fv=(i,r,u,c)=>{if(typeof i=="string"){$v(i,r,u);return}if(typeof i=="function"){Wv(i,r,u,c);return}e2(i,r,u,c)},$v=(i,r,u)=>{const c=i===""?r:Nb(r,i);c.classGroupId=u},Wv=(i,r,u,c)=>{if(t2(i)){zd(i(c),r,u,c);return}r.validators===null&&(r.validators=[]),r.validators.push(Xv(u,i))},e2=(i,r,u,c)=>{const d=Object.entries(i),h=d.length;for(let p=0;p<h;p++){const[g,b]=d[p];zd(b,Nb(r,g),u,c)}},Nb=(i,r)=>{let u=i;const c=r.split(Yr),d=c.length;for(let h=0;h<d;h++){const p=c[h];let g=u.nextPart.get(p);g||(g=yb(),u.nextPart.set(p,g)),u=g}return u},t2=i=>"isThemeGetter"in i&&i.isThemeGetter===!0,n2=i=>{if(i<1)return{get:()=>{},set:()=>{}};let r=0,u=Object.create(null),c=Object.create(null);const d=(h,p)=>{u[h]=p,r++,r>i&&(r=0,c=u,u=Object.create(null))};return{get(h){let p=u[h];if(p!==void 0)return p;if((p=c[h])!==void 0)return d(h,p),p},set(h,p){h in u?u[h]=p:d(h,p)}}},Nd="!",Sg=":",l2=[],jg=(i,r,u,c,d)=>({modifiers:i,hasImportantModifier:r,baseClassName:u,maybePostfixModifierPosition:c,isExternal:d}),a2=i=>{const{prefix:r,experimentalParseClassName:u}=i;let c=d=>{const h=[];let p=0,g=0,b=0,E;const v=d.length;for(let D=0;D<v;D++){const B=d[D];if(p===0&&g===0){if(B===Sg){h.push(d.slice(b,D)),b=D+1;continue}if(B==="/"){E=D;continue}}B==="["?p++:B==="]"?p--:B==="("?g++:B===")"&&g--}const x=h.length===0?d:d.slice(b);let C=x,U=!1;x.endsWith(Nd)?(C=x.slice(0,-1),U=!0):x.startsWith(Nd)&&(C=x.slice(1),U=!0);const Z=E&&E>b?E-b:void 0;return jg(h,U,C,Z)};if(r){const d=r+Sg,h=c;c=p=>p.startsWith(d)?h(p.slice(d.length)):jg(l2,!1,p,void 0,!0)}if(u){const d=c;c=h=>u({className:h,parseClassName:d})}return c},i2=i=>{const r=new Map;return i.orderSensitiveModifiers.forEach((u,c)=>{r.set(u,1e6+c)}),u=>{const c=[];let d=[];for(let h=0;h<u.length;h++){const p=u[h],g=p[0]==="[",b=r.has(p);g||b?(d.length>0&&(d.sort(),c.push(...d),d=[]),c.push(p)):d.push(p)}return d.length>0&&(d.sort(),c.push(...d)),c}},s2=i=>({cache:n2(i.cacheSize),parseClassName:a2(i),sortModifiers:i2(i),postfixLookupClassGroupIds:r2(i),...Zv(i)}),r2=i=>{const r=Object.create(null),u=i.postfixLookupClassGroups;if(u)for(let c=0;c<u.length;c++)r[u[c]]=!0;return r},o2=/\s+/,c2=(i,r)=>{const{parseClassName:u,getClassGroupId:c,getConflictingClassGroupIds:d,sortModifiers:h,postfixLookupClassGroupIds:p}=r,g=[],b=i.trim().split(o2);let E="";for(let v=b.length-1;v>=0;v-=1){const x=b[v],{isExternal:C,modifiers:U,hasImportantModifier:Z,baseClassName:D,maybePostfixModifierPosition:B}=u(x);if(C){E=x+(E.length>0?" "+E:E);continue}let G=!!B,X;if(G){const Y=D.substring(0,B);X=c(Y);const R=X&&p[X]?c(D):void 0;R&&R!==X&&(X=R,G=!1)}else X=c(D);if(!X){if(!G){E=x+(E.length>0?" "+E:E);continue}if(X=c(D),!X){E=x+(E.length>0?" "+E:E);continue}G=!1}const le=U.length===0?"":U.length===1?U[0]:h(U).join(":"),W=Z?le+Nd:le,me=W+X;if(g.indexOf(me)>-1)continue;g.push(me);const J=d(X,G);for(let Y=0;Y<J.length;++Y){const R=J[Y];g.push(W+R)}E=x+(E.length>0?" "+E:E)}return E},u2=(...i)=>{let r=0,u,c,d="";for(;r<i.length;)(u=i[r++])&&(c=wb(u))&&(d&&(d+=" "),d+=c);return d},wb=i=>{if(typeof i=="string")return i;let r,u="";for(let c=0;c<i.length;c++)i[c]&&(r=wb(i[c]))&&(u&&(u+=" "),u+=r);return u},d2=(i,...r)=>{let u,c,d,h;const p=b=>{const E=r.reduce((v,x)=>x(v),i());return u=s2(E),c=u.cache.get,d=u.cache.set,h=g,g(b)},g=b=>{const E=c(b);if(E)return E;const v=c2(b,u);return d(b,v),v};return h=p,(...b)=>h(u2(...b))},f2=[],ct=i=>{const r=u=>u[i]||f2;return r.isThemeGetter=!0,r.themeKey=i,r},Sb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,h2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,m2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,g2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,x2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,b2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pl=i=>h2.test(i),Ce=i=>!!i&&!Number.isNaN(Number(i)),yn=i=>!!i&&Number.isInteger(Number(i)),Vu=i=>i.endsWith("%")&&Ce(i.slice(0,-1)),qn=i=>m2.test(i),_b=()=>!0,y2=i=>p2.test(i)&&!g2.test(i),Md=()=>!1,v2=i=>x2.test(i),N2=i=>b2.test(i),w2=i=>!ue(i)&&!de(i),S2=i=>i.startsWith("@container")&&(i[10]==="/"&&i[11]!==void 0||i[11]==="s"&&i[16]!==void 0&&i.startsWith("-size/",10)||i[11]==="n"&&i[18]!==void 0&&i.startsWith("-normal/",10)),j2=i=>bl(i,Cb,Md),ue=i=>Sb.test(i),Ql=i=>bl(i,Eb,y2),_g=i=>bl(i,O2,Ce),_2=i=>bl(i,Mb,_b),A2=i=>bl(i,zb,Md),Ag=i=>bl(i,Ab,Md),T2=i=>bl(i,Tb,N2),Ar=i=>bl(i,Ob,v2),de=i=>jb.test(i),Gi=i=>Kl(i,Eb),C2=i=>Kl(i,zb),Tg=i=>Kl(i,Ab),E2=i=>Kl(i,Cb),z2=i=>Kl(i,Tb),Tr=i=>Kl(i,Ob,!0),M2=i=>Kl(i,Mb,!0),bl=(i,r,u)=>{const c=Sb.exec(i);return c?c[1]?r(c[1]):u(c[2]):!1},Kl=(i,r,u=!1)=>{const c=jb.exec(i);return c?c[1]?r(c[1]):u:!1},Ab=i=>i==="position"||i==="percentage",Tb=i=>i==="image"||i==="url",Cb=i=>i==="length"||i==="size"||i==="bg-size",Eb=i=>i==="length",O2=i=>i==="number",zb=i=>i==="family-name",Mb=i=>i==="number"||i==="weight",Ob=i=>i==="shadow",k2=()=>{const i=ct("color"),r=ct("font"),u=ct("text"),c=ct("font-weight"),d=ct("tracking"),h=ct("leading"),p=ct("breakpoint"),g=ct("container"),b=ct("spacing"),E=ct("radius"),v=ct("shadow"),x=ct("inset-shadow"),C=ct("text-shadow"),U=ct("drop-shadow"),Z=ct("blur"),D=ct("perspective"),B=ct("aspect"),G=ct("ease"),X=ct("animate"),le=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],me=()=>[...W(),de,ue],J=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],R=()=>[de,ue,b],I=()=>[pl,"full","auto",...R()],ie=()=>[yn,"none","subgrid",de,ue],$=()=>["auto",{span:["full",yn,de,ue]},yn,de,ue],te=()=>[yn,"auto",de,ue],Q=()=>["auto","min","max","fr",de,ue],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...R()],F=()=>[pl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],M=()=>[g,pl,"screen","full","dvw","lvw","svw","min","max","fit",...R()],se=()=>[pl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],V=()=>[i,de,ue],Me=()=>[...W(),Tg,Ag,{position:[de,ue]}],Ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ge=()=>["auto","cover","contain",E2,j2,{size:[de,ue]}],N=()=>[Vu,Gi,Ql],S=()=>["","none","full",E,de,ue],P=()=>["",Ce,Gi,Ql],ne=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Ce,Vu,Tg,Ag],Se=()=>["","none",Z,de,ue],oe=()=>["none",Ce,de,ue],be=()=>["none",Ce,de,ue],L=()=>[Ce,de,ue],je=()=>[pl,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qn],breakpoint:[qn],color:[_b],container:[qn],"drop-shadow":[qn],ease:["in","out","in-out"],font:[w2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qn],shadow:[qn],spacing:["px",Ce],text:[qn],"text-shadow":[qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",pl,ue,de,B]}],container:["container"],"container-type":[{"@container":["","normal","size",de,ue]}],"container-named":[S2],columns:[{columns:[Ce,"auto",ue,de,g]}],"break-after":[{"break-after":le()}],"break-before":[{"break-before":le()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:me()}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[yn,"auto",de,ue]}],basis:[{basis:[pl,"full","auto",g,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,pl,"auto","initial","none",ue]}],grow:[{grow:["",Ce,de,ue]}],shrink:[{shrink:["",Ce,de,ue]}],order:[{order:[yn,"first","last","none",de,ue]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...M()]}],"min-inline-size":[{"min-inline":["auto",...M()]}],"max-inline-size":[{"max-inline":["none",...M()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[g,"screen",...F()]}],"min-w":[{"min-w":[g,"screen","none",...F()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[p]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh","none",...F()]}],"font-size":[{text:["base",u,Gi,Ql]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,M2,_2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vu,ue]}],"font-family":[{font:[C2,A2,r]}],"font-features":[{"font-features":[ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,de,ue]}],"line-clamp":[{"line-clamp":[Ce,"none",de,_g]}],leading:[{leading:["none",h,...R()]}],"list-image":[{"list-image":["none",de,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",de,Ql]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ce,"auto",de,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[yn,de,ue]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",de,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Me()}],"bg-repeat":[{bg:Ue()}],"bg-size":[{bg:Ge()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yn,de,ue],radial:["",de,ue],conic:["",yn,de,ue]},z2,T2]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:S()}],"rounded-s":[{"rounded-s":S()}],"rounded-e":[{"rounded-e":S()}],"rounded-t":[{"rounded-t":S()}],"rounded-r":[{"rounded-r":S()}],"rounded-b":[{"rounded-b":S()}],"rounded-l":[{"rounded-l":S()}],"rounded-ss":[{"rounded-ss":S()}],"rounded-se":[{"rounded-se":S()}],"rounded-ee":[{"rounded-ee":S()}],"rounded-es":[{"rounded-es":S()}],"rounded-tl":[{"rounded-tl":S()}],"rounded-tr":[{"rounded-tr":S()}],"rounded-br":[{"rounded-br":S()}],"rounded-bl":[{"rounded-bl":S()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-bs":[{"border-bs":P()}],"border-w-be":[{"border-be":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-bs":[{"border-bs":V()}],"border-color-be":[{"border-be":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,de,ue]}],"outline-w":[{outline:["",Ce,Gi,Ql]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","inner","none",v,Tr,Ar]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",x,Tr,Ar]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ce,Ql]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",C,Tr,Ar]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ce,de,ue]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[de,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Me()}],"mask-repeat":[{mask:Ue()}],"mask-size":[{mask:Ge()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ue]}],filter:[{filter:["","none",de,ue]}],blur:[{blur:Se()}],brightness:[{brightness:[Ce,de,ue]}],contrast:[{contrast:[Ce,de,ue]}],"drop-shadow":[{"drop-shadow":["","none",U,Tr,Ar]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ce,de,ue]}],"hue-rotate":[{"hue-rotate":[Ce,de,ue]}],invert:[{invert:["",Ce,de,ue]}],saturate:[{saturate:[Ce,de,ue]}],sepia:[{sepia:["",Ce,de,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ue]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,de,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,de,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,de,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,de,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ce,de,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,de,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,de,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,de,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",de,ue]}],ease:[{ease:["linear","initial",G,de,ue]}],delay:[{delay:[Ce,de,ue]}],animate:[{animate:["none",X,de,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[D,de,ue]}],"perspective-origin":[{"perspective-origin":me()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[de,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:me()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],zoom:[{zoom:[yn,de,ue]}],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",de,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":V()}],"scrollbar-track-color":[{"scrollbar-track":V()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de,ue]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ce,Gi,Ql,_g]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},R2=d2(k2);function Nn(...i){return R2(Yv(i))}const D2=({currentView:i,onSelectView:r,isOpenMobile:u,onCloseMobile:c})=>{const{t:d}=rn(),h=window.__BRAND__||{name:"Levix",tagline:"Private control room",version:"",developer:"Abdelrhman Diab",studio:"Leviro",developerSite:"https://github.com/Abdodiab2005",studioSite:"https://leviro.net"},p=[{id:"overview",label:d("overview"),icon:Av},{id:"connection",label:d("connection"),icon:Ki},{labelCategory:d("control")},{id:"commands",label:d("commands"),icon:Va},{id:"ai",label:d("ai"),icon:Ed},{id:"groups",label:d("groups"),icon:Ga},{id:"schedules",label:d("schedules"),icon:bd},{labelCategory:d("settings")},{id:"settings",label:d("settings"),icon:Dv},{id:"logs",label:d("logs"),icon:Mr}];return o.jsxs(o.Fragment,{children:[u&&o.jsx("button",{type:"button",className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden border-0 p-0 cursor-default",onClick:c,"aria-label":"Close mobile sidebar backdrop"}),o.jsxs("aside",{className:Nn("fixed top-0 bottom-0 start-0 z-50 w-72 md:w-64 md:static md:z-auto bg-panel border-e border-line flex flex-col transition-transform duration-200 ease-out",u?"translate-x-0":"max-md:-translate-x-full rtl:max-md:translate-x-full"),"aria-label":"Main Navigation",children:[o.jsxs("div",{className:"p-4 flex items-center justify-between border-b border-line",children:[o.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-brand-blue via-brand-blue to-brand-cyan flex items-center justify-center shadow-md shadow-brand-blue/20 shrink-0 text-white",children:o.jsx(Hv,{size:20})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"font-extrabold text-base text-text-main leading-tight tracking-tight truncate",children:h.name}),o.jsx("div",{className:"text-xs text-muted leading-none truncate mt-0.5",children:h.tagline})]})]}),o.jsx("button",{type:"button",onClick:c,className:"inline-flex md:hidden items-center justify-center w-10 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main transition-colors shrink-0","aria-label":"Close menu",children:o.jsx(Ji,{size:18})})]}),o.jsx("nav",{className:"flex-1 overflow-y-auto p-3 space-y-1",children:p.map(g=>{if(g.labelCategory)return o.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] font-bold uppercase tracking-wider text-faint",children:g.labelCategory},`cat-${g.labelCategory}`);if(!g.icon)return null;const b=g.icon,E=i===g.id;return o.jsxs("button",{type:"button",onClick:()=>{g.id&&(r(g.id),c())},className:Nn("w-full flex items-center gap-3 px-3.5 py-2.5 rounded-xl font-medium text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 text-start min-h-[44px]",E?"bg-brand-blue text-white shadow-md shadow-brand-blue/25 font-bold":"text-muted hover:bg-panel-hover hover:text-text-main"),children:[o.jsx(b,{size:20,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:g.label})]},g.id)})}),o.jsxs("div",{className:"p-4 border-t border-line text-xs text-faint flex flex-col gap-2.5",children:[o.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted",children:[o.jsx("span",{className:"font-mono",children:h.version?`v${h.version}`:""}),o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Wx,{size:14,className:"text-brand-cyan"})," Local-first"]})]}),o.jsxs("div",{className:"text-[11px] text-muted truncate",children:["© ",h.copyrightYear||2026," ",o.jsx("a",{href:h.developerSite||"#",target:"_blank",rel:"noopener noreferrer",className:"text-brand-cyan hover:underline",children:h.developer})," ","(",o.jsx("a",{href:h.studioSite||"#",target:"_blank",rel:"noopener noreferrer",className:"text-brand-cyan hover:underline",children:h.studio}),")"]})]})]})]})},kb=K.createContext(null),B2=({children:i})=>{const[r,u]=K.useState([]),c=K.useCallback(h=>{u(p=>p.filter(g=>g.id!==h))},[]),d=K.useCallback((h,p="info",g=4e3)=>{const b=Math.random().toString(36).slice(2,9);u(E=>[...E,{id:b,message:h,type:p,duration:g}]),setTimeout(()=>c(b),g)},[c]);return o.jsxs(kb.Provider,{value:{toast:d},children:[i,o.jsx("div",{className:"fixed bottom-5 end-5 z-50 flex flex-col gap-2.5 max-w-sm w-full px-4 pointer-events-none","aria-live":"polite",children:r.map(h=>o.jsxs("div",{className:`pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-xl border bg-panel-raised/95 backdrop-blur-md shadow-xl text-xs md:text-sm text-text-main transition-all ${h.type==="success"?"border-ok/35":h.type==="error"?"border-danger/35":h.type==="warning"?"border-warn/35":"border-line"}`,children:[h.type==="success"&&o.jsx(Qr,{size:18,className:"text-ok shrink-0"}),h.type==="error"&&o.jsx(yv,{size:18,className:"text-danger shrink-0"}),h.type==="warning"&&o.jsx(Or,{size:18,className:"text-warn shrink-0"}),h.type==="info"&&o.jsx(_v,{size:18,className:"text-info shrink-0"}),o.jsx("span",{className:"flex-1 font-medium",children:h.message}),o.jsx("button",{type:"button",onClick:()=>c(h.id),className:"inline-flex items-center justify-center w-6 h-6 rounded-lg text-muted hover:text-text-main hover:bg-panel-hover transition-colors shrink-0","aria-label":"Dismiss notification",children:o.jsx(Ji,{size:14})})]},h.id))})]})},yl=()=>{const i=K.useContext(kb);if(!i)throw new Error("useToast must be used within a ToastProvider");return i},Sn=Object.create(null);Sn.open="0";Sn.close="1";Sn.ping="2";Sn.pong="3";Sn.message="4";Sn.upgrade="5";Sn.noop="6";const kr=Object.create(null);Object.keys(Sn).forEach(i=>{kr[Sn[i]]=i});const wd={type:"error",data:"parser error"},Rb=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Db=typeof ArrayBuffer=="function",Bb=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,Od=({type:i,data:r},u,c)=>Rb&&r instanceof Blob?u?c(r):Cg(r,c):Db&&(r instanceof ArrayBuffer||Bb(r))?u?c(r):Cg(new Blob([r]),c):c(Sn[i]+(r||"")),Cg=(i,r)=>{const u=new FileReader;return u.onload=function(){const c=u.result.split(",")[1];r("b"+(c||""))},u.readAsDataURL(i)};function Eg(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let Yu;function U2(i,r){if(Rb&&i.data instanceof Blob)return i.data.arrayBuffer().then(Eg).then(r);if(Db&&(i.data instanceof ArrayBuffer||Bb(i.data)))return r(Eg(i.data));Od(i,!1,u=>{Yu||(Yu=new TextEncoder),r(Yu.encode(u))})}const zg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<zg.length;i++)Xi[zg.charCodeAt(i)]=i;const L2=i=>{let r=i.length*.75,u=i.length,c,d=0,h,p,g,b;i[i.length-1]==="="&&(r--,i[i.length-2]==="="&&r--);const E=new ArrayBuffer(r),v=new Uint8Array(E);for(c=0;c<u;c+=4)h=Xi[i.charCodeAt(c)],p=Xi[i.charCodeAt(c+1)],g=Xi[i.charCodeAt(c+2)],b=Xi[i.charCodeAt(c+3)],v[d++]=h<<2|p>>4,v[d++]=(p&15)<<4|g>>2,v[d++]=(g&3)<<6|b&63;return E},q2=typeof ArrayBuffer=="function",kd=(i,r)=>{if(typeof i!="string")return{type:"message",data:Ub(i,r)};const u=i.charAt(0);return u==="b"?{type:"message",data:H2(i.substring(1),r)}:kr[u]?i.length>1?{type:kr[u],data:i.substring(1)}:{type:kr[u]}:wd},H2=(i,r)=>{if(q2){const u=L2(i);return Ub(u,r)}else return{base64:!0,data:i}},Ub=(i,r)=>{switch(r){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},Lb="",G2=(i,r)=>{const u=i.length,c=new Array(u);let d=0;i.forEach((h,p)=>{Od(h,!1,g=>{c[p]=g,++d===u&&r(c.join(Lb))})})},V2=(i,r)=>{const u=i.split(Lb),c=[];for(let d=0;d<u.length;d++){const h=kd(u[d],r);if(c.push(h),h.type==="error")break}return c};function Y2(){return new TransformStream({transform(i,r){U2(i,u=>{const c=u.length;let d;if(c<126)d=new Uint8Array(1),new DataView(d.buffer).setUint8(0,c);else if(c<65536){d=new Uint8Array(3);const h=new DataView(d.buffer);h.setUint8(0,126),h.setUint16(1,c)}else{d=new Uint8Array(9);const h=new DataView(d.buffer);h.setUint8(0,127),h.setBigUint64(1,BigInt(c))}i.data&&typeof i.data!="string"&&(d[0]|=128),r.enqueue(d),r.enqueue(u)})}})}let Qu;function Cr(i){return i.reduce((r,u)=>r+u.length,0)}function Er(i,r){if(i[0].length===r)return i.shift();const u=new Uint8Array(r);let c=0;for(let d=0;d<r;d++)u[d]=i[0][c++],c===i[0].length&&(i.shift(),c=0);return i.length&&c<i[0].length&&(i[0]=i[0].slice(c)),u}function Q2(i,r){Qu||(Qu=new TextDecoder);const u=[];let c=0,d=-1,h=!1;return new TransformStream({transform(p,g){for(u.push(p);;){if(c===0){if(Cr(u)<1)break;const b=Er(u,1);h=(b[0]&128)===128,d=b[0]&127,d<126?c=3:d===126?c=1:c=2}else if(c===1){if(Cr(u)<2)break;const b=Er(u,2);d=new DataView(b.buffer,b.byteOffset,b.length).getUint16(0),c=3}else if(c===2){if(Cr(u)<8)break;const b=Er(u,8),E=new DataView(b.buffer,b.byteOffset,b.length),v=E.getUint32(0);if(v>Math.pow(2,21)-1){g.enqueue(wd);break}d=v*Math.pow(2,32)+E.getUint32(4),c=3}else{if(Cr(u)<d)break;const b=Er(u,d);g.enqueue(kd(h?b:Qu.decode(b),r)),c=0}if(d===0||d>i){g.enqueue(wd);break}}}})}const qb=4;function rt(i){if(i)return X2(i)}function X2(i){for(var r in rt.prototype)i[r]=rt.prototype[r];return i}rt.prototype.on=rt.prototype.addEventListener=function(i,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(r),this};rt.prototype.once=function(i,r){function u(){this.off(i,u),r.apply(this,arguments)}return u.fn=r,this.on(i,u),this};rt.prototype.off=rt.prototype.removeListener=rt.prototype.removeAllListeners=rt.prototype.removeEventListener=function(i,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var u=this._callbacks["$"+i];if(!u)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var c,d=0;d<u.length;d++)if(c=u[d],c===r||c.fn===r){u.splice(d,1);break}return u.length===0&&delete this._callbacks["$"+i],this};rt.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),u=this._callbacks["$"+i],c=1;c<arguments.length;c++)r[c-1]=arguments[c];if(u){u=u.slice(0);for(var c=0,d=u.length;c<d;++c)u[c].apply(this,r)}return this};rt.prototype.emitReserved=rt.prototype.emit;rt.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};rt.prototype.hasListeners=function(i){return!!this.listeners(i).length};const Xr=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,u)=>u(r,0),$t=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),K2="arraybuffer";function Hb(i,...r){return r.reduce((u,c)=>(i.hasOwnProperty(c)&&(u[c]=i[c]),u),{})}const Z2=$t.setTimeout,J2=$t.clearTimeout;function Kr(i,r){r.useNativeTimers?(i.setTimeoutFn=Z2.bind($t),i.clearTimeoutFn=J2.bind($t)):(i.setTimeoutFn=$t.setTimeout.bind($t),i.clearTimeoutFn=$t.clearTimeout.bind($t))}const I2=1.33;function P2(i){return typeof i=="string"?F2(i):Math.ceil((i.byteLength||i.size)*I2)}function F2(i){let r=0,u=0;for(let c=0,d=i.length;c<d;c++)r=i.charCodeAt(c),r<128?u+=1:r<2048?u+=2:r<55296||r>=57344?u+=3:(c++,u+=4);return u}function Gb(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $2(i){let r="";for(let u in i)i.hasOwnProperty(u)&&(r.length&&(r+="&"),r+=encodeURIComponent(u)+"="+encodeURIComponent(i[u]));return r}function W2(i){let r={},u=i.split("&");for(let c=0,d=u.length;c<d;c++){let h=u[c].split("=");r[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return r}class eN extends Error{constructor(r,u,c){super(r),this.description=u,this.context=c,this.type="TransportError"}}class Rd extends rt{constructor(r){super(),this.writable=!1,Kr(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,u,c){return super.emitReserved("error",new eN(r,u,c)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const u=kd(r,this.socket.binaryType);this.onPacket(u)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,u={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(u)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const u=$2(r);return u.length?"?"+u:""}}class tN extends Rd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const u=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let c=0;this._polling&&(c++,this.once("pollComplete",function(){--c||u()})),this.writable||(c++,this.once("drain",function(){--c||u()}))}else u()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const u=c=>{if(this.readyState==="opening"&&c.type==="open"&&this.onOpen(),c.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(c)};V2(r,this.socket.binaryType).forEach(u),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,G2(r,u=>{this.doWrite(u,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",u=this.query||{};return this.opts.timestampRequests!==!1&&(u[this.opts.timestampParam]=Gb()),!this.supportsBinary&&!u.sid&&(u.b64=1),this.createUri(r,u)}}let Vb=!1;try{Vb=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nN=Vb;function lN(){}class aN extends tN{constructor(r){if(super(r),typeof location<"u"){const u=location.protocol==="https:";let c=location.port;c||(c=u?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||c!==r.port}}doWrite(r,u){const c=this.request({method:"POST",data:r});c.on("success",u),c.on("error",(d,h)=>{this.onError("xhr post error",d,h)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(u,c)=>{this.onError("xhr poll error",u,c)}),this.pollXhr=r}}class wn extends rt{constructor(r,u,c){super(),this.createRequest=r,Kr(this,c),this._opts=c,this._method=c.method||"GET",this._uri=u,this._data=c.data!==void 0?c.data:null,this._create()}_create(){var r;const u=Hb(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");u.xdomain=!!this._opts.xd;const c=this._xhr=this.createRequest(u);try{c.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){c.setDisableHeaderCheck&&c.setDisableHeaderCheck(!0);for(let d in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(d)&&c.setRequestHeader(d,this._opts.extraHeaders[d])}}catch{}if(this._method==="POST")try{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{c.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(c),"withCredentials"in c&&(c.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(c.timeout=this._opts.requestTimeout),c.onreadystatechange=()=>{var d;c.readyState===3&&((d=this._opts.cookieJar)===null||d===void 0||d.parseCookies(c.getResponseHeader("set-cookie"))),c.readyState===4&&(c.status===200||c.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof c.status=="number"?c.status:0)},0))},c.send(this._data)}catch(d){this.setTimeoutFn(()=>{this._onError(d)},0);return}typeof document<"u"&&(this._index=wn.requestsCount++,wn.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=lN,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wn.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wn.requestsCount=0;wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Mg);else if(typeof addEventListener=="function"){const i="onpagehide"in $t?"pagehide":"unload";addEventListener(i,Mg,!1)}}function Mg(){for(let i in wn.requests)wn.requests.hasOwnProperty(i)&&wn.requests[i].abort()}const iN=(function(){const i=Yb({xdomain:!1});return i&&i.responseType!==null})();class sN extends aN{constructor(r){super(r);const u=r&&r.forceBase64;this.supportsBinary=iN&&!u}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new wn(Yb,this.uri(),r)}}function Yb(i){const r=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||nN))return new XMLHttpRequest}catch{}if(!r)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Qb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class rN extends Rd{get name(){return"websocket"}doOpen(){const r=this.uri(),u=this.opts.protocols,c=Qb?{}:Hb(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,u,c)}catch(d){return this.emitReserved("error",d)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let u=0;u<r.length;u++){const c=r[u],d=u===r.length-1;Od(c,this.supportsBinary,h=>{try{this.doWrite(c,h)}catch{}d&&Xr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",u=this.query||{};return this.opts.timestampRequests&&(u[this.opts.timestampParam]=Gb()),this.supportsBinary||(u.b64=1),this.createUri(r,u)}}const Xu=$t.WebSocket||$t.MozWebSocket;class oN extends rN{createSocket(r,u,c){return Qb?new Xu(r,u,c):u?new Xu(r,u):new Xu(r)}doWrite(r,u){this.ws.send(u)}}class cN extends Rd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const u=Q2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=r.readable.pipeThrough(u).getReader(),d=Y2();d.readable.pipeTo(r.writable),this._writer=d.writable.getWriter();const h=()=>{c.read().then(({done:g,value:b})=>{g||(this.onPacket(b),h())}).catch(g=>{})};h();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let u=0;u<r.length;u++){const c=r[u],d=u===r.length-1;this._writer.write(c).then(()=>{d&&Xr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const uN={websocket:oN,webtransport:cN,polling:sN},dN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sd(i){if(i.length>8e3)throw"URI too long";const r=i,u=i.indexOf("["),c=i.indexOf("]");u!=-1&&c!=-1&&(i=i.substring(0,u)+i.substring(u,c).replace(/:/g,";")+i.substring(c,i.length));let d=dN.exec(i||""),h={},p=14;for(;p--;)h[fN[p]]=d[p]||"";return u!=-1&&c!=-1&&(h.source=r,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=hN(h,h.path),h.queryKey=mN(h,h.query),h}function hN(i,r){const u=/\/{2,9}/g,c=r.replace(u,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&c.splice(0,1),r.slice(-1)=="/"&&c.splice(c.length-1,1),c}function mN(i,r){const u={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,h){d&&(u[d]=h)}),u}const jd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Rr=[];jd&&addEventListener("offline",()=>{Rr.forEach(i=>i())},!1);class xl extends rt{constructor(r,u){if(super(),this.binaryType=K2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(u=r,r=null),r){const c=Sd(r);u.hostname=c.host,u.secure=c.protocol==="https"||c.protocol==="wss",u.port=c.port,c.query&&(u.query=c.query)}else u.host&&(u.hostname=Sd(u.host).host);Kr(this,u),this.secure=u.secure!=null?u.secure:typeof location<"u"&&location.protocol==="https:",u.hostname&&!u.port&&(u.port=this.secure?"443":"80"),this.hostname=u.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=u.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},u.transports.forEach(c=>{const d=c.prototype.name;this.transports.push(d),this._transportsByName[d]=c}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},u),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=W2(this.opts.query)),jd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Rr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const u=Object.assign({},this.opts.query);u.EIO=qb,u.transport=r,this.id&&(u.sid=this.id);const c=Object.assign({},this.opts,{query:u,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](c)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&xl.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const u=this.createTransport(r);u.open(),this.setTransport(u)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",u=>this._onClose("transport close",u))}onOpen(){this.readyState="open",xl.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const u=new Error("server error");u.code=r.data,this._onError(u);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let u=1;for(let c=0;c<this.writeBuffer.length;c++){const d=this.writeBuffer[c].data;if(d&&(u+=P2(d)),c>0&&u>this._maxPayload)return this.writeBuffer.slice(0,c);u+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,Xr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,u,c){return this._sendPacket("message",r,u,c),this}send(r,u,c){return this._sendPacket("message",r,u,c),this}_sendPacket(r,u,c,d){if(typeof u=="function"&&(d=u,u=void 0),typeof c=="function"&&(d=c,c=null),this.readyState==="closing"||this.readyState==="closed")return;c=c||{},c.compress=c.compress!==!1;const h={type:r,data:u,options:c};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),d&&this.once("flush",d),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},u=()=>{this.off("upgrade",u),this.off("upgradeError",u),r()},c=()=>{this.once("upgrade",u),this.once("upgradeError",u)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():r()}):this.upgrading?c():r()),this}_onError(r){if(xl.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,u){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),jd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const c=Rr.indexOf(this._offlineEventListener);c!==-1&&Rr.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,u),this.writeBuffer=[],this._prevBufferLen=0}}}xl.protocol=qb;class pN extends xl{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let u=this.createTransport(r),c=!1;xl.priorWebsocketSuccess=!1;const d=()=>{c||(u.send([{type:"ping",data:"probe"}]),u.once("packet",x=>{if(!c)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",u),!u)return;xl.priorWebsocketSuccess=u.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(v(),this.setTransport(u),u.send([{type:"upgrade"}]),this.emitReserved("upgrade",u),u=null,this.upgrading=!1,this.flush())})}else{const C=new Error("probe error");C.transport=u.name,this.emitReserved("upgradeError",C)}}))};function h(){c||(c=!0,v(),u.close(),u=null)}const p=x=>{const C=new Error("probe error: "+x);C.transport=u.name,h(),this.emitReserved("upgradeError",C)};function g(){p("transport closed")}function b(){p("socket closed")}function E(x){u&&x.name!==u.name&&h()}const v=()=>{u.removeListener("open",d),u.removeListener("error",p),u.removeListener("close",g),this.off("close",b),this.off("upgrading",E)};u.once("open",d),u.once("error",p),u.once("close",g),this.once("close",b),this.once("upgrading",E),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{c||u.open()},200):u.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const u=[];for(let c=0;c<r.length;c++)~this.transports.indexOf(r[c])&&u.push(r[c]);return u}}let gN=class extends pN{constructor(r,u={}){const c=typeof r=="object",d=c?{...r}:{...u};(!d.transports||d.transports&&typeof d.transports[0]=="string")&&(d.transports=(d.transports||["polling","websocket","webtransport"]).map(h=>uN[h]).filter(h=>!!h)),super(c?d:r,d)}};function xN(i,r="",u){let c=i;u=u||typeof location<"u"&&location,i==null&&(i=u.protocol+"//"+u.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=u.protocol+i:i=u.host+i),/^(https?|wss?):\/\//.test(i)||(typeof u<"u"?i=u.protocol+"//"+i:i="https://"+i),c=Sd(i)),c.port||(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";const h=c.host.indexOf(":")!==-1?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+h+":"+c.port+r,c.href=c.protocol+"://"+h+(u&&u.port===c.port?"":":"+c.port),c}const bN=typeof ArrayBuffer=="function",yN=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,Xb=Object.prototype.toString,vN=typeof Blob=="function"||typeof Blob<"u"&&Xb.call(Blob)==="[object BlobConstructor]",NN=typeof File=="function"||typeof File<"u"&&Xb.call(File)==="[object FileConstructor]";function Dd(i){return bN&&(i instanceof ArrayBuffer||yN(i))||vN&&i instanceof Blob||NN&&i instanceof File}function Dr(i,r){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let u=0,c=i.length;u<c;u++)if(Dr(i[u]))return!0;return!1}if(Dd(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return Dr(i.toJSON(),!0);for(const u in i)if(Object.prototype.hasOwnProperty.call(i,u)&&Dr(i[u]))return!0;return!1}function wN(i){const r=[],u=i.data,c=i;return c.data=Br(u,r),c.attachments=r.length,{packet:c,buffers:r}}function Br(i,r,u){if(!i)return i;if(Dd(i)){const c={_placeholder:!0,num:r.length};return r.push(i),c}else if(Array.isArray(i)){const c=new Array(i.length);for(let d=0;d<i.length;d++)c[d]=Br(i[d],r);return c}else if(typeof i=="object"&&!(i instanceof Date)){if(i.toJSON&&typeof i.toJSON=="function"&&!u)return Br(i.toJSON(),r,!0);const c={};for(const d in i)Object.prototype.hasOwnProperty.call(i,d)&&(c[d]=Br(i[d],r));return c}return i}function SN(i,r){return i.data=_d(i.data,r),delete i.attachments,i}function _d(i,r){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<r.length)return r[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let u=0;u<i.length;u++)i[u]=_d(i[u],r);else if(typeof i=="object")for(const u in i)Object.prototype.hasOwnProperty.call(i,u)&&(i[u]=_d(i[u],r));return i}const jN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Re;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(Re||(Re={}));class _N{constructor(r){this.replacer=r}encode(r){return(r.type===Re.EVENT||r.type===Re.ACK)&&Dr(r)?this.encodeAsBinary({type:r.type===Re.EVENT?Re.BINARY_EVENT:Re.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let u=""+r.type;return(r.type===Re.BINARY_EVENT||r.type===Re.BINARY_ACK)&&(u+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(u+=r.nsp+","),r.id!=null&&(u+=r.id),r.data!=null&&(u+=JSON.stringify(r.data,this.replacer)),u}encodeAsBinary(r){const u=wN(r),c=this.encodeAsString(u.packet),d=u.buffers;return d.unshift(c),d}}class Bd extends rt{constructor(r){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof r=="function"?{reviver:r}:r)}add(r){let u;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");u=this.decodeString(r);const c=u.type===Re.BINARY_EVENT;c||u.type===Re.BINARY_ACK?(u.type=c?Re.EVENT:Re.ACK,this.reconstructor=new AN(u)):super.emitReserved("decoded",u)}else if(Dd(r)||r.base64)if(this.reconstructor)u=this.reconstructor.takeBinaryData(r),u&&(this.reconstructor=null,super.emitReserved("decoded",u));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let u=0;const c={type:Number(r.charAt(0))};if(Re[c.type]===void 0)throw new Error("unknown packet type "+c.type);if(c.type===Re.BINARY_EVENT||c.type===Re.BINARY_ACK){const h=u+1;for(;r.charAt(++u)!=="-"&&u!=r.length;);const p=r.substring(h,u);if(p!=Number(p)||r.charAt(u)!=="-")throw new Error("Illegal attachments");const g=Number(p);if(!TN(g)||g<1)throw new Error("Illegal attachments");if(g>this.opts.maxAttachments)throw new Error("too many attachments");c.attachments=g}if(r.charAt(u+1)==="/"){const h=u+1;for(;++u&&!(r.charAt(u)===","||u===r.length););c.nsp=r.substring(h,u)}else c.nsp="/";const d=r.charAt(u+1);if(d!==""&&Number(d)==d){const h=u+1;for(;++u;){const p=r.charAt(u);if(p==null||Number(p)!=p){--u;break}if(u===r.length)break}c.id=Number(r.substring(h,u+1))}if(r.charAt(++u)){const h=this.tryParse(r.substr(u));if(Bd.isPayloadValid(c.type,h))c.data=h;else throw new Error("invalid payload")}return c}tryParse(r){try{return JSON.parse(r,this.opts.reviver)}catch{return!1}}static isPayloadValid(r,u){switch(r){case Re.CONNECT:return Og(u);case Re.DISCONNECT:return u===void 0;case Re.CONNECT_ERROR:return typeof u=="string"||Og(u);case Re.EVENT:case Re.BINARY_EVENT:return Array.isArray(u)&&(typeof u[0]=="number"||typeof u[0]=="string"&&jN.indexOf(u[0])===-1);case Re.ACK:case Re.BINARY_ACK:return Array.isArray(u)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class AN{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const u=SN(this.reconPack,this.buffers);return this.finishedReconstruction(),u}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const TN=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};function Og(i){return Object.prototype.toString.call(i)==="[object Object]"}const CN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Bd,Encoder:_N,get PacketType(){return Re}},Symbol.toStringTag,{value:"Module"}));function sn(i,r,u){return i.on(r,u),function(){i.off(r,u)}}const EN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Kb extends rt{constructor(r,u,c){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=r,this.nsp=u,c&&c.auth&&(this.auth=c.auth),this._opts=Object.assign({},c),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[sn(r,"open",this.onopen.bind(this)),sn(r,"packet",this.onpacket.bind(this)),sn(r,"error",this.onerror.bind(this)),sn(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...u){var c,d,h;if(EN.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(u.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(u),this;const p={type:Re.EVENT,data:u};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof u[u.length-1]=="function"){const v=this.ids++,x=u.pop();this._registerAckCallback(v,x),p.id=v}const g=(d=(c=this.io.engine)===null||c===void 0?void 0:c.transport)===null||d===void 0?void 0:d.writable,b=this.connected&&!(!((h=this.io.engine)===null||h===void 0)&&h._hasPingExpired());return this.flags.volatile&&!g||(b?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(r,u){var c;const d=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(d===void 0){this.acks[r]=u;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let g=0;g<this.sendBuffer.length;g++)this.sendBuffer[g].id===r&&this.sendBuffer.splice(g,1);u.call(this,new Error("operation has timed out"))},d),p=(...g)=>{this.io.clearTimeoutFn(h),u.apply(this,g)};p.withError=!0,this.acks[r]=p}emitWithAck(r,...u){return new Promise((c,d)=>{const h=(p,g)=>p?d(p):c(g);h.withError=!0,u.push(h),this.emit(r,...u)})}_addToQueue(r){let u;typeof r[r.length-1]=="function"&&(u=r.pop());const c={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((d,...h)=>(this._queue[0],d!==null?c.tryCount>this._opts.retries&&(this._queue.shift(),u&&u(d)):(this._queue.shift(),u&&u(null,...h)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const u=this._queue[0];u.pending&&!r||(u.pending=!0,u.tryCount++,this.flags=u.flags,this.emit.apply(this,u.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,u){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,u),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(c=>String(c.id)===r)){const c=this.acks[r];delete this.acks[r],c.withError&&c.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Re.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Re.EVENT:case Re.BINARY_EVENT:this.onevent(r);break;case Re.ACK:case Re.BINARY_ACK:this.onack(r);break;case Re.DISCONNECT:this.ondisconnect();break;case Re.CONNECT_ERROR:this.destroy();const c=new Error(r.data.message);c.data=r.data.data,this.emitReserved("connect_error",c);break}}onevent(r){const u=r.data||[];r.id!=null&&u.push(this.ack(r.id)),this.connected?this.emitEvent(u):this.receiveBuffer.push(Object.freeze(u))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const u=this._anyListeners.slice();for(const c of u)c.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const u=this;let c=!1;return function(...d){c||(c=!0,u.packet({type:Re.ACK,id:r,data:d}))}}onack(r){const u=this.acks[r.id];typeof u=="function"&&(delete this.acks[r.id],u.withError&&r.data.unshift(null),u.apply(this,r.data))}onconnect(r,u){this.id=r,this.recovered=u&&this._pid===u,this._pid=u,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const u=this._anyListeners;for(let c=0;c<u.length;c++)if(r===u[c])return u.splice(c,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const u=this._anyOutgoingListeners;for(let c=0;c<u.length;c++)if(r===u[c])return u.splice(c,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const u=this._anyOutgoingListeners.slice();for(const c of u)c.apply(this,r.data)}}}function Ya(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}Ya.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),u=Math.floor(r*this.jitter*i);i=(Math.floor(r*10)&1)==0?i-u:i+u}return Math.min(i,this.max)|0};Ya.prototype.reset=function(){this.attempts=0};Ya.prototype.setMin=function(i){this.ms=i};Ya.prototype.setMax=function(i){this.max=i};Ya.prototype.setJitter=function(i){this.jitter=i};class Ad extends rt{constructor(r,u){var c;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(u=r,r=void 0),u=u||{},u.path=u.path||"/socket.io",this.opts=u,Kr(this,u),this.reconnection(u.reconnection!==!1),this.reconnectionAttempts(u.reconnectionAttempts||1/0),this.reconnectionDelay(u.reconnectionDelay||1e3),this.reconnectionDelayMax(u.reconnectionDelayMax||5e3),this.randomizationFactor((c=u.randomizationFactor)!==null&&c!==void 0?c:.5),this.backoff=new Ya({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(u.timeout==null?2e4:u.timeout),this._readyState="closed",this.uri=r;const d=u.parser||CN;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=u.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var u;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(u=this.backoff)===null||u===void 0||u.setMin(r),this)}randomizationFactor(r){var u;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(u=this.backoff)===null||u===void 0||u.setJitter(r),this)}reconnectionDelayMax(r){var u;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(u=this.backoff)===null||u===void 0||u.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new gN(this.uri,this.opts);const u=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const d=sn(u,"open",function(){c.onopen(),r&&r()}),h=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),r?r(g):this.maybeReconnectOnOpen()},p=sn(u,"error",h);if(this._timeout!==!1){const g=this._timeout,b=this.setTimeoutFn(()=>{d(),h(new Error("timeout")),u.close()},g);this.opts.autoUnref&&b.unref(),this.subs.push(()=>{this.clearTimeoutFn(b)})}return this.subs.push(d),this.subs.push(p),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(sn(r,"ping",this.onping.bind(this)),sn(r,"data",this.ondata.bind(this)),sn(r,"error",this.onerror.bind(this)),sn(r,"close",this.onclose.bind(this)),sn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(u){this.onclose("parse error",u)}}ondecoded(r){Xr(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,u){let c=this.nsps[r];return c?this._autoConnect&&!c.active&&c.connect():(c=new Kb(this,r,u),this.nsps[r]=c),c}_destroy(r){const u=Object.keys(this.nsps);for(const c of u)if(this.nsps[c].active)return;this._close()}_packet(r){const u=this.encoder.encode(r);for(let c=0;c<u.length;c++)this.engine.write(u[c],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,u){var c;this.cleanup(),(c=this.engine)===null||c===void 0||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,u),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const u=this.backoff.duration();this._reconnecting=!0;const c=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(d=>{d?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",d)):r.onreconnect()}))},u);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Vi={};function Ur(i,r){typeof i=="object"&&(r=i,i=void 0),r=r||{};const u=xN(i,r.path||"/socket.io"),c=u.source,d=u.id,h=u.path,p=Vi[d]&&h in Vi[d].nsps,g=r.forceNew||r["force new connection"]||r.multiplex===!1||p;let b;return g?b=new Ad(c,r):(Vi[d]||(Vi[d]=new Ad(c,r)),b=Vi[d]),u.query&&!r.query&&(r.query=u.queryKey),b.socket(u.path,r)}Object.assign(Ur,{Manager:Ad,Socket:Kb,io:Ur,connect:Ur});let Ku=null;function kg(){return Ku||(Ku=Ur(window.location.origin,{path:"/socket.io",transports:["websocket","polling"],reconnectionAttempts:10,reconnectionDelay:2e3})),Ku}function zN(i){const[r,u]=K.useState(!1),[c,d]=K.useState(null);return K.useEffect(()=>{const h=kg(),p=()=>u(!0),g=()=>u(!1),b=B=>{d(G=>({...G,...B,state:(B==null?void 0:B.state)||(G==null?void 0:G.state)||"idle"})),i==null||i("session",B)},E=B=>{d(G=>({...G,state:(B==null?void 0:B.state)||(G==null?void 0:G.state)||"idle",status:(B==null?void 0:B.status)||(G==null?void 0:G.status)})),i==null||i("status_update",B)},v=B=>{d(G=>({...G,...B})),i==null||i("status",B)},x=B=>{d(G=>({...G,state:"waiting_for_qr",qr:B})),i==null||i("qr",B)},C=B=>{const G=typeof B=="object"&&B&&"code"in B?String(B.code):String(B||"");d(X=>({...X,state:"waiting_for_qr",pairingCode:G})),i==null||i("pairing_code",G)},U=()=>{d(B=>B?{...B,qr:null}:null),i==null||i("qr_cleared",{})},Z=()=>{d(B=>B?{...B,pairingCode:null}:null),i==null||i("pairing_code_cleared",{})},D=(B,...G)=>{i==null||i(B,G[0])};return h.on("connect",p),h.on("disconnect",g),h.on("session",b),h.on("status_update",E),h.on("status",v),h.on("qr",x),h.on("pairing_code",C),h.on("pairing-code",C),h.on("qr_cleared",U),h.on("pairing_code_cleared",Z),h.onAny(D),u(h.connected),()=>{h.off("connect",p),h.off("disconnect",g),h.off("session",b),h.off("status_update",E),h.off("status",v),h.off("qr",x),h.off("pairing_code",C),h.off("pairing-code",C),h.off("qr_cleared",U),h.off("pairing_code_cleared",Z),h.offAny(D)}},[i]),{isConnected:r,sessionStatus:c,socket:kg()}}const Zi=({isOpen:i,onClose:r,title:u,children:c,footer:d,maxWidth:h})=>(K.useEffect(()=>{const p=g=>{g.key==="Escape"&&r()};return i&&(document.addEventListener("keydown",p),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",p),document.body.style.overflow="auto"}},[i,r]),i?o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 overflow-y-auto",children:[o.jsx("button",{type:"button",className:"fixed inset-0 bg-black/65 backdrop-blur-sm border-0 p-0 cursor-default",onClick:r,"aria-label":"Close modal backdrop"}),o.jsxs("div",{className:"relative w-full rounded-2xl border border-line bg-panel shadow-2xl overflow-hidden my-auto z-10 animate-in fade-in zoom-in-95 duration-150",role:"dialog","aria-modal":"true","aria-label":u,style:h?{maxWidth:h}:{maxWidth:"520px"},children:[o.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-line",children:[o.jsx("h3",{className:"text-base md:text-lg font-bold text-text-main",children:u}),o.jsx("button",{type:"button",onClick:r,className:"inline-flex items-center justify-center w-8 h-8 rounded-lg border border-line bg-panel-raised hover:bg-panel-hover text-text-main transition-colors","aria-label":"Close modal",children:o.jsx(Ji,{size:18})})]}),o.jsx("div",{className:"p-5 overflow-y-auto max-h-[75vh]",children:c}),d&&o.jsx("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-line bg-panel-raised/50",children:d})]})]}):null),Xl=({checked:i,onChange:r,disabled:u=!1,id:c,label:d,description:h})=>{const p=c||`toggle-${Math.random().toString(36).slice(2,8)}`;return o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[(d||h)&&o.jsxs("div",{className:"min-w-0 flex-1",children:[d&&o.jsx("label",{htmlFor:p,className:"font-semibold text-sm cursor-pointer block text-text-main",children:d}),h&&o.jsx("p",{className:"text-xs text-muted mt-0.5",children:h})]}),o.jsx("button",{type:"button",role:"switch","aria-checked":i,id:p,disabled:u,onClick:()=>r(!i),className:Nn("relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50 disabled:cursor-not-allowed",i?"bg-brand-blue":"bg-panel-hover border border-line"),children:o.jsx("span",{className:Nn("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow-md ring-0 transition duration-200 ease-in-out",i?"translate-x-5 rtl:-translate-x-5":"translate-x-0")})})]})},MN=()=>{var ye,fe,Se,oe,be;const{t:i,language:r}=rn(),{toast:u}=yl(),[c,d]=K.useState({}),[h,p]=K.useState({}),[g,b]=K.useState(!0),[E,v]=K.useState({}),[x,C]=K.useState(!1),[U,Z]=K.useState(!1),[D,B]=K.useState(!1),[G,X]=K.useState(""),[le,W]=K.useState([]),[me,J]=K.useState(null),[Y,R]=K.useState(""),I=[{id:"gemini",name:"Google Gemini",descKey:"providerGeminiDesc",provider:"gemini",defaultModel:"gemini-3.7-flash",defaultBaseUrl:"",keySetting:"gemini_api_key",modelSetting:"gemini_model",baseUrlSetting:"gemini_base_url"},{id:"groq",name:"Groq Cloud",descKey:"providerGroqDesc",provider:"openai",defaultModel:"llama-3.3-70b-versatile",defaultBaseUrl:"https://api.groq.com/openai/v1",keySetting:"openai_api_key",modelSetting:"openai_model",baseUrlSetting:"openai_base_url"},{id:"openai",name:"OpenAI",descKey:"providerOpenAIDesc",provider:"openai",defaultModel:"gpt-4o-mini",defaultBaseUrl:"https://api.openai.com/v1",keySetting:"openai_api_key",modelSetting:"openai_model",baseUrlSetting:"openai_base_url"},{id:"ollama",name:"Ollama (Local)",descKey:"providerOllamaDesc",provider:"openai",defaultModel:"llama3.2",defaultBaseUrl:"http://localhost:11434/v1",keySetting:"openai_api_key",modelSetting:"openai_model",baseUrlSetting:"openai_base_url"},{id:"anthropic",name:"Anthropic Claude",descKey:"providerAnthropicDesc",provider:"anthropic",defaultModel:"claude-sonnet-4-5",defaultBaseUrl:"https://api.anthropic.com",keySetting:"anthropic_api_key",modelSetting:"anthropic_model",baseUrlSetting:"anthropic_base_url"}],ie=async()=>{try{const L=await re.getSettings();if(L!=null&&L.settings){const je={},nt={};L.settings.forEach(Le=>{je[Le.key]=Le.value,Le.type==="secret"&&(nt[Le.key]=!!Le.configured)}),d(je),p(nt)}}catch(L){u(L.message,"error")}finally{b(!1)}};K.useEffect(()=>{ie()},[]);const $=async(L,je,nt=!1)=>{d(Le=>({...Le,[L]:je}));try{const Le=await re.updateSetting(L,je);if(nt||u(i("savedSuccessfully"),"success"),L.endsWith("_api_key")&&(d(ve=>({...ve,[L]:""})),p(ve=>({...ve,[L]:!!je}))),Le!=null&&Le.settings&&Array.isArray(Le.settings)){const ve={},Be={};Le.settings.forEach(Ze=>{Ze.type==="secret"?(Be[Ze.key]=!!Ze.configured,ve[Ze.key]=""):ve[Ze.key]=Ze.value}),d(Ze=>({...Ze,...ve})),p(Ze=>({...Ze,...Be}))}}catch(Le){u(Le.message,"error")}},te=c.ai_provider||"gemini",Q=I.find(L=>{var je,nt;return L.provider!==te?!1:!!(L.id==="gemini"||L.id==="anthropic"||L.id==="groq"&&((je=c.openai_base_url)!=null&&je.includes("groq.com"))||L.id==="ollama"&&((nt=c.openai_base_url)!=null&&nt.includes("11434"))||L.id==="openai"&&(!c.openai_base_url||c.openai_base_url.includes("api.openai.com")))})||I[0],ae=async L=>{const je={...c,ai_provider:L.provider};L.baseUrlSetting&&(je[L.baseUrlSetting]=L.defaultBaseUrl),L.defaultModel&&(je[L.modelSetting]=L.defaultModel),d(je);try{await re.updateSetting("ai_provider",L.provider),L.baseUrlSetting&&await re.updateSetting(L.baseUrlSetting,L.defaultBaseUrl),L.defaultModel&&await re.updateSetting(L.modelSetting,L.defaultModel),u(r==="ar"?`تم التبديل إلى ${L.name}`:`Switched provider to ${L.name}`,"success")}catch(nt){u(nt.message,"error")}},pe=async(L=!1)=>{C(!0);const je=String(c[Q.keySetting]||"").trim(),nt=!!h[Q.keySetting];try{const Le={provider:Q.provider,refresh:L};je&&(Le.apiKey=je),Q.baseUrlSetting&&c[Q.baseUrlSetting]&&(Le.baseUrl=c[Q.baseUrlSetting]);const ve=await re.fetchAiModels(Le);ve&&(ve.success||ve.fallback)?(v(Be=>{var Ze;return{...Be,[Q.id]:{live:!!ve.live,requiresApiKey:!!ve.requiresApiKey,fallback:!!ve.fallback,models:ve.models||[],cached:!!ve.cached,error:ve.success||(Ze=ve.error)==null?void 0:Ze.message}}}),ve.live&&ve.success?u(r==="ar"?`تم التحقق بنجاح وجلب ${ve.models.length} نموذجاً متاحاً لحسابك`:`Discovered ${ve.models.length} live models available for your account`,"success"):ve.requiresApiKey?L&&u(r==="ar"?"يرجى إدخال مفتاح API أولاً لاكتشاف النماذج المتاحة لحسابك":"Enter an API key to discover account models","info"):!ve.success&&ve.error&&u(ve.error.message||"Failed to discover models","error")):ve&&!ve.success&&ve.error&&(v(Be=>{var Ze;return{...Be,[Q.id]:{live:!1,requiresApiKey:!(nt||je),fallback:!0,models:ve.models||[],error:(Ze=ve.error)==null?void 0:Ze.message}}}),u(ve.error.message||"Failed to discover models","error"))}catch(Le){u(Le.message||"Failed to fetch models","error")}finally{C(!1)}};K.useEffect(()=>{g||pe(!1)},[Q.id,h[Q.keySetting],g]);const T=((ye=E[Q.id])==null?void 0:ye.models)||[],F=!!((fe=E[Q.id])!=null&&fe.live),M=!!(((Se=E[Q.id])==null?void 0:Se.requiresApiKey)??!h[Q.keySetting]),se=c[Q.modelSetting]||Q.defaultModel,V=T.find(L=>L.id.toLowerCase()===se.toLowerCase())||{displayName:se,provider:Q.provider,capabilities:{textInput:!0,textOutput:!0,vision:!1,audioInput:!1,stt:!1,videoInput:!1,pdfInput:!1},capabilitySource:"unknown"},Me=!!V.capabilities.vision,Ue=!!V.capabilities.stt;K.useEffect(()=>{g||(!Me&&c.ai_vision_enabled&&$("ai_vision_enabled",!1,!0),!Ue&&c.ai_stt_enabled&&$("ai_stt_enabled",!1,!0))},[se,Me,Ue,g]);const Ge=async()=>{try{const L=await re.getPersona(),je=L==null?void 0:L.persona;X(typeof je=="string"?je:(je==null?void 0:je.body)||""),B(!0)}catch(L){u(L.message,"error")}},N=async()=>{try{await re.updatePersona(G),u(r==="ar"?"تم تحديث برومبت الشخصية بنجاح!":"Persona updated successfully!","success"),B(!1)}catch(L){u(L.message,"error")}},S=async()=>{try{const L=await re.getMemoryFiles(),je=(L==null?void 0:L.files)||((L==null?void 0:L.scopes)||[]).map(nt=>nt.scope);W(je)}catch(L){u(L.message,"error")}},P=async L=>{try{const je=await re.getMemoryFile(L);R((je==null?void 0:je.content)||"")}catch(je){u(je.message,"error")}},ne=async()=>{if(me)try{await re.updateMemoryFile(me,Y),u(r==="ar"?"تم حفظ ملف الذاكرة بنجاح!":"Memory file updated!","success"),J(null)}catch(L){u(L.message,"error")}};return g?o.jsxs("div",{className:"flex items-center justify-center p-12 text-muted",children:[o.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin mr-2"}),o.jsx("span",{className:"text-sm font-semibold",children:i("starting")})]}):o.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-gradient-to-br from-panel-raised via-panel to-panel p-4 sm:p-6 shadow-sm flex flex-col gap-3.5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[o.jsx("div",{className:"w-11 h-11 sm:w-12 sm:h-12 rounded-2xl bg-gradient-to-br from-brand-blue to-brand-cyan text-white flex items-center justify-center shrink-0 shadow-md shadow-brand-blue/20",children:o.jsx(Ed,{size:22,className:"sm:w-6 sm:h-6"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("h2",{className:"text-base sm:text-xl font-extrabold text-text-main truncate",children:i("aiTitle")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted truncate",children:i("aiSubtitle")})]})]}),o.jsxs("div",{className:"shrink-0 flex items-center gap-2 bg-panel/60 border border-line/70 rounded-xl px-2.5 py-1.5 shadow-xs",children:[o.jsx("span",{className:"text-xs font-bold text-muted hidden sm:inline",children:c.ai_agent?r==="ar"?"مفعل":"Enabled":r==="ar"?"معطل":"Disabled"}),o.jsx(Xl,{checked:!!c.ai_agent,onChange:L=>$("ai_agent",L)})]})]}),o.jsx("div",{className:"flex items-center gap-2 pt-1 border-t border-line/40",children:o.jsxs("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold border ${c.ai_agent?"bg-ok/15 text-ok border-ok/30":"bg-danger/10 text-danger border-danger/25"}`,children:[o.jsx("span",{className:"pulse-dot"}),o.jsx("span",{children:c.ai_agent?i("aiAgentEnabled"):r==="ar"?"مساعد الذكاء الاصطناعي معطل":"AI Assistant Disabled"})]})})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-line",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx(Ng,{size:18,className:"text-brand-cyan shrink-0"}),o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:i("aiProvider")})]}),o.jsxs("div",{className:"flex items-center gap-2 self-start sm:self-auto",children:[o.jsx("span",{className:"text-xs text-muted font-medium",children:r==="ar"?"المزود النشط:":"Active:"}),o.jsxs("span",{className:"text-xs font-bold text-brand-cyan px-2.5 py-1 rounded-lg bg-brand-cyan/10 border border-brand-cyan/25",children:[Q.name," • ",o.jsx("span",{className:"font-mono",children:se})]})]})]}),o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-2.5 sm:gap-3",children:I.map(L=>{const je=Q.id===L.id;return o.jsxs("button",{type:"button",onClick:()=>ae(L),className:`p-3.5 rounded-xl border text-start transition-all flex flex-col justify-between gap-2.5 focus-visible:ring-2 focus-visible:ring-brand-blue/50 ${je?"bg-brand-blue/15 border-brand-blue/60 shadow-sm ring-1 ring-brand-blue/40":"bg-panel-raised border-line hover:bg-panel-hover"}`,children:[o.jsxs("div",{className:"flex items-center justify-between w-full",children:[o.jsx("span",{className:"font-bold text-xs sm:text-sm text-text-main",children:L.name}),je?o.jsx("span",{className:"w-5 h-5 rounded-full bg-brand-blue text-white flex items-center justify-center shrink-0",children:o.jsx(Lr,{size:12,strokeWidth:3})}):o.jsx("span",{className:"w-2 h-2 rounded-full bg-line"})]}),o.jsx("span",{className:"text-[10px] sm:text-[11px] font-mono text-muted truncate block",children:L.defaultModel})]},L.id)})}),M&&o.jsxs("div",{className:"p-3.5 rounded-xl bg-amber-500/10 border border-amber-500/25 flex items-start gap-3",children:[o.jsx(Or,{size:18,className:"text-amber-500 shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-xs text-text-main",children:[o.jsx("p",{className:"font-bold",children:i("connectKeyFirstPrompt")}),o.jsx("p",{className:"text-muted mt-0.5",children:r==="ar"?"النماذج المعروضة أدناه هي نماذج مقترحة من الدليل المحلي وليست مؤكدة لحسابك حتى يتم ربط المفتاح.":"Models shown below are catalog recommendations and are not verified for your account until a key is configured."})]})]}),((oe=E[Q.id])==null?void 0:oe.error)&&o.jsxs("div",{className:"p-3 rounded-xl bg-danger/10 border border-danger/25 flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs text-danger font-semibold",children:[o.jsx(qr,{size:16,className:"shrink-0"}),o.jsx("span",{children:(be=E[Q.id])==null?void 0:be.error})]}),o.jsx("button",{type:"button",onClick:()=>pe(!0),className:"text-xs font-bold underline hover:opacity-80 shrink-0",children:i("refreshModels")})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 pt-4 border-t border-line",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("label",{htmlFor:"input-api-key",className:"block text-xs font-bold text-muted",children:i("apiKey")}),h[Q.keySetting]&&o.jsxs("span",{className:"text-[10px] text-ok font-semibold flex items-center gap-1",children:[o.jsx(Qr,{size:11}),r==="ar"?"محفوظ":"Saved"]})]}),o.jsx("input",{id:"input-api-key",type:"password",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main font-mono text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:c[Q.keySetting]||"",onChange:L=>d({...c,[Q.keySetting]:L.target.value}),onBlur:L=>$(Q.keySetting,L.target.value),placeholder:h[Q.keySetting]?"••••••••••••":r==="ar"?"أدخل المفتاح":"Enter API key"})]}),Q.baseUrlSetting&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"input-base-url",className:"block text-xs font-bold text-muted",children:i("baseUrl")}),o.jsx("input",{id:"input-base-url",type:"text",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main font-mono text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:c[Q.baseUrlSetting]||"",onChange:L=>{Q.baseUrlSetting&&d({...c,[Q.baseUrlSetting]:L.target.value})},onBlur:L=>{Q.baseUrlSetting&&$(Q.baseUrlSetting,L.target.value)},placeholder:Q.defaultBaseUrl})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("label",{htmlFor:"input-model-name",className:"block text-xs font-bold text-muted",children:i("modelName")}),F?o.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-bold bg-ok/15 text-ok border border-ok/30",children:i("sourceLive")}):o.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-bold bg-brand-cyan/15 text-brand-cyan border border-brand-cyan/30",children:i("sourceSeed")})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>Z(!U),className:"text-[11px] text-brand-cyan hover:underline font-semibold",children:U?r==="ar"?"القائمة":"List":r==="ar"?"مخصص":"Custom"}),o.jsxs("button",{type:"button",onClick:()=>pe(!0),disabled:x,className:"inline-flex items-center gap-1 text-[11px] text-brand-blue hover:text-brand-blue/80 font-bold",title:i("refreshModels"),children:[o.jsx(Gr,{size:11,className:x?"animate-spin":""}),o.jsx("span",{children:i(x?"refreshing":"refreshModels")})]})]})]}),U?o.jsx("input",{id:"input-model-name",type:"text",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main font-mono text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:c[Q.modelSetting]||"",onChange:L=>d({...c,[Q.modelSetting]:L.target.value}),onBlur:L=>$(Q.modelSetting,L.target.value),placeholder:Q.defaultModel}):o.jsxs("select",{id:"input-model-name",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main font-mono text-xs sm:text-sm font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:se,onChange:L=>{$(Q.modelSetting,L.target.value)},children:[o.jsx("optgroup",{label:i(F?"modelsAvailableLive":"modelsRecommendedSeed"),children:T.map(L=>o.jsxs("option",{value:L.id,children:[L.displayName&&L.displayName!==L.id?`${L.displayName} (${L.id})`:L.id,L.recommended?" ★":""]},L.id))}),!T.some(L=>L.id.toLowerCase()===se.toLowerCase())&&o.jsxs("option",{value:se,children:[se," (current)"]})]})]})]}),o.jsxs("div",{className:"p-3.5 rounded-xl border border-line bg-panel-raised/60 flex flex-col gap-2.5",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[o.jsxs("span",{className:"font-bold text-text-main flex items-center gap-1.5",children:[o.jsx(Ng,{size:14,className:"text-brand-cyan shrink-0"}),r==="ar"?"القدرات:":"Capabilities:"," ",o.jsx("span",{className:"font-mono text-brand-cyan",children:V.displayName||se})]}),o.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full border ${V.capabilitySource==="provider"?"bg-ok/15 text-ok border-ok/30":V.capabilitySource==="seed"?"bg-brand-blue/15 text-brand-blue border-brand-blue/30":"bg-muted/15 text-muted border-line"}`,children:V.capabilitySource==="provider"?i("sourceLive"):V.capabilitySource==="seed"?i("sourceSeed"):i("sourceUnknown")})]}),o.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2 text-xs",children:[o.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${Me?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[o.jsx(Ha,{size:14}),o.jsx("span",{children:i("capVision")})]}),o.jsx("span",{className:"text-[10px] font-bold",children:i(Me?"supported":"unsupported")})]}),o.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${Ue?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[o.jsx(Bu,{size:14}),o.jsx("span",{children:i("capStt")})]}),o.jsx("span",{className:"text-[10px] font-bold",children:i(Ue?"supported":"unsupported")})]}),o.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${V.capabilities.audioInput?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[o.jsx(qv,{size:14}),o.jsx("span",{children:i("capAudio")})]}),o.jsx("span",{className:"text-[10px] font-bold",children:V.capabilities.audioInput?i("supported"):i("unsupported")})]}),o.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${V.capabilities.textInput&&V.capabilities.textOutput?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[o.jsx(Mr,{size:14}),o.jsx("span",{children:i("capText")})]}),o.jsx("span",{className:"text-[10px] font-bold",children:V.capabilities.textInput&&V.capabilities.textOutput?i("supported"):i("unsupported")})]}),o.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${V.capabilities.pdfInput?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[o.jsx(Mr,{size:14}),o.jsx("span",{children:i("capPdf")})]}),o.jsx("span",{className:"text-[10px] font-bold",children:V.capabilities.pdfInput?i("supported"):i("unsupported")})]}),o.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${V.capabilities.videoInput?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[o.jsx(Ha,{size:14}),o.jsx("span",{children:i("capVideo")})]}),o.jsx("span",{className:"text-[10px] font-bold",children:V.capabilities.videoInput?i("supported"):i("unsupported")})]})]})]})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-4",children:[o.jsx("h3",{className:"text-base font-bold text-text-main",children:i("capabilities")}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"relative rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[o.jsx("div",{className:"absolute top-3.5 end-3.5",children:o.jsx(Xl,{checked:!!c.ai_vision_enabled&&Me,disabled:!Me,onChange:L=>{Me&&$("ai_vision_enabled",L)}})}),o.jsxs("div",{className:"pe-12",children:[o.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[o.jsx(Ha,{size:17,className:Me?"text-brand-cyan shrink-0":"text-muted shrink-0"}),o.jsx("span",{className:"font-bold text-sm",children:i("aiVision")})]}),o.jsx("p",{className:"text-xs text-muted leading-relaxed",children:i("aiVisionDesc")}),!Me&&o.jsxs("p",{className:"text-[11px] text-amber-500 font-semibold mt-2 flex items-center gap-1",children:[o.jsx(Or,{size:13,className:"shrink-0"}),o.jsx("span",{children:i("visionUnsupportedNotice")})]})]})]}),o.jsxs("div",{className:"relative rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[o.jsx("div",{className:"absolute top-3.5 end-3.5",children:o.jsx(Xl,{checked:!!(c.ai_stt_enabled??!0)&&Ue,disabled:!Ue,onChange:L=>{Ue&&$("ai_stt_enabled",L)}})}),o.jsxs("div",{className:"pe-12",children:[o.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[o.jsx(Bu,{size:17,className:Ue?"text-purple-400 shrink-0":"text-muted shrink-0"}),o.jsx("span",{className:"font-bold text-sm",children:i("aiSttEnabled")})]}),o.jsx("p",{className:"text-xs text-muted leading-relaxed",children:i("aiSttEnabledDesc")}),!Ue&&o.jsxs("p",{className:"text-[11px] text-amber-500 font-semibold mt-2 flex items-center gap-1",children:[o.jsx(Or,{size:13,className:"shrink-0"}),o.jsx("span",{children:i("sttUnsupportedNotice")})]})]})]}),o.jsxs("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[o.jsx(Bu,{size:17,className:"text-purple-400 shrink-0"}),o.jsx("span",{className:"font-bold text-sm",children:i("aiStt")})]}),o.jsx("p",{className:"text-xs text-muted leading-relaxed",children:i("sttDesc")})]}),o.jsxs("select",{className:"w-full h-10 px-3 rounded-lg border border-line bg-panel text-text-main text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50 disabled:opacity-50",value:c.ai_stt_provider||"auto",disabled:!Ue,onChange:L=>{Ue&&$("ai_stt_provider",L.target.value)},children:[o.jsx("option",{value:"auto",children:i("sttAuto")}),o.jsx("option",{value:"gemini",children:i("sttGemini")}),o.jsx("option",{value:"openai",children:i("sttOpenAI")})]})]}),o.jsxs("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[o.jsx(Hr,{size:17,className:"text-ok shrink-0"}),o.jsx("span",{className:"font-bold text-sm",children:i("botLanguage")})]}),o.jsx("p",{className:"text-xs text-muted leading-relaxed",children:i("botLanguageDesc")})]}),o.jsxs("select",{className:"w-full h-10 px-3 rounded-lg border border-line bg-panel text-text-main text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:c.bot_language||"auto",onChange:L=>$("bot_language",L.target.value),children:[o.jsx("option",{value:"auto",children:i("langAuto")}),o.jsx("option",{value:"ar",children:i("langAr")}),o.jsx("option",{value:"en",children:i("langEn")})]})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-5",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col justify-between gap-4",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2.5 text-text-main mb-2",children:[o.jsx(Mr,{size:20,className:"text-brand-blue shrink-0"}),o.jsx("h3",{className:"text-base font-bold",children:i("personaPrompt")})]}),o.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:i("personaDesc")})]}),o.jsx("button",{type:"button",onClick:Ge,className:"w-full h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50 flex items-center justify-center gap-2",children:o.jsx("span",{children:i("editPersona")})})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col justify-between gap-4",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2.5 text-text-main mb-2",children:[o.jsx(wv,{size:20,className:"text-brand-cyan shrink-0"}),o.jsx("h3",{className:"text-base font-bold",children:i("memoryFiles")})]}),o.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:i("memoryDesc")})]}),o.jsx("button",{type:"button",onClick:()=>{S(),J("global"),P("global")},className:"w-full h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50 flex items-center justify-center gap-2",children:o.jsx("span",{children:i("manageMemory")})})]})]}),o.jsx(Zi,{isOpen:D,onClose:()=>B(!1),title:i("personaPrompt"),maxWidth:"750px",footer:o.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[o.jsx("button",{type:"button",onClick:()=>B(!1),className:"px-4 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors",children:i("cancel")}),o.jsxs("button",{type:"button",onClick:N,className:"px-5 h-10 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-brand-blue/25 transition-colors flex items-center gap-2",children:[o.jsx(Vr,{size:16}),o.jsx("span",{children:i("save")})]})]}),children:o.jsx("textarea",{className:"w-full rounded-xl border border-line bg-panel-raised p-3.5 text-text-main font-mono text-xs sm:text-sm leading-relaxed focus:outline-none focus:ring-2 focus:ring-brand-blue/50",rows:12,value:G,onChange:L=>X(L.target.value)})}),o.jsx(Zi,{isOpen:!!me,onClose:()=>J(null),title:`Memory File: ${me||""}`,maxWidth:"750px",footer:o.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[o.jsx("button",{type:"button",onClick:()=>J(null),className:"px-4 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors",children:i("cancel")}),o.jsxs("button",{type:"button",onClick:ne,className:"px-5 h-10 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-brand-blue/25 transition-colors flex items-center gap-2",children:[o.jsx(Vr,{size:16}),o.jsx("span",{children:i("save")})]})]}),children:o.jsx("textarea",{className:"w-full rounded-xl border border-line bg-panel-raised p-3.5 text-text-main font-mono text-xs sm:text-sm leading-relaxed focus:outline-none focus:ring-2 focus:ring-brand-blue/50",rows:12,value:Y,onChange:L=>R(L.target.value)})})]})},ON=()=>{const{t:i,language:r}=rn(),{toast:u}=yl(),[c,d]=K.useState([]),[h,p]=K.useState("!"),[g,b]=K.useState(!1),[E,v]=K.useState("!"),[x,C]=K.useState(""),[U,Z]=K.useState(!0),[D,B]=K.useState(null),[G,X]=K.useState([]),[le,W]=K.useState(""),[me,J]=K.useState(!1),Y=async()=>{try{const T=await re.getCommands();T!=null&&T.commands&&d(T.commands),T!=null&&T.prefix&&(p(T.prefix),v(T.prefix))}catch(T){u(T.message,"error")}finally{Z(!1)}};K.useEffect(()=>{Y()},[]);const R=async()=>{const T=E.trim();if(!T||T.length>3){u(i("prefixValidation"),"error");return}try{await re.updatePrefix(T),p(T),b(!1),u(`${i("prefixUpdated")} (${T})`,"success")}catch(F){u(F.message,"error")}},I=async(T,F)=>{d(M=>M.map(se=>se.name===T.name?{...se,enabled:F,overridden:!0}:se));try{await re.updateCommand(T.name,{enabled:F}),u(r==="ar"?`تم ${F?"تفعيل":"تعطيل"} الأمر '${T.name}'`:`Command '${T.name}' ${F?"enabled":"disabled"}`,"success")}catch(M){u(M.message,"error"),Y()}},ie=async(T,F)=>{d(M=>M.map(se=>se.name===T.name?{...se,permission:F,overridden:!0}:se));try{await re.updateCommand(T.name,{permission:F}),u(r==="ar"?`تم تحديث رتبة '${T.name}'`:`Permission for '${T.name}' updated`,"success")}catch(M){u(M.message,"error"),Y()}},$=T=>{B(T),X(Array.isArray(T.aliases)?[...T.aliases]:[]),W("")},te=()=>{const T=le.trim().replace(/^[!/#.?$]+/,"").toLowerCase();if(T){if(G.includes(T)){u(r==="ar"?"هذا الاسم المستعار مضاف بالفعل":"Alias already added","warning");return}X([...G,T]),W("")}},Q=T=>{X(G.filter(F=>F!==T))},ae=async()=>{if(D){J(!0);try{await re.updateCommand(D.name,{aliases:G}),d(T=>T.map(F=>F.name===D.name?{...F,aliases:G}:F)),u(i("savedSuccessfully"),"success"),B(null)}catch(T){u(T.message,"error")}finally{J(!1)}}},pe=c.filter(T=>T.name.toLowerCase().includes(x.toLowerCase())||T.description.toLowerCase().includes(x.toLowerCase())||T.aliases.some(F=>F.toLowerCase().includes(x.toLowerCase())));return o.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[o.jsx("h2",{className:"text-lg md:text-xl font-bold text-text-main",children:i("commands")}),o.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-xl border border-line bg-panel-raised",children:[o.jsxs("span",{className:"text-xs text-muted font-semibold",children:[i("activePrefix"),":"]}),g?o.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[o.jsx("input",{type:"text",maxLength:3,value:E,onChange:T=>v(T.target.value),className:"w-12 h-7 px-1.5 text-center font-mono font-bold text-xs rounded-lg border border-line bg-panel text-text-main focus:outline-none focus:ring-2 focus:ring-brand-blue/50",onKeyDown:T=>{T.key==="Enter"&&R(),T.key==="Escape"&&b(!1)}}),o.jsx("button",{type:"button",onClick:R,className:"px-2 h-7 rounded-lg bg-brand-blue text-white font-bold text-xs hover:bg-brand-blue/90 transition-colors",children:i("save")}),o.jsx("button",{type:"button",onClick:()=>b(!1),className:"px-2 h-7 rounded-lg border border-line bg-panel-raised text-muted font-bold text-xs hover:bg-panel-hover transition-colors",children:i("cancel")})]}):o.jsx("button",{type:"button",onClick:()=>{v(h),b(!0)},className:"px-2.5 py-0.5 rounded-lg bg-brand-cyan/15 text-brand-cyan border border-brand-cyan/30 font-mono font-bold text-xs hover:bg-brand-cyan/25 transition-colors",title:r==="ar"?"اضغط لتعديل البادئة":"Click to change prefix",children:h})]})]}),o.jsx("p",{className:"text-xs md:text-sm text-muted mt-1",children:r==="ar"?"إدارة رتب الأوامر والأسماء المستعارة وتفعيلها أو تعطيلها مباشرة":"Manage role permissions, edit aliases, or enable/disable bot commands live"})]}),o.jsxs("div",{className:"relative w-full md:w-72 shrink-0",children:[o.jsx(Ix,{size:18,className:"absolute start-3.5 top-3 text-muted"}),o.jsx("input",{type:"text",className:"w-full h-11 ps-10 pe-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",placeholder:i("searchPlaceholder"),value:x,onChange:T=>C(T.target.value)})]})]}),o.jsx("div",{className:"rounded-2xl border border-line bg-panel overflow-hidden shadow-sm overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[760px] text-start border-collapse text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-panel-raised border-b border-line text-xs font-bold text-muted uppercase tracking-wider",children:[o.jsx("th",{className:"px-4 py-3.5 text-start",children:i("thCommand")}),o.jsx("th",{className:"px-4 py-3.5 text-start",children:i("thAliases")}),o.jsx("th",{className:"px-4 py-3.5 text-start",children:i("thDescription")}),o.jsx("th",{className:"px-4 py-3.5 text-start",children:i("thScope")}),o.jsx("th",{className:"px-4 py-3.5 text-start",children:i("thRequiredRole")}),o.jsx("th",{className:"px-4 py-3.5 text-center",children:i("thStatus")})]})}),o.jsx("tbody",{className:"divide-y divide-line/40",children:U?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"text-center py-12 text-muted",children:o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[o.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin"}),o.jsx("span",{className:"text-xs",children:i("loading")})]})})}):pe.map(T=>{var F;return o.jsxs("tr",{className:"hover:bg-panel-hover/50 transition-colors",children:[o.jsx("td",{className:"px-4 py-3.5 font-mono font-bold text-brand-cyan",children:o.jsxs("bdi",{children:[h,T.name]})}),o.jsx("td",{className:"px-4 py-3.5",children:o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[(F=T.aliases)!=null&&F.length?T.aliases.map(M=>o.jsx("span",{className:"inline-flex items-center font-mono text-[11px] px-2 py-0.5 rounded-md bg-panel-raised border border-line text-muted",children:o.jsxs("bdi",{children:[h,M]})},M)):o.jsx("span",{className:"text-xs text-muted/60",children:"—"}),o.jsx("button",{type:"button",onClick:()=>$(T),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-panel-raised hover:bg-brand-blue/15 hover:text-brand-cyan text-muted border border-line transition-colors",title:i("editAliases"),children:o.jsx(Ov,{size:12})})]})}),o.jsx("td",{className:"px-4 py-3.5 max-w-xs text-text-main text-xs md:text-sm",children:T.description}),o.jsx("td",{className:"px-4 py-3.5",children:o.jsx("span",{className:"inline-flex px-2.5 py-0.5 rounded-lg bg-brand-blue/10 text-brand-cyan text-xs font-semibold",children:T.chat==="all"?r==="ar"?"الكل":"All":T.chat==="group"?r==="ar"?"المجموعات":"Group":r==="ar"?"خاص":"Private"})}),o.jsx("td",{className:"px-4 py-3.5",children:o.jsxs("select",{className:"h-9 px-2.5 rounded-lg border border-line bg-panel-raised text-text-main text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:T.permission,onChange:M=>ie(T,M.target.value),children:[o.jsx("option",{value:"MEMBERS",children:r==="ar"?"الجميع (الأعضاء)":"Members (Everyone)"}),o.jsx("option",{value:"ADMIN_ONLY",children:r==="ar"?"مشرفو المجموعة":"Group Admins"}),o.jsx("option",{value:"OWNER_ONLY",children:r==="ar"?"مالك البوت فقط":"Bot Owner Only"})]})}),o.jsx("td",{className:"px-4 py-3.5 text-center",children:o.jsx(Xl,{checked:T.enabled,onChange:M=>I(T,M)})})]},T.name)})})]})}),o.jsx(Zi,{isOpen:!!D,onClose:()=>B(null),title:`${i("aliasesFor")} ${h}${(D==null?void 0:D.name)||""}`,footer:o.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[o.jsx("button",{type:"button",onClick:()=>B(null),className:"px-4 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors",children:i("cancel")}),o.jsx("button",{type:"button",onClick:ae,disabled:me,className:"px-5 h-10 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-brand-blue/25 transition-colors disabled:opacity-50",children:i(me?"saving":"save")})]}),children:o.jsxs("div",{className:"flex flex-col gap-4 py-1",children:[o.jsx("p",{className:"text-xs sm:text-sm text-muted",children:r==="ar"?"الأسماء المستعارة تتيح استدعاء هذا الأمر بأسماء بديلة (مثل: p بدلاً من ping).":"Aliases allow invoking this command using alternative names."}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("span",{className:"text-xs font-bold text-muted block",children:i("thAliases")}),o.jsx("div",{className:"flex items-center gap-2 flex-wrap min-h-[42px] p-2 rounded-xl border border-line bg-panel-raised",children:G.length>0?G.map(T=>o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-panel border border-line text-xs font-mono font-bold text-text-main",children:[o.jsxs("span",{children:[h,T]}),o.jsx("button",{type:"button",onClick:()=>Q(T),className:"text-muted hover:text-danger p-0.5 rounded transition-colors",children:o.jsx(Ji,{size:13})})]},T)):o.jsx("span",{className:"text-xs text-muted/60 px-1",children:i("noAliases")})})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"new-alias-input",className:"text-xs font-bold text-muted block",children:i("addAlias")}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(Lv,{size:16,className:"absolute start-3 top-3 text-muted"}),o.jsx("input",{id:"new-alias-input",type:"text",value:le,onChange:T=>W(T.target.value),onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),te())},placeholder:i("newAliasPlaceholder"),className:"w-full h-11 ps-9 pe-3 rounded-xl border border-line bg-panel text-text-main font-mono text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50"})]}),o.jsxs("button",{type:"button",onClick:te,className:"inline-flex items-center justify-center gap-1.5 px-4 h-11 rounded-xl bg-panel-raised hover:bg-panel-hover border border-line text-text-main font-bold text-xs sm:text-sm transition-colors shrink-0",children:[o.jsx(Vx,{size:16}),o.jsx("span",{children:i("add")})]})]})]})]})})]})};var qa={},Zu,Rg;function kN(){return Rg||(Rg=1,Zu=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Zu}var Ju={},gl={},Dg;function Zl(){if(Dg)return gl;Dg=1;let i;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return gl.getSymbolSize=function(c){if(!c)throw new Error('"version" cannot be null or undefined');if(c<1||c>40)throw new Error('"version" should be in range from 1 to 40');return c*4+17},gl.getSymbolTotalCodewords=function(c){return r[c]},gl.getBCHDigit=function(u){let c=0;for(;u!==0;)c++,u>>>=1;return c},gl.setToSJISFunction=function(c){if(typeof c!="function")throw new Error('"toSJISFunc" is not a valid function.');i=c},gl.isKanjiModeEnabled=function(){return typeof i<"u"},gl.toSJIS=function(c){return i(c)},gl}var Iu={},Bg;function Ud(){return Bg||(Bg=1,(function(i){i.L={bit:1},i.M={bit:0},i.Q={bit:3},i.H={bit:2};function r(u){if(typeof u!="string")throw new Error("Param is not a string");switch(u.toLowerCase()){case"l":case"low":return i.L;case"m":case"medium":return i.M;case"q":case"quartile":return i.Q;case"h":case"high":return i.H;default:throw new Error("Unknown EC Level: "+u)}}i.isValid=function(c){return c&&typeof c.bit<"u"&&c.bit>=0&&c.bit<4},i.from=function(c,d){if(i.isValid(c))return c;try{return r(c)}catch{return d}}})(Iu)),Iu}var Pu,Ug;function RN(){if(Ug)return Pu;Ug=1;function i(){this.buffer=[],this.length=0}return i.prototype={get:function(r){const u=Math.floor(r/8);return(this.buffer[u]>>>7-r%8&1)===1},put:function(r,u){for(let c=0;c<u;c++)this.putBit((r>>>u-c-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const u=Math.floor(this.length/8);this.buffer.length<=u&&this.buffer.push(0),r&&(this.buffer[u]|=128>>>this.length%8),this.length++}},Pu=i,Pu}var Fu,Lg;function DN(){if(Lg)return Fu;Lg=1;function i(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}return i.prototype.set=function(r,u,c,d){const h=r*this.size+u;this.data[h]=c,d&&(this.reservedBit[h]=!0)},i.prototype.get=function(r,u){return this.data[r*this.size+u]},i.prototype.xor=function(r,u,c){this.data[r*this.size+u]^=c},i.prototype.isReserved=function(r,u){return this.reservedBit[r*this.size+u]},Fu=i,Fu}var $u={},qg;function BN(){return qg||(qg=1,(function(i){const r=Zl().getSymbolSize;i.getRowColCoords=function(c){if(c===1)return[];const d=Math.floor(c/7)+2,h=r(c),p=h===145?26:Math.ceil((h-13)/(2*d-2))*2,g=[h-7];for(let b=1;b<d-1;b++)g[b]=g[b-1]-p;return g.push(6),g.reverse()},i.getPositions=function(c){const d=[],h=i.getRowColCoords(c),p=h.length;for(let g=0;g<p;g++)for(let b=0;b<p;b++)g===0&&b===0||g===0&&b===p-1||g===p-1&&b===0||d.push([h[g],h[b]]);return d}})($u)),$u}var Wu={},Hg;function UN(){if(Hg)return Wu;Hg=1;const i=Zl().getSymbolSize,r=7;return Wu.getPositions=function(c){const d=i(c);return[[0,0],[d-r,0],[0,d-r]]},Wu}var ed={},Gg;function LN(){return Gg||(Gg=1,(function(i){i.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r={N1:3,N2:3,N3:40,N4:10};i.isValid=function(d){return d!=null&&d!==""&&!isNaN(d)&&d>=0&&d<=7},i.from=function(d){return i.isValid(d)?parseInt(d,10):void 0},i.getPenaltyN1=function(d){const h=d.size;let p=0,g=0,b=0,E=null,v=null;for(let x=0;x<h;x++){g=b=0,E=v=null;for(let C=0;C<h;C++){let U=d.get(x,C);U===E?g++:(g>=5&&(p+=r.N1+(g-5)),E=U,g=1),U=d.get(C,x),U===v?b++:(b>=5&&(p+=r.N1+(b-5)),v=U,b=1)}g>=5&&(p+=r.N1+(g-5)),b>=5&&(p+=r.N1+(b-5))}return p},i.getPenaltyN2=function(d){const h=d.size;let p=0;for(let g=0;g<h-1;g++)for(let b=0;b<h-1;b++){const E=d.get(g,b)+d.get(g,b+1)+d.get(g+1,b)+d.get(g+1,b+1);(E===4||E===0)&&p++}return p*r.N2},i.getPenaltyN3=function(d){const h=d.size;let p=0,g=0,b=0;for(let E=0;E<h;E++){g=b=0;for(let v=0;v<h;v++)g=g<<1&2047|d.get(E,v),v>=10&&(g===1488||g===93)&&p++,b=b<<1&2047|d.get(v,E),v>=10&&(b===1488||b===93)&&p++}return p*r.N3},i.getPenaltyN4=function(d){let h=0;const p=d.data.length;for(let b=0;b<p;b++)h+=d.data[b];return Math.abs(Math.ceil(h*100/p/5)-10)*r.N4};function u(c,d,h){switch(c){case i.Patterns.PATTERN000:return(d+h)%2===0;case i.Patterns.PATTERN001:return d%2===0;case i.Patterns.PATTERN010:return h%3===0;case i.Patterns.PATTERN011:return(d+h)%3===0;case i.Patterns.PATTERN100:return(Math.floor(d/2)+Math.floor(h/3))%2===0;case i.Patterns.PATTERN101:return d*h%2+d*h%3===0;case i.Patterns.PATTERN110:return(d*h%2+d*h%3)%2===0;case i.Patterns.PATTERN111:return(d*h%3+(d+h)%2)%2===0;default:throw new Error("bad maskPattern:"+c)}}i.applyMask=function(d,h){const p=h.size;for(let g=0;g<p;g++)for(let b=0;b<p;b++)h.isReserved(b,g)||h.xor(b,g,u(d,b,g))},i.getBestMask=function(d,h){const p=Object.keys(i.Patterns).length;let g=0,b=1/0;for(let E=0;E<p;E++){h(E),i.applyMask(E,d);const v=i.getPenaltyN1(d)+i.getPenaltyN2(d)+i.getPenaltyN3(d)+i.getPenaltyN4(d);i.applyMask(E,d),v<b&&(b=v,g=E)}return g}})(ed)),ed}var zr={},Vg;function Zb(){if(Vg)return zr;Vg=1;const i=Ud(),r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],u=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return zr.getBlocksCount=function(d,h){switch(h){case i.L:return r[(d-1)*4+0];case i.M:return r[(d-1)*4+1];case i.Q:return r[(d-1)*4+2];case i.H:return r[(d-1)*4+3];default:return}},zr.getTotalCodewordsCount=function(d,h){switch(h){case i.L:return u[(d-1)*4+0];case i.M:return u[(d-1)*4+1];case i.Q:return u[(d-1)*4+2];case i.H:return u[(d-1)*4+3];default:return}},zr}var td={},Yi={},Yg;function qN(){if(Yg)return Yi;Yg=1;const i=new Uint8Array(512),r=new Uint8Array(256);return(function(){let c=1;for(let d=0;d<255;d++)i[d]=c,r[c]=d,c<<=1,c&256&&(c^=285);for(let d=255;d<512;d++)i[d]=i[d-255]})(),Yi.log=function(c){if(c<1)throw new Error("log("+c+")");return r[c]},Yi.exp=function(c){return i[c]},Yi.mul=function(c,d){return c===0||d===0?0:i[r[c]+r[d]]},Yi}var Qg;function HN(){return Qg||(Qg=1,(function(i){const r=qN();i.mul=function(c,d){const h=new Uint8Array(c.length+d.length-1);for(let p=0;p<c.length;p++)for(let g=0;g<d.length;g++)h[p+g]^=r.mul(c[p],d[g]);return h},i.mod=function(c,d){let h=new Uint8Array(c);for(;h.length-d.length>=0;){const p=h[0];for(let b=0;b<d.length;b++)h[b]^=r.mul(d[b],p);let g=0;for(;g<h.length&&h[g]===0;)g++;h=h.slice(g)}return h},i.generateECPolynomial=function(c){let d=new Uint8Array([1]);for(let h=0;h<c;h++)d=i.mul(d,new Uint8Array([1,r.exp(h)]));return d}})(td)),td}var nd,Xg;function GN(){if(Xg)return nd;Xg=1;const i=HN();function r(u){this.genPoly=void 0,this.degree=u,this.degree&&this.initialize(this.degree)}return r.prototype.initialize=function(c){this.degree=c,this.genPoly=i.generateECPolynomial(this.degree)},r.prototype.encode=function(c){if(!this.genPoly)throw new Error("Encoder not initialized");const d=new Uint8Array(c.length+this.degree);d.set(c);const h=i.mod(d,this.genPoly),p=this.degree-h.length;if(p>0){const g=new Uint8Array(this.degree);return g.set(h,p),g}return h},nd=r,nd}var ld={},ad={},id={},Kg;function Jb(){return Kg||(Kg=1,id.isValid=function(r){return!isNaN(r)&&r>=1&&r<=40}),id}var vn={},Zg;function Ib(){if(Zg)return vn;Zg=1;const i="[0-9]+",r="[A-Z $%*+\\-./:]+";let u="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";u=u.replace(/u/g,"\\u");const c="(?:(?![A-Z0-9 $%*+\\-./:]|"+u+`)(?:.|[\r
385
- ]))+`;vn.KANJI=new RegExp(u,"g"),vn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),vn.BYTE=new RegExp(c,"g"),vn.NUMERIC=new RegExp(i,"g"),vn.ALPHANUMERIC=new RegExp(r,"g");const d=new RegExp("^"+u+"$"),h=new RegExp("^"+i+"$"),p=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return vn.testKanji=function(b){return d.test(b)},vn.testNumeric=function(b){return h.test(b)},vn.testAlphanumeric=function(b){return p.test(b)},vn}var Jg;function Jl(){return Jg||(Jg=1,(function(i){const r=Jb(),u=Ib();i.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},i.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},i.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},i.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},i.MIXED={bit:-1},i.getCharCountIndicator=function(h,p){if(!h.ccBits)throw new Error("Invalid mode: "+h);if(!r.isValid(p))throw new Error("Invalid version: "+p);return p>=1&&p<10?h.ccBits[0]:p<27?h.ccBits[1]:h.ccBits[2]},i.getBestModeForData=function(h){return u.testNumeric(h)?i.NUMERIC:u.testAlphanumeric(h)?i.ALPHANUMERIC:u.testKanji(h)?i.KANJI:i.BYTE},i.toString=function(h){if(h&&h.id)return h.id;throw new Error("Invalid mode")},i.isValid=function(h){return h&&h.bit&&h.ccBits};function c(d){if(typeof d!="string")throw new Error("Param is not a string");switch(d.toLowerCase()){case"numeric":return i.NUMERIC;case"alphanumeric":return i.ALPHANUMERIC;case"kanji":return i.KANJI;case"byte":return i.BYTE;default:throw new Error("Unknown mode: "+d)}}i.from=function(h,p){if(i.isValid(h))return h;try{return c(h)}catch{return p}}})(ad)),ad}var Ig;function VN(){return Ig||(Ig=1,(function(i){const r=Zl(),u=Zb(),c=Ud(),d=Jl(),h=Jb(),p=7973,g=r.getBCHDigit(p);function b(C,U,Z){for(let D=1;D<=40;D++)if(U<=i.getCapacity(D,Z,C))return D}function E(C,U){return d.getCharCountIndicator(C,U)+4}function v(C,U){let Z=0;return C.forEach(function(D){const B=E(D.mode,U);Z+=B+D.getBitsLength()}),Z}function x(C,U){for(let Z=1;Z<=40;Z++)if(v(C,Z)<=i.getCapacity(Z,U,d.MIXED))return Z}i.from=function(U,Z){return h.isValid(U)?parseInt(U,10):Z},i.getCapacity=function(U,Z,D){if(!h.isValid(U))throw new Error("Invalid QR Code version");typeof D>"u"&&(D=d.BYTE);const B=r.getSymbolTotalCodewords(U),G=u.getTotalCodewordsCount(U,Z),X=(B-G)*8;if(D===d.MIXED)return X;const le=X-E(D,U);switch(D){case d.NUMERIC:return Math.floor(le/10*3);case d.ALPHANUMERIC:return Math.floor(le/11*2);case d.KANJI:return Math.floor(le/13);case d.BYTE:default:return Math.floor(le/8)}},i.getBestVersionForData=function(U,Z){let D;const B=c.from(Z,c.M);if(Array.isArray(U)){if(U.length>1)return x(U,B);if(U.length===0)return 1;D=U[0]}else D=U;return b(D.mode,D.getLength(),B)},i.getEncodedBits=function(U){if(!h.isValid(U)||U<7)throw new Error("Invalid QR Code version");let Z=U<<12;for(;r.getBCHDigit(Z)-g>=0;)Z^=p<<r.getBCHDigit(Z)-g;return U<<12|Z}})(ld)),ld}var sd={},Pg;function YN(){if(Pg)return sd;Pg=1;const i=Zl(),r=1335,u=21522,c=i.getBCHDigit(r);return sd.getEncodedBits=function(h,p){const g=h.bit<<3|p;let b=g<<10;for(;i.getBCHDigit(b)-c>=0;)b^=r<<i.getBCHDigit(b)-c;return(g<<10|b)^u},sd}var rd={},od,Fg;function QN(){if(Fg)return od;Fg=1;const i=Jl();function r(u){this.mode=i.NUMERIC,this.data=u.toString()}return r.getBitsLength=function(c){return 10*Math.floor(c/3)+(c%3?c%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(c){let d,h,p;for(d=0;d+3<=this.data.length;d+=3)h=this.data.substr(d,3),p=parseInt(h,10),c.put(p,10);const g=this.data.length-d;g>0&&(h=this.data.substr(d),p=parseInt(h,10),c.put(p,g*3+1))},od=r,od}var cd,$g;function XN(){if($g)return cd;$g=1;const i=Jl(),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function u(c){this.mode=i.ALPHANUMERIC,this.data=c}return u.getBitsLength=function(d){return 11*Math.floor(d/2)+6*(d%2)},u.prototype.getLength=function(){return this.data.length},u.prototype.getBitsLength=function(){return u.getBitsLength(this.data.length)},u.prototype.write=function(d){let h;for(h=0;h+2<=this.data.length;h+=2){let p=r.indexOf(this.data[h])*45;p+=r.indexOf(this.data[h+1]),d.put(p,11)}this.data.length%2&&d.put(r.indexOf(this.data[h]),6)},cd=u,cd}var ud,Wg;function KN(){if(Wg)return ud;Wg=1;const i=Jl();function r(u){this.mode=i.BYTE,typeof u=="string"?this.data=new TextEncoder().encode(u):this.data=new Uint8Array(u)}return r.getBitsLength=function(c){return c*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(u){for(let c=0,d=this.data.length;c<d;c++)u.put(this.data[c],8)},ud=r,ud}var dd,ex;function ZN(){if(ex)return dd;ex=1;const i=Jl(),r=Zl();function u(c){this.mode=i.KANJI,this.data=c}return u.getBitsLength=function(d){return d*13},u.prototype.getLength=function(){return this.data.length},u.prototype.getBitsLength=function(){return u.getBitsLength(this.data.length)},u.prototype.write=function(c){let d;for(d=0;d<this.data.length;d++){let h=r.toSJIS(this.data[d]);if(h>=33088&&h<=40956)h-=33088;else if(h>=57408&&h<=60351)h-=49472;else throw new Error("Invalid SJIS character: "+this.data[d]+`
386
- Make sure your charset is UTF-8`);h=(h>>>8&255)*192+(h&255),c.put(h,13)}},dd=u,dd}var fd={exports:{}},tx;function JN(){return tx||(tx=1,(function(i){var r={single_source_shortest_paths:function(u,c,d){var h={},p={};p[c]=0;var g=r.PriorityQueue.make();g.push(c,0);for(var b,E,v,x,C,U,Z,D,B;!g.empty();){b=g.pop(),E=b.value,x=b.cost,C=u[E]||{};for(v in C)C.hasOwnProperty(v)&&(U=C[v],Z=x+U,D=p[v],B=typeof p[v]>"u",(B||D>Z)&&(p[v]=Z,g.push(v,Z),h[v]=E))}if(typeof d<"u"&&typeof p[d]>"u"){var G=["Could not find a path from ",c," to ",d,"."].join("");throw new Error(G)}return h},extract_shortest_path_from_predecessor_list:function(u,c){for(var d=[],h=c;h;)d.push(h),u[h],h=u[h];return d.reverse(),d},find_path:function(u,c,d){var h=r.single_source_shortest_paths(u,c,d);return r.extract_shortest_path_from_predecessor_list(h,d)},PriorityQueue:{make:function(u){var c=r.PriorityQueue,d={},h;u=u||{};for(h in c)c.hasOwnProperty(h)&&(d[h]=c[h]);return d.queue=[],d.sorter=u.sorter||c.default_sorter,d},default_sorter:function(u,c){return u.cost-c.cost},push:function(u,c){var d={value:u,cost:c};this.queue.push(d),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};i.exports=r})(fd)),fd.exports}var nx;function IN(){return nx||(nx=1,(function(i){const r=Jl(),u=QN(),c=XN(),d=KN(),h=ZN(),p=Ib(),g=Zl(),b=JN();function E(G){return unescape(encodeURIComponent(G)).length}function v(G,X,le){const W=[];let me;for(;(me=G.exec(le))!==null;)W.push({data:me[0],index:me.index,mode:X,length:me[0].length});return W}function x(G){const X=v(p.NUMERIC,r.NUMERIC,G),le=v(p.ALPHANUMERIC,r.ALPHANUMERIC,G);let W,me;return g.isKanjiModeEnabled()?(W=v(p.BYTE,r.BYTE,G),me=v(p.KANJI,r.KANJI,G)):(W=v(p.BYTE_KANJI,r.BYTE,G),me=[]),X.concat(le,W,me).sort(function(Y,R){return Y.index-R.index}).map(function(Y){return{data:Y.data,mode:Y.mode,length:Y.length}})}function C(G,X){switch(X){case r.NUMERIC:return u.getBitsLength(G);case r.ALPHANUMERIC:return c.getBitsLength(G);case r.KANJI:return h.getBitsLength(G);case r.BYTE:return d.getBitsLength(G)}}function U(G){return G.reduce(function(X,le){const W=X.length-1>=0?X[X.length-1]:null;return W&&W.mode===le.mode?(X[X.length-1].data+=le.data,X):(X.push(le),X)},[])}function Z(G){const X=[];for(let le=0;le<G.length;le++){const W=G[le];switch(W.mode){case r.NUMERIC:X.push([W,{data:W.data,mode:r.ALPHANUMERIC,length:W.length},{data:W.data,mode:r.BYTE,length:W.length}]);break;case r.ALPHANUMERIC:X.push([W,{data:W.data,mode:r.BYTE,length:W.length}]);break;case r.KANJI:X.push([W,{data:W.data,mode:r.BYTE,length:E(W.data)}]);break;case r.BYTE:X.push([{data:W.data,mode:r.BYTE,length:E(W.data)}])}}return X}function D(G,X){const le={},W={start:{}};let me=["start"];for(let J=0;J<G.length;J++){const Y=G[J],R=[];for(let I=0;I<Y.length;I++){const ie=Y[I],$=""+J+I;R.push($),le[$]={node:ie,lastCount:0},W[$]={};for(let te=0;te<me.length;te++){const Q=me[te];le[Q]&&le[Q].node.mode===ie.mode?(W[Q][$]=C(le[Q].lastCount+ie.length,ie.mode)-C(le[Q].lastCount,ie.mode),le[Q].lastCount+=ie.length):(le[Q]&&(le[Q].lastCount=ie.length),W[Q][$]=C(ie.length,ie.mode)+4+r.getCharCountIndicator(ie.mode,X))}}me=R}for(let J=0;J<me.length;J++)W[me[J]].end=0;return{map:W,table:le}}function B(G,X){let le;const W=r.getBestModeForData(G);if(le=r.from(X,W),le!==r.BYTE&&le.bit<W.bit)throw new Error('"'+G+'" cannot be encoded with mode '+r.toString(le)+`.
387
- Suggested mode is: `+r.toString(W));switch(le===r.KANJI&&!g.isKanjiModeEnabled()&&(le=r.BYTE),le){case r.NUMERIC:return new u(G);case r.ALPHANUMERIC:return new c(G);case r.KANJI:return new h(G);case r.BYTE:return new d(G)}}i.fromArray=function(X){return X.reduce(function(le,W){return typeof W=="string"?le.push(B(W,null)):W.data&&le.push(B(W.data,W.mode)),le},[])},i.fromString=function(X,le){const W=x(X,g.isKanjiModeEnabled()),me=Z(W),J=D(me,le),Y=b.find_path(J.map,"start","end"),R=[];for(let I=1;I<Y.length-1;I++)R.push(J.table[Y[I]].node);return i.fromArray(U(R))},i.rawSplit=function(X){return i.fromArray(x(X,g.isKanjiModeEnabled()))}})(rd)),rd}var lx;function PN(){if(lx)return Ju;lx=1;const i=Zl(),r=Ud(),u=RN(),c=DN(),d=BN(),h=UN(),p=LN(),g=Zb(),b=GN(),E=VN(),v=YN(),x=Jl(),C=IN();function U(J,Y){const R=J.size,I=h.getPositions(Y);for(let ie=0;ie<I.length;ie++){const $=I[ie][0],te=I[ie][1];for(let Q=-1;Q<=7;Q++)if(!($+Q<=-1||R<=$+Q))for(let ae=-1;ae<=7;ae++)te+ae<=-1||R<=te+ae||(Q>=0&&Q<=6&&(ae===0||ae===6)||ae>=0&&ae<=6&&(Q===0||Q===6)||Q>=2&&Q<=4&&ae>=2&&ae<=4?J.set($+Q,te+ae,!0,!0):J.set($+Q,te+ae,!1,!0))}}function Z(J){const Y=J.size;for(let R=8;R<Y-8;R++){const I=R%2===0;J.set(R,6,I,!0),J.set(6,R,I,!0)}}function D(J,Y){const R=d.getPositions(Y);for(let I=0;I<R.length;I++){const ie=R[I][0],$=R[I][1];for(let te=-2;te<=2;te++)for(let Q=-2;Q<=2;Q++)te===-2||te===2||Q===-2||Q===2||te===0&&Q===0?J.set(ie+te,$+Q,!0,!0):J.set(ie+te,$+Q,!1,!0)}}function B(J,Y){const R=J.size,I=E.getEncodedBits(Y);let ie,$,te;for(let Q=0;Q<18;Q++)ie=Math.floor(Q/3),$=Q%3+R-8-3,te=(I>>Q&1)===1,J.set(ie,$,te,!0),J.set($,ie,te,!0)}function G(J,Y,R){const I=J.size,ie=v.getEncodedBits(Y,R);let $,te;for($=0;$<15;$++)te=(ie>>$&1)===1,$<6?J.set($,8,te,!0):$<8?J.set($+1,8,te,!0):J.set(I-15+$,8,te,!0),$<8?J.set(8,I-$-1,te,!0):$<9?J.set(8,15-$-1+1,te,!0):J.set(8,15-$-1,te,!0);J.set(I-8,8,1,!0)}function X(J,Y){const R=J.size;let I=-1,ie=R-1,$=7,te=0;for(let Q=R-1;Q>0;Q-=2)for(Q===6&&Q--;;){for(let ae=0;ae<2;ae++)if(!J.isReserved(ie,Q-ae)){let pe=!1;te<Y.length&&(pe=(Y[te]>>>$&1)===1),J.set(ie,Q-ae,pe),$--,$===-1&&(te++,$=7)}if(ie+=I,ie<0||R<=ie){ie-=I,I=-I;break}}}function le(J,Y,R){const I=new u;R.forEach(function(ae){I.put(ae.mode.bit,4),I.put(ae.getLength(),x.getCharCountIndicator(ae.mode,J)),ae.write(I)});const ie=i.getSymbolTotalCodewords(J),$=g.getTotalCodewordsCount(J,Y),te=(ie-$)*8;for(I.getLengthInBits()+4<=te&&I.put(0,4);I.getLengthInBits()%8!==0;)I.putBit(0);const Q=(te-I.getLengthInBits())/8;for(let ae=0;ae<Q;ae++)I.put(ae%2?17:236,8);return W(I,J,Y)}function W(J,Y,R){const I=i.getSymbolTotalCodewords(Y),ie=g.getTotalCodewordsCount(Y,R),$=I-ie,te=g.getBlocksCount(Y,R),Q=I%te,ae=te-Q,pe=Math.floor(I/te),T=Math.floor($/te),F=T+1,M=pe-T,se=new b(M);let V=0;const Me=new Array(te),Ue=new Array(te);let Ge=0;const N=new Uint8Array(J.buffer);for(let fe=0;fe<te;fe++){const Se=fe<ae?T:F;Me[fe]=N.slice(V,V+Se),Ue[fe]=se.encode(Me[fe]),V+=Se,Ge=Math.max(Ge,Se)}const S=new Uint8Array(I);let P=0,ne,ye;for(ne=0;ne<Ge;ne++)for(ye=0;ye<te;ye++)ne<Me[ye].length&&(S[P++]=Me[ye][ne]);for(ne=0;ne<M;ne++)for(ye=0;ye<te;ye++)S[P++]=Ue[ye][ne];return S}function me(J,Y,R,I){let ie;if(Array.isArray(J))ie=C.fromArray(J);else if(typeof J=="string"){let pe=Y;if(!pe){const T=C.rawSplit(J);pe=E.getBestVersionForData(T,R)}ie=C.fromString(J,pe||40)}else throw new Error("Invalid data");const $=E.getBestVersionForData(ie,R);if(!$)throw new Error("The amount of data is too big to be stored in a QR Code");if(!Y)Y=$;else if(Y<$)throw new Error(`
388
- The chosen QR Code version cannot contain this amount of data.
389
- Minimum version required to store current data is: `+$+`.
390
- `);const te=le(Y,R,ie),Q=i.getSymbolSize(Y),ae=new c(Q);return U(ae,Y),Z(ae),D(ae,Y),G(ae,R,0),Y>=7&&B(ae,Y),X(ae,te),isNaN(I)&&(I=p.getBestMask(ae,G.bind(null,ae,R))),p.applyMask(I,ae),G(ae,R,I),{modules:ae,version:Y,errorCorrectionLevel:R,maskPattern:I,segments:ie}}return Ju.create=function(Y,R){if(typeof Y>"u"||Y==="")throw new Error("No input text");let I=r.M,ie,$;return typeof R<"u"&&(I=r.from(R.errorCorrectionLevel,r.M),ie=E.from(R.version),$=p.from(R.maskPattern),R.toSJISFunc&&i.setToSJISFunction(R.toSJISFunc)),me(Y,ie,I,$)},Ju}var hd={},md={},ax;function Pb(){return ax||(ax=1,(function(i){function r(u){if(typeof u=="number"&&(u=u.toString()),typeof u!="string")throw new Error("Color should be defined as hex string");let c=u.slice().replace("#","").split("");if(c.length<3||c.length===5||c.length>8)throw new Error("Invalid hex color: "+u);(c.length===3||c.length===4)&&(c=Array.prototype.concat.apply([],c.map(function(h){return[h,h]}))),c.length===6&&c.push("F","F");const d=parseInt(c.join(""),16);return{r:d>>24&255,g:d>>16&255,b:d>>8&255,a:d&255,hex:"#"+c.slice(0,6).join("")}}i.getOptions=function(c){c||(c={}),c.color||(c.color={});const d=typeof c.margin>"u"||c.margin===null||c.margin<0?4:c.margin,h=c.width&&c.width>=21?c.width:void 0,p=c.scale||4;return{width:h,scale:h?4:p,margin:d,color:{dark:r(c.color.dark||"#000000ff"),light:r(c.color.light||"#ffffffff")},type:c.type,rendererOpts:c.rendererOpts||{}}},i.getScale=function(c,d){return d.width&&d.width>=c+d.margin*2?d.width/(c+d.margin*2):d.scale},i.getImageWidth=function(c,d){const h=i.getScale(c,d);return Math.floor((c+d.margin*2)*h)},i.qrToImageData=function(c,d,h){const p=d.modules.size,g=d.modules.data,b=i.getScale(p,h),E=Math.floor((p+h.margin*2)*b),v=h.margin*b,x=[h.color.light,h.color.dark];for(let C=0;C<E;C++)for(let U=0;U<E;U++){let Z=(C*E+U)*4,D=h.color.light;if(C>=v&&U>=v&&C<E-v&&U<E-v){const B=Math.floor((C-v)/b),G=Math.floor((U-v)/b);D=x[g[B*p+G]?1:0]}c[Z++]=D.r,c[Z++]=D.g,c[Z++]=D.b,c[Z]=D.a}}})(md)),md}var ix;function FN(){return ix||(ix=1,(function(i){const r=Pb();function u(d,h,p){d.clearRect(0,0,h.width,h.height),h.style||(h.style={}),h.height=p,h.width=p,h.style.height=p+"px",h.style.width=p+"px"}function c(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}i.render=function(h,p,g){let b=g,E=p;typeof b>"u"&&(!p||!p.getContext)&&(b=p,p=void 0),p||(E=c()),b=r.getOptions(b);const v=r.getImageWidth(h.modules.size,b),x=E.getContext("2d"),C=x.createImageData(v,v);return r.qrToImageData(C.data,h,b),u(x,E,v),x.putImageData(C,0,0),E},i.renderToDataURL=function(h,p,g){let b=g;typeof b>"u"&&(!p||!p.getContext)&&(b=p,p=void 0),b||(b={});const E=i.render(h,p,b),v=b.type||"image/png",x=b.rendererOpts||{};return E.toDataURL(v,x.quality)}})(hd)),hd}var pd={},sx;function $N(){if(sx)return pd;sx=1;const i=Pb();function r(d,h){const p=d.a/255,g=h+'="'+d.hex+'"';return p<1?g+" "+h+'-opacity="'+p.toFixed(2).slice(1)+'"':g}function u(d,h,p){let g=d+h;return typeof p<"u"&&(g+=" "+p),g}function c(d,h,p){let g="",b=0,E=!1,v=0;for(let x=0;x<d.length;x++){const C=Math.floor(x%h),U=Math.floor(x/h);!C&&!E&&(E=!0),d[x]?(v++,x>0&&C>0&&d[x-1]||(g+=E?u("M",C+p,.5+U+p):u("m",b,0),b=0,E=!1),C+1<h&&d[x+1]||(g+=u("h",v),v=0)):b++}return g}return pd.render=function(h,p,g){const b=i.getOptions(p),E=h.modules.size,v=h.modules.data,x=E+b.margin*2,C=b.color.light.a?"<path "+r(b.color.light,"fill")+' d="M0 0h'+x+"v"+x+'H0z"/>':"",U="<path "+r(b.color.dark,"stroke")+' d="'+c(v,E,b.margin)+'"/>',Z='viewBox="0 0 '+x+" "+x+'"',B='<svg xmlns="http://www.w3.org/2000/svg" '+(b.width?'width="'+b.width+'" height="'+b.width+'" ':"")+Z+' shape-rendering="crispEdges">'+C+U+`</svg>
391
- `;return typeof g=="function"&&g(null,B),B},pd}var rx;function WN(){if(rx)return qa;rx=1;const i=kN(),r=PN(),u=FN(),c=$N();function d(h,p,g,b,E){const v=[].slice.call(arguments,1),x=v.length,C=typeof v[x-1]=="function";if(!C&&!i())throw new Error("Callback required as last argument");if(C){if(x<2)throw new Error("Too few arguments provided");x===2?(E=g,g=p,p=b=void 0):x===3&&(p.getContext&&typeof E>"u"?(E=b,b=void 0):(E=b,b=g,g=p,p=void 0))}else{if(x<1)throw new Error("Too few arguments provided");return x===1?(g=p,p=b=void 0):x===2&&!p.getContext&&(b=g,g=p,p=void 0),new Promise(function(U,Z){try{const D=r.create(g,b);U(h(D,p,b))}catch(D){Z(D)}})}try{const U=r.create(g,b);E(null,h(U,p,b))}catch(U){E(U)}}return qa.create=r.create,qa.toCanvas=d.bind(null,u.render),qa.toDataURL=d.bind(null,u.renderToDataURL),qa.toString=d.bind(null,function(h,p,g){return c.render(h,g)}),qa}var Fb=WN();const gd=Td(Fb);function ew(){return typeof window<"u"&&!!window.LevixHost}const tw=({status:i,onRefresh:r,onStatusUpdate:u})=>{var Ue;const{t:c,language:d}=rn(),{toast:h}=yl(),[p,g]=K.useState(!1),[b,E]=K.useState(!1),[v,x]=K.useState(null),[C,U]=K.useState("pairing"),[Z,D]=K.useState(""),[B,G]=K.useState(!1),X=(i==null?void 0:i.state)||"idle",le=X==="connected",W=X==="waiting_for_qr",me=X==="starting"||X==="linking",J=X==="reconnecting",Y=X==="paused",R=X==="logged_out",I=!!(i!=null&&i.linked)&&!R,ie=!I,$=!!(i!=null&&i.canUnlink),te=(i==null?void 0:i.isOnline)!==!1,Q=Y||X==="disconnected"||X==="retry_exhausted"?d==="ar"?"استئناف الجلسة":"Resume session":d==="ar"?"الاتصال":"Connect";K.useEffect(()=>{if(i!=null&&i.qr){const Ge=Fb.toDataURL||(gd==null?void 0:gd.toDataURL);typeof Ge=="function"&&Ge(i.qr,{width:280,margin:2,color:{dark:"#0b1629",light:"#ffffff"}}).then(N=>x(N)).catch(()=>x(null))}else x(null)},[i==null?void 0:i.qr]),K.useEffect(()=>{if(W&&!(i!=null&&i.qr)&&!(i!=null&&i.pairingCode)){const Ge=setInterval(()=>{r==null||r()},1500);return()=>clearInterval(Ge)}},[W,i==null?void 0:i.qr,i==null?void 0:i.pairingCode,r]);const ae=async(Ge,N)=>{E(!0);try{const S=await Ge();S&&typeof S=="object"&&"session"in S&&(u==null||u(S.session)),h(N,"success"),await(r==null?void 0:r())}catch(S){h(S instanceof Error?S.message:String(S),"error")}finally{E(!1)}},pe=async Ge=>{Ge&&Ge.preventDefault();const N=Z.replace(/\D/g,"");if(!N){h(d==="ar"?"يرجى إدخال رقم الهاتف مع كود الدولة أولاً.":"Please enter your phone number with country code.","error");return}if(N.startsWith("0")){h(d==="ar"?"يرجى حذف الصفر في البداية وكتابة كود الدولة (مثلاً: 2010... وليس 010...)":"Drop the leading 0 and include the country code (e.g. 2010... not 010...).","error");return}await ae(()=>re.startSession({method:"pairing",phone:N}),d==="ar"?"جاري طلب كود الربط من واتساب...":"Requesting pairing code...")},T=async()=>{await ae(()=>re.startSession({method:"qr"}),d==="ar"?"جاري بدء الاتصال برمز QR...":"Starting QR code connection...")},F=async()=>{await ae(re.stopSession,d==="ar"?"تم الإلغاء، أدخل رقم هاتفك":"Cancelled, enter your phone number"),U("pairing")},M=()=>{i!=null&&i.pairingCode&&(navigator.clipboard.writeText(i.pairingCode.replace(/\s+/g,"")),G(!0),h(d==="ar"?"تم نسخ كود الربط!":"Pairing code copied!","success"),setTimeout(()=>G(!1),2500))},se=async()=>{g(!1),await ae(re.unlinkSession,d==="ar"?"تم إلغاء ربط الجلسة بنجاح":"Session unlinked successfully.")},V=(Ue=i==null?void 0:i.user)!=null&&Ue.id?i.user.id.split("@")[0].split(":")[0]:null,Me=ew();return o.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-gradient-to-br from-panel-raised via-panel to-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-line",children:[o.jsxs("div",{className:"flex items-center gap-3.5",children:[o.jsx("div",{className:`w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 border ${le?"bg-ok/15 text-ok border-ok/30 shadow-sm shadow-ok/20":W?"bg-warn/15 text-warn border-warn/30 shadow-sm shadow-warn/20":me||J?"bg-brand-blue/15 text-brand-blue border-brand-blue/30 shadow-sm shadow-brand-blue/20":"bg-info/15 text-info border-info/30 shadow-sm shadow-info/20"}`,children:o.jsx(Ki,{size:24})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg sm:text-xl font-extrabold text-text-main",children:c("connection")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:le?c("sessionActive"):Y?c("paused"):I?d==="ar"?"جلسة محفوظة — يمكن استئنافها":"Saved session — ready to resume":c("sessionOffline")})]})]}),o.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto",children:o.jsxs("span",{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full text-xs font-bold border ${le?"bg-ok/15 text-ok border-ok/30":W?"bg-warn/15 text-warn border-warn/30":me||J?"bg-brand-blue/15 text-brand-blue border-brand-blue/30 animate-pulse":"bg-brand-cyan/15 text-brand-cyan border-brand-cyan/30"}`,children:[o.jsx("span",{className:"pulse-dot"}),o.jsx("span",{children:c(X,X)})]})})]}),i!=null&&i.retryInSeconds?o.jsxs("div",{className:"rounded-xl border border-warn/30 bg-warn/10 p-3.5 flex items-center gap-3 text-warn",children:[o.jsx(qr,{size:20,className:"shrink-0"}),o.jsxs("div",{className:"text-xs sm:text-sm",children:[o.jsx("span",{className:"font-bold",children:d==="ar"?"إعادة الاتصال قريباً":"Reconnecting soon"})," ","•"," ",o.jsx("span",{children:d==="ar"?`المحاولة التالية خلال ${i.retryInSeconds} ثانية`:`Next attempt in ${i.retryInSeconds}s`})]})]}):null,le&&V&&o.jsxs("div",{className:"rounded-xl border border-ok/30 bg-ok/10 p-3.5 sm:p-4 flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-ok/20 text-ok flex items-center justify-center shrink-0",children:o.jsx(Qr,{size:20})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-xs text-muted font-medium",children:c("connectedNumber")}),o.jsxs("div",{className:"text-sm sm:text-base font-mono font-bold text-text-main",dir:"ltr",children:["+",V]})]})]}),o.jsx("span",{className:"text-xs font-bold text-ok px-2.5 py-1 rounded-lg bg-ok/15 border border-ok/30 shrink-0",children:d==="ar"?"متصل":"Online"})]}),o.jsxs("div",{children:[le&&o.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5 sm:gap-3",children:[o.jsxs("button",{type:"button",onClick:()=>ae(re.stopSession,c("stop")),disabled:b,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 px-6 h-12 sm:h-11 rounded-xl border border-danger/40 bg-danger/10 hover:bg-danger/20 text-danger font-bold text-sm transition-all focus-visible:ring-2 focus-visible:ring-danger/50 disabled:opacity-50",children:[o.jsx(vd,{size:16}),o.jsx("span",{children:c("stop")})]}),o.jsxs("div",{className:"flex items-center gap-2.5 w-full sm:w-auto",children:[o.jsxs("button",{type:"button",onClick:()=>ae(re.reconnectSession,c("reconnecting")),disabled:b,className:"flex-1 sm:flex-initial inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50",title:c("reconnect"),children:[o.jsx(Gr,{size:15}),o.jsx("span",{children:c("reconnect")})]}),o.jsxs("button",{type:"button",onClick:()=>g(!0),disabled:b,className:"flex-1 sm:flex-initial inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-danger/30 bg-danger/10 hover:bg-danger/20 text-danger font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-danger/50 disabled:opacity-50",title:c("unlink"),children:[o.jsx(qu,{size:15}),o.jsx("span",{children:c("unlink")})]}),!Me&&o.jsxs("button",{type:"button",onClick:()=>ae(re.restartBot,c("restart")),disabled:b,className:"flex-1 sm:flex-initial inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50",title:c("restart"),children:[o.jsx(_r,{size:15}),o.jsx("span",{children:c("restart")})]})]})]}),(me||W||J)&&o.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5 sm:gap-3 w-full sm:w-auto",children:[o.jsxs("button",{type:"button",onClick:()=>ae(re.stopSession,c("stop")),disabled:b,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 px-6 h-12 sm:h-11 rounded-xl border border-danger/40 bg-danger/10 hover:bg-danger/20 text-danger font-bold text-sm transition-all focus-visible:ring-2 focus-visible:ring-danger/50 disabled:opacity-50",children:[o.jsx(vd,{size:16}),o.jsx("span",{children:d==="ar"?"إلغاء المحاولة":"Cancel Attempt"})]}),!Me&&o.jsxs("button",{type:"button",onClick:()=>ae(re.restartBot,c("restart")),disabled:b,className:"inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50",title:c("restart"),children:[o.jsx(_r,{size:15}),o.jsx("span",{children:c("restart")})]})]}),!le&&!me&&!W&&!J&&I&&o.jsxs("div",{className:"flex flex-col gap-3 w-full max-w-xl",children:[Y&&o.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:te?d==="ar"?"الجلسة محفوظة. اضغط استئناف لإعادة استخدام نفس حساب واتساب.":"This WhatsApp session is saved. Resume to reconnect with the same account.":d==="ar"?"الاتصال متوقف بسبب انقطاع الإنترنت. سيُستأنف تلقائياً عند عودة الشبكة، أو اضغط استئناف.":"Paused while the device is offline. It will resume when the network returns, or tap Resume."}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5",children:[o.jsxs("button",{type:"button",onClick:()=>ae(re.startSession,Q),disabled:b,className:"inline-flex items-center justify-center gap-2 px-6 h-12 sm:h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-sm shadow-md shadow-brand-blue/25 transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50 w-full sm:w-fit",children:[o.jsx(Ki,{size:16}),o.jsx("span",{children:Q})]}),$&&o.jsxs("button",{type:"button",onClick:()=>g(!0),disabled:b,className:"inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-danger/30 bg-danger/10 hover:bg-danger/20 text-danger font-bold text-xs sm:text-sm transition-all disabled:opacity-50",title:c("unlink"),children:[o.jsx(qu,{size:15}),o.jsx("span",{children:c("unlink")})]}),!Me&&o.jsxs("button",{type:"button",onClick:()=>ae(re.restartBot,c("restart")),disabled:b,className:"inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-all disabled:opacity-50",title:c("restart"),children:[o.jsx(_r,{size:15}),o.jsx("span",{children:c("restart")})]})]})]}),!le&&!me&&!W&&!J&&ie&&o.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[o.jsxs("div",{className:"flex items-center gap-1.5 p-1 rounded-xl bg-panel-raised border border-line w-full sm:w-fit",children:[o.jsxs("button",{type:"button",onClick:()=>U("pairing"),className:`flex-1 sm:flex-initial inline-flex items-center justify-center gap-2 px-4 h-10 rounded-lg text-xs sm:text-sm font-bold transition-all ${C==="pairing"?"bg-brand-blue text-white shadow-sm shadow-brand-blue/30":"text-muted hover:text-text-main"}`,children:[o.jsx(Lu,{size:16}),o.jsx("span",{children:d==="ar"?"كود الربط الرقمي (الهاتف)":"Pairing Code (Phone)"})]}),o.jsxs("button",{type:"button",onClick:()=>U("qr"),className:`flex-1 sm:flex-initial inline-flex items-center justify-center gap-2 px-4 h-10 rounded-lg text-xs sm:text-sm font-bold transition-all ${C==="qr"?"bg-brand-blue text-white shadow-sm shadow-brand-blue/30":"text-muted hover:text-text-main"}`,children:[o.jsx(Uu,{size:16}),o.jsx("span",{children:d==="ar"?"مسح رمز QR":"QR Code Scan"})]})]}),C==="pairing"&&o.jsxs("form",{onSubmit:pe,className:"flex flex-col gap-3 max-w-xl w-full",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(kv,{size:17,className:"absolute top-1/2 -translate-y-1/2 start-3.5 text-muted pointer-events-none"}),o.jsx("input",{type:"tel",value:Z,onChange:Ge=>D(Ge.target.value),placeholder:d==="ar"?"201012345678 (مع كود الدولة)":"e.g. 201012345678",dir:"ltr",className:"w-full h-12 sm:h-11 ps-10 pe-4 rounded-xl border border-line bg-panel-raised text-text-main font-mono text-sm placeholder:text-muted/60 focus:border-brand-blue focus:ring-2 focus:ring-brand-blue/20 outline-none transition-all"})]}),o.jsxs("button",{type:"submit",disabled:b,className:"inline-flex items-center justify-center gap-2 px-6 h-12 sm:h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-sm shadow-md shadow-brand-blue/25 transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50 shrink-0",children:[o.jsx(yd,{size:16}),o.jsx("span",{children:d==="ar"?"الحصول على كود الربط":"Get Pairing Code"})]})]}),o.jsx("p",{className:"text-xs text-muted leading-relaxed",children:d==="ar"?"💡 أدخل رقم هاتفك مسبوقاً بكود الدولة وبدون 0 في البداية (مثال: 2010... وليس 010...). سيظهر لك كود لإدخاله في واتساب فوراً.":"💡 Enter your number with country code, no leading zeros (e.g. 2010... not 010...). A code will appear to enter into WhatsApp."})]}),C==="qr"&&o.jsxs("div",{className:"flex flex-col gap-2 max-w-xl",children:[o.jsxs("button",{type:"button",onClick:T,disabled:b,className:"inline-flex items-center justify-center gap-2 px-6 h-12 sm:h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-sm shadow-md shadow-brand-blue/25 transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50 w-full sm:w-fit",children:[o.jsx(Uu,{size:18}),o.jsx("span",{children:d==="ar"?"بدء الربط عبر رمز QR":"Start QR Linking"})]}),o.jsx("p",{className:"text-xs text-muted",children:d==="ar"?"سيتم إنشاء رمز QR لمسحه من هاتف آخر أو من شاشة الحاسوب عبر كاميرا واتساب.":"Generates a QR code to be scanned using WhatsApp camera on another device or screen."})]}),o.jsxs("div",{className:"flex items-center gap-2.5 pt-1",children:[$&&o.jsxs("button",{type:"button",onClick:()=>g(!0),disabled:b,className:"inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-danger/30 bg-danger/10 hover:bg-danger/20 text-danger font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-danger/50 disabled:opacity-50",title:c("unlink"),children:[o.jsx(qu,{size:15}),o.jsx("span",{children:c("unlink")})]}),!Me&&o.jsxs("button",{type:"button",onClick:()=>ae(re.restartBot,c("restart")),disabled:b,className:"inline-flex items-center justify-center gap-1.5 sm:gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50",title:c("restart"),children:[o.jsx(_r,{size:15}),o.jsx("span",{children:c("restart")})]})]})]})]})]}),me&&o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-6 sm:p-8 shadow-sm flex flex-col items-center text-center",children:[o.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-blue/15 text-brand-blue flex items-center justify-center mb-4 border border-brand-blue/30",children:o.jsx(Gr,{size:24,className:"animate-spin"})}),o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main mb-1.5",children:X==="linking"?d==="ar"?"جاري إتمام الربط مع الهاتف...":"Finishing link handshake...":d==="ar"?"جاري بدء تشغيل الجلسة...":"Initializing WhatsApp session..."}),o.jsx("p",{className:"text-xs sm:text-sm text-muted max-w-md",children:d==="ar"?"يتم الآن إنشاء مقبس الاتصال، ستظهر بيانات الربط خلال ثوانٍ معدودة.":"Creating connection socket. Pairing details will appear in just a few seconds."})]}),W&&o.jsx("div",{className:"rounded-2xl border border-line bg-panel p-6 sm:p-8 shadow-sm flex flex-col items-center text-center max-w-2xl mx-auto w-full",children:i!=null&&i.pairingCode?o.jsxs("div",{className:"flex flex-col items-center w-full animate-in fade-in zoom-in-95 duration-300",children:[o.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-cyan/15 text-brand-cyan flex items-center justify-center mb-4 border border-brand-cyan/30",children:o.jsx(Lu,{size:26})}),o.jsx("h3",{className:"text-lg sm:text-xl font-bold text-text-main mb-1.5",children:d==="ar"?"كود الربط الرقمي مع واتساب":"WhatsApp Pairing Code"}),o.jsx("p",{className:"text-xs sm:text-sm text-muted max-w-md mb-6",children:d==="ar"?"أدخل هذا الكود في تطبيق واتساب على هاتفك لتأكيد الربط مباشرة.":"Enter this code into WhatsApp on your phone to complete pairing."}),o.jsxs("div",{className:"rounded-2xl border-2 border-brand-cyan/40 bg-brand-cyan/10 p-5 sm:p-6 w-full max-w-md flex flex-col items-center gap-4 shadow-lg shadow-brand-cyan/10",children:[o.jsx("div",{className:"text-xs font-bold text-brand-cyan uppercase tracking-wider",children:d==="ar"?"كود الربط المكون من 8 خانات":"8-Digit Pairing Code"}),o.jsx("div",{className:"text-3xl sm:text-4xl font-mono font-extrabold tracking-widest text-brand-cyan select-all",dir:"ltr",children:i.pairingCode.length===8?`${i.pairingCode.slice(0,4)} - ${i.pairingCode.slice(4)}`:i.pairingCode}),o.jsxs("button",{type:"button",onClick:M,className:"inline-flex items-center justify-center gap-2 px-6 h-11 rounded-xl bg-brand-cyan hover:bg-brand-cyan/90 text-bg font-extrabold text-sm shadow-md shadow-brand-cyan/25 transition-all active:scale-95",children:[B?o.jsx(Lr,{size:18}):o.jsx(Nv,{size:18}),o.jsx("span",{children:B?d==="ar"?"تم النسخ بنجاح!":"Copied!":d==="ar"?"نسخ كود الربط":"Copy Code"})]})]}),o.jsxs("div",{className:"mt-6 p-4 rounded-xl border border-line bg-panel-raised text-start w-full max-w-md",children:[o.jsx("div",{className:"text-xs font-bold text-text-main mb-3",children:d==="ar"?"خطوات الإدخال في واتساب:":"Steps to enter in WhatsApp:"}),o.jsxs("ol",{className:"text-xs text-muted space-y-2 list-decimal list-inside leading-relaxed",children:[o.jsx("li",{children:d==="ar"?"افتح تطبيق واتساب على هاتفك.":"Open WhatsApp on your phone."}),o.jsx("li",{children:d==="ar"?"اذهب إلى الإعدادات > الأجهزة المرتبطة > ربط جهاز.":"Go to Settings > Linked Devices > Link a Device."}),o.jsx("li",{children:o.jsx("strong",{className:"text-text-main",children:d==="ar"?"اضغط على «الربط باستخدام رقم الهاتف بدلاً من ذلك» أسفل الشاشة.":"Tap 'Link with phone number instead' at bottom of screen."})}),o.jsx("li",{children:d==="ar"?"اكتب هذا الكود وسيتم ربط البوت مباشرة!":"Enter the code above to connect immediately!"})]})]})]}):v?o.jsxs("div",{className:"flex flex-col items-center w-full",children:[o.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-cyan/15 text-brand-cyan flex items-center justify-center mb-4 border border-brand-cyan/30",children:o.jsx(Uu,{size:26})}),o.jsx("h3",{className:"text-lg font-bold text-text-main mb-1.5",children:c("waiting_for_qr")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted max-w-md mb-6",children:d==="ar"?"افتح واتساب على هاتفك، اذهب إلى الأجهزة المرتبطة، ثم امسح هذا الرمز للربط.":"Open WhatsApp on your phone, go to Linked Devices, and scan this code to link."}),o.jsx("div",{className:"p-3 sm:p-4 bg-white rounded-2xl shadow-xl border border-line animate-in fade-in zoom-in-95 duration-300",children:o.jsx("img",{src:v,alt:"WhatsApp QR Code",className:"w-56 h-56 sm:w-64 sm:h-64 block rounded-lg"})}),o.jsxs("div",{className:"mt-6 pt-5 border-t border-line w-full max-w-md flex flex-col items-center gap-2.5",children:[o.jsx("p",{className:"text-xs text-muted text-center",children:d==="ar"?"هل تستخدم التطبيق من نفس الهاتف ولا تستطيع مسح الرمز؟":"Using the app on the same phone and can't scan?"}),o.jsxs("button",{type:"button",onClick:F,disabled:b,className:"w-full inline-flex items-center justify-center gap-2 px-4 h-12 sm:h-11 rounded-xl border border-brand-cyan/40 bg-brand-cyan/10 hover:bg-brand-cyan/20 text-brand-cyan font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-cyan/50",children:[o.jsx(Lu,{size:17}),o.jsx("span",{children:d==="ar"?"الربط برقم الهاتف (كود الربط الرقمي) بدلاً من QR":"Link with Phone Pairing Code Instead"})]})]})]}):o.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-muted",children:[o.jsx("div",{className:"w-9 h-9 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin"}),o.jsx("span",{className:"text-xs sm:text-sm font-semibold animate-pulse",children:d==="ar"?"جاري تجهيز بيانات الربط من واتساب...":"Preparing pairing details from WhatsApp..."})]})}),o.jsx(Zi,{isOpen:p,onClose:()=>g(!1),title:c("unlink"),footer:o.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[o.jsx("button",{type:"button",onClick:()=>g(!1),className:"px-4 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors",children:c("cancel")}),o.jsx("button",{type:"button",onClick:se,className:"px-4 h-10 rounded-xl bg-danger hover:bg-danger/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-danger/25 transition-colors",children:c("unlink")})]}),children:o.jsx("p",{className:"text-xs sm:text-sm text-text-main leading-relaxed",children:d==="ar"?"هل أنت متأكد من رغبتك في إلغاء ربط جلسة واتساب الحالية؟ ستحتاج إلى مسح رمز QR جديد أو إدخال كود ربط لإعادة ربط الحساب.":"Are you sure you want to unlink this WhatsApp session? You will need to scan a new QR code or enter a pairing code to reconnect."})})]})},nw=()=>{const{t:i,language:r}=rn(),{toast:u}=yl(),[c,d]=K.useState([]),[h,p]=K.useState(!0),g=v=>{var U,Z;const x=v.jid||v.id||"",C=typeof v.antilink=="boolean"?v.antilink:!!(v.antilinkEnabled??((U=v.antilink)==null?void 0:U.enabled));return{...v,jid:x,subject:v.subject||"",memberCount:v.memberCount??v.participants??0,antilink:C,antilinkEnabled:C,welcomeEnabled:!!(v.welcomeEnabled??((Z=v.welcome_system)==null?void 0:Z.enabled)),mediaRestriction:v.mediaRestriction||"none"}},b=async()=>{try{const v=await re.getGroups();v!=null&&v.groups&&d(v.groups.map(g))}catch(v){u(v.message,"error")}finally{p(!1)}};K.useEffect(()=>{b()},[]);const E=async(v,x)=>{d(C=>C.map(U=>U.jid===v?{...U,...x}:U));try{await re.updateGroup(v,x),u(i("savedSuccessfully"),"success")}catch(C){u(C.message,"error"),b()}};return o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx("div",{className:"rounded-2xl border border-line bg-panel p-5 md:p-6 shadow-sm flex flex-col md:flex-row md:items-center justify-between gap-4",children:o.jsxs("div",{className:"flex items-center gap-3.5",children:[o.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-blue/10 text-brand-blue flex items-center justify-center shrink-0",children:o.jsx(Ga,{size:24})}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h2",{className:"text-lg md:text-xl font-bold text-text-main",children:i("groups")}),o.jsxs("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-brand-blue/10 text-brand-cyan border border-brand-cyan/20",children:[c.length," ",r==="ar"?"مجموعة":"groups"]})]}),o.jsx("p",{className:"text-xs md:text-sm text-muted mt-1",children:r==="ar"?"إدارة مجموعات واتساب، الحماية من الروابط، تقييد الوسائط، ورسائل الترحيب التلقائية":"WhatsApp group moderation, anti-link defense, media filtering, and automated greetings"})]})]})}),o.jsx("div",{className:"rounded-2xl border border-line bg-panel overflow-hidden shadow-sm overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[640px] text-start border-collapse text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-panel-raised border-b border-line text-xs font-bold text-muted uppercase tracking-wider",children:[o.jsx("th",{className:"px-5 py-4 text-start",children:i("thGroupName")}),o.jsx("th",{className:"px-5 py-4 text-start",children:i("thGroupJid")}),o.jsx("th",{className:"px-5 py-4 text-start",children:i("thMembers")}),o.jsx("th",{className:"px-5 py-4 text-center",children:i("thAntiLink")}),o.jsx("th",{className:"px-5 py-4 text-start",children:i("thMedia")}),o.jsx("th",{className:"px-5 py-4 text-center",children:i("thWelcome")})]})}),o.jsx("tbody",{className:"divide-y divide-line/40",children:h?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"text-center py-16 text-muted",children:o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[o.jsx("div",{className:"w-6 h-6 border-2 border-brand-blue border-t-transparent rounded-full animate-spin"}),o.jsx("span",{className:"text-xs",children:i("loading")})]})})}):c.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"text-center py-16 px-4",children:o.jsxs("div",{className:"max-w-md mx-auto flex flex-col items-center gap-3",children:[o.jsx("div",{className:"w-14 h-14 rounded-2xl bg-panel-raised flex items-center justify-center text-muted",children:o.jsx(Bv,{size:28})}),o.jsx("h4",{className:"text-base font-bold text-text-main",children:r==="ar"?"لا توجد مجموعات حتى الآن":"No active groups found"}),o.jsx("p",{className:"text-xs text-muted leading-relaxed",children:r==="ar"?"بمجرد إضافة البوت إلى مجموعات واتساب، ستظهر تلقائياً هنا مع خيارات الإشراف والحماية.":"Once the bot is added to WhatsApp groups, they will automatically appear here with full moderation and anti-link controls."})]})})}):c.map(v=>{var x;return o.jsxs("tr",{className:"hover:bg-panel-hover/50 transition-colors",children:[o.jsx("td",{className:"px-5 py-4 font-bold text-text-main",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-brand-blue/10 text-brand-cyan flex items-center justify-center font-bold text-sm shrink-0",children:(v.subject||"G").charAt(0).toUpperCase()}),o.jsx("span",{className:"line-clamp-1",children:v.subject||(r==="ar"?"مجموعة بدون اسم":"Unnamed group")})]})}),o.jsx("td",{className:"px-5 py-4 font-mono text-xs text-muted",children:o.jsx("bdi",{className:"px-2 py-1 rounded bg-bg-soft border border-line select-all",children:((x=v.jid)==null?void 0:x.split("@")[0])||v.jid})}),o.jsx("td",{className:"px-5 py-4",children:o.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-panel-raised border border-line text-xs font-semibold text-text-main",children:v.memberCount||"—"})}),o.jsx("td",{className:"px-5 py-4 text-center",children:o.jsx(Xl,{checked:!!v.antilink,onChange:C=>E(v.jid,{antilink:C})})}),o.jsx("td",{className:"px-5 py-4",children:o.jsxs("select",{className:"h-9 px-3 rounded-xl border border-line bg-panel-raised text-text-main text-xs focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:v.mediaRestriction||"none",onChange:C=>E(v.jid,{mediaRestriction:C.target.value}),children:[o.jsx("option",{value:"none",children:r==="ar"?"بلا قيود (الكل)":"No Restrictions"}),o.jsx("option",{value:"block_all",children:r==="ar"?"حظر كافة الوسائط":"Block All Media"})]})}),o.jsx("td",{className:"px-5 py-4 text-center",children:o.jsx(Xl,{checked:!!v.welcomeEnabled,onChange:C=>E(v.jid,{welcomeEnabled:C})})})]},v.jid)})})]})})]})},lw=({socket:i})=>{const{t:r,language:u}=rn(),[c,d]=K.useState([]),[h,p]=K.useState("all"),[g,b]=K.useState(!0),E=K.useRef(null);K.useEffect(()=>{re.getLogs().then(x=>{x!=null&&x.logs&&d(x.logs)}).catch(()=>{})},[]),K.useEffect(()=>{if(!i)return;const x=C=>{d(U=>[...U.slice(-400),C])};return i.on("log",x),()=>{i.off("log",x)}},[i]),K.useEffect(()=>{g&&E.current&&E.current.scrollIntoView({behavior:"smooth"})},[c,g]);const v=c.filter(x=>h==="all"?!0:x.level===h);return o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 md:p-5 shadow-sm flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:o.jsx(Va,{size:20})}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx("h2",{className:"text-base md:text-lg font-bold text-text-main",children:r("liveServerLogs")}),o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-mono font-bold bg-panel-raised border border-line text-muted",children:v.length})]}),o.jsx("p",{className:"text-xs text-muted mt-0.5",children:u==="ar"?"سجل أحداث النظام واتصالات واتساب واستدعاءات الذكاء الاصطناعي في الوقت الفعلي":"Real-time streaming console for WhatsApp socket, AI calls, and bot commands"})]})]}),o.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap sm:flex-nowrap",children:[o.jsxs("div",{className:"relative flex items-center",children:[o.jsx(jv,{size:15,className:"absolute start-3 text-muted pointer-events-none"}),o.jsxs("select",{className:"h-10 ps-9 pe-8 rounded-xl border border-line bg-panel-raised text-text-main text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:h,onChange:x=>p(x.target.value),children:[o.jsx("option",{value:"all",children:r("allLogs")}),o.jsx("option",{value:"info",children:"INFO"}),o.jsx("option",{value:"warn",children:"WARN"}),o.jsx("option",{value:"error",children:"ERROR"})]})]}),o.jsxs("button",{type:"button",onClick:()=>b(!g),className:`inline-flex items-center gap-1.5 px-3 h-10 rounded-xl border text-xs font-semibold transition-colors ${g?"bg-brand-cyan/15 text-brand-cyan border-brand-cyan/30":"bg-panel-raised text-muted border-line hover:text-text-main"}`,title:"Auto-scroll to latest log entry",children:[o.jsx(gv,{size:14,className:g?"animate-bounce":""}),o.jsx("span",{children:g?"Auto-scroll ON":"Auto-scroll OFF"})]}),o.jsxs("button",{type:"button",onClick:()=>d([]),className:"inline-flex items-center gap-1.5 px-3 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-muted hover:text-danger text-xs font-semibold transition-colors",title:"Clear logs view",children:[o.jsx(cb,{size:14}),o.jsx("span",{children:r("clearLogs")})]})]})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-[#030712] p-4 md:p-5 shadow-2xl h-[65vh] overflow-y-auto font-mono text-xs leading-relaxed flex flex-col gap-1.5 text-slate-300",dir:"ltr",children:[v.length===0?o.jsxs("div",{className:"m-auto text-center py-16 text-muted text-xs flex flex-col items-center gap-2",children:[o.jsx(Va,{size:24,className:"opacity-40"}),o.jsx("span",{children:r("noLogs")})]}):v.map((x,C)=>{const U=x.level==="error"?"text-red-400 bg-red-500/10 border-red-500/20":x.level==="warn"?"text-amber-300 bg-amber-500/10 border-amber-500/20":"text-cyan-400 bg-cyan-500/10 border-cyan-500/20";return o.jsxs("div",{className:"flex items-baseline gap-2.5 py-0.5 hover:bg-white/[0.03] px-1 rounded transition-colors",children:[o.jsx("span",{className:"text-slate-500 shrink-0 select-none text-[11px]",children:x.time||new Date().toLocaleTimeString()}),o.jsx("span",{className:`inline-flex items-center px-1.5 py-0.2 rounded border font-mono font-bold text-[10px] shrink-0 ${U}`,children:(x.level||"info").toUpperCase()}),o.jsx("span",{className:"text-slate-200 break-all font-mono",children:x.msg})]},C)}),o.jsx("div",{ref:E})]})]})},aw=({status:i,onNavigate:r})=>{var Z;const{t:u,language:c}=rn(),{toast:d}=yl(),[h,p]=K.useState(null),[g,b]=K.useState(!0);K.useEffect(()=>{let D=!0;return re.getStats().then(B=>{D&&(B!=null&&B.stats)&&p(B.stats)}).catch(B=>{d(B.message,"error")}).finally(()=>{D&&b(!1)}),()=>{D=!1}},[d]);const E=D=>{const B=Math.floor(D/86400),G=Math.floor(D%86400/3600),X=Math.floor(D%3600/60);return B?`${B}d ${G}h`:G?`${G}h ${X}m`:`${X}m`},v=(i==null?void 0:i.state)==="connected",x=async()=>{try{await re.startSession(),d(u("starting"),"info")}catch(D){d(D.message,"error")}},C=async()=>{try{await re.stopSession(),d(u("stop"),"info")}catch(D){d(D.message,"error")}},U=[{id:"connection",title:u("connection"),desc:v?u("connected"):u(i==null?void 0:i.state,"disconnected"),icon:Ki,color:"text-brand-cyan bg-brand-cyan/10 border-brand-cyan/20"},{id:"ai",title:u("ai"),desc:u("aiAssistantDesc")||"Autonomous tool-calling AI agent",icon:Ed,color:"text-purple-400 bg-purple-500/10 border-purple-500/20"},{id:"commands",title:u("commands"),desc:`${(h==null?void 0:h.commandCount)??56} active bot commands & aliases`,icon:Va,color:"text-brand-blue bg-blue-500/10 border-blue-500/20"},{id:"settings",title:u("settings"),desc:u("settingsSub")||"Prefix, ports, delays, security & storage",icon:tb,color:"text-ok bg-ok/10 border-ok/20"}];return o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-gradient-to-br from-panel-raised via-panel to-panel p-5 sm:p-6 shadow-sm flex flex-col sm:flex-row sm:items-center justify-between gap-5",children:[o.jsxs("div",{className:"flex items-center gap-4 min-w-0 flex-1",children:[o.jsx("div",{className:`w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 border ${v?"bg-ok/15 text-ok border-ok/30 shadow-sm shadow-ok/20":"bg-warn/15 text-warn border-warn/30 shadow-sm shadow-warn/20"}`,children:o.jsx(pv,{size:24})}),o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap",children:[o.jsx("h2",{className:"text-lg sm:text-xl font-extrabold text-text-main tracking-tight truncate",children:v?u("connected"):u(i==null?void 0:i.state,"disconnected")}),o.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-bold border ${v?"bg-ok/10 text-ok border-ok/30":"bg-warn/10 text-warn border-warn/30"}`,children:[o.jsx("span",{className:"pulse-dot"}),v?"ONLINE":"OFFLINE"]})]}),o.jsx("p",{className:"text-xs sm:text-sm text-muted truncate mt-1",children:v?(Z=i==null?void 0:i.user)!=null&&Z.id?o.jsx("bdi",{dir:"ltr",children:`+${i.user.id.split("@")[0]}`}):u("activeListening"):u("pausedOrLinking")})]})]}),o.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap shrink-0",children:[v?o.jsxs("button",{type:"button",onClick:C,className:"inline-flex items-center justify-center gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-danger/15 hover:border-danger/40 hover:text-danger text-text-main text-xs sm:text-sm font-bold transition-all focus-visible:ring-2 focus-visible:ring-danger/50",children:[o.jsx(vd,{size:16}),o.jsx("span",{children:u("stop")})]}):o.jsxs("button",{type:"button",onClick:x,className:"inline-flex items-center justify-center gap-2 px-5 h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white text-xs sm:text-sm font-bold shadow-md shadow-brand-blue/25 transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",children:[o.jsx(Rv,{size:16}),o.jsx("span",{children:u("start")})]}),o.jsxs("button",{type:"button",onClick:()=>r("connection"),className:"inline-flex items-center justify-center gap-2 px-4 h-11 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main text-xs sm:text-sm font-bold transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",children:[o.jsx(Ki,{size:16,className:"text-brand-cyan"}),o.jsx("span",{children:u("connection")})]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-5",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-5 shadow-sm space-y-2 sm:space-y-3 hover:border-brand-blue/40 transition-colors",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("totalGroups")}),o.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-xl bg-blue-500/10 text-brand-blue flex items-center justify-center shrink-0 border border-blue-500/20",children:o.jsx(Ga,{size:18})})]}),o.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:g?"—":(h==null?void 0:h.totalGroups)??0})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-5 shadow-sm space-y-2 sm:space-y-3 hover:border-brand-cyan/40 transition-colors",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("commandCount")}),o.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0 border border-brand-cyan/20",children:o.jsx(Va,{size:18})})]}),o.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:g?"—":(h==null?void 0:h.commandCount)??0})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-5 shadow-sm space-y-2 sm:space-y-3 hover:border-ok/40 transition-colors",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("uptime")}),o.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-xl bg-ok/10 text-ok flex items-center justify-center shrink-0 border border-ok/20",children:o.jsx(vv,{size:18})})]}),o.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:g?"—":E((h==null?void 0:h.uptime)||0)})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-5 shadow-sm space-y-2 sm:space-y-3 hover:border-purple-500/40 transition-colors",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("activeSchedules")}),o.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-xl bg-purple-500/10 text-purple-400 flex items-center justify-center shrink-0 border border-purple-500/20",children:o.jsx(zv,{size:18})})]}),o.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:g?"—":(h==null?void 0:h.activeSchedules)??0})]})]}),o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4",children:U.map(D=>{const B=D.icon;return o.jsxs("button",{type:"button",onClick:()=>r(D.id),className:"group rounded-2xl border border-line bg-panel hover:bg-panel-hover p-4 sm:p-5 shadow-sm text-start flex flex-col justify-between gap-3 sm:gap-4 transition-all hover:-translate-y-0.5 hover:border-brand-blue/30 focus-visible:ring-2 focus-visible:ring-brand-blue/50",children:[o.jsxs("div",{className:"flex items-center justify-between w-full",children:[o.jsx("div",{className:`w-9 h-9 sm:w-10 sm:h-10 rounded-xl flex items-center justify-center shrink-0 border ${D.color}`,children:o.jsx(B,{size:18})}),o.jsx("div",{className:"w-7 h-7 rounded-full bg-white/[0.04] border border-white/[0.08] flex items-center justify-center text-muted group-hover:text-brand-cyan group-hover:border-brand-cyan/40 group-hover:bg-brand-cyan/10 transition-all",children:o.jsx(bv,{size:14,className:"rtl:rotate-180 transition-transform group-hover:translate-x-0.5 rtl:group-hover:-translate-x-0.5"})})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs sm:text-sm font-bold text-text-main group-hover:text-brand-cyan transition-colors",children:D.title}),o.jsx("p",{className:"text-[11px] sm:text-xs text-muted mt-0.5 line-clamp-2 leading-relaxed",children:D.desc})]})]},D.id)})}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 shadow-sm flex items-center gap-3.5",children:[o.jsx(Sv,{size:20,className:"text-faint shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-semibold text-muted",children:u("dataDir")}),o.jsx("div",{className:"text-xs font-mono text-text-main truncate text-start",dir:"ltr",children:(h==null?void 0:h.dataDir)||"..."})]})]})]})};function iw(){const i=window.LevixHost;return!!(i&&typeof i.pickContact=="function")}function sw(i){let r=String(i||"").replace(/\D/g,"");return r.startsWith("00")&&(r=r.slice(2)),r.length<8||r.length>15?null:`${r}@s.whatsapp.net`}const rw=({isConnected:i=!1,onNavigate:r})=>{const{t:u,language:c}=rn(),{toast:d}=yl(),[h,p]=K.useState([]),[g,b]=K.useState("UTC"),[E,v]=K.useState(!0),[x,C]=K.useState([]),[U,Z]=K.useState(!1),[D,B]=K.useState(null),[G,X]=K.useState(""),[le,W]=K.useState(!1),[me,J]=K.useState(""),[Y,R]=K.useState("recurring"),[I,ie]=K.useState("0 9 * * *"),[$,te]=K.useState(""),[Q,ae]=K.useState(!1),pe=3,T=h.length>=pe,F=async()=>{try{const S=await re.getSchedules();S!=null&&S.schedules&&(p(S.schedules),S.timezone&&b(S.timezone))}catch(S){d(S.message,"error")}finally{v(!1)}},M=async()=>{Z(!0);try{const S=await re.getRecipients();S!=null&&S.recipients&&C(S.recipients)}catch{}finally{Z(!1)}};K.useEffect(()=>{F(),i&&M()},[i]);const se=async S=>{try{await re.deleteSchedule(S),d(u("savedSuccessfully"),"success"),p(P=>P.filter(ne=>ne.id!==S))}catch(P){d(P.message,"error")}},V=async S=>{if(!i){d(c==="ar"?"واتساب غير متصل، يرجى بدء الاتصال أولاً":"WhatsApp is disconnected, please connect first","warning");return}try{await re.retrySchedule(S),d(c==="ar"?"تمت إعادة محاولة الإرسال":"Delivery retry triggered","info"),F()}catch(P){d(P.message,"error")}},Me=async()=>{const S=window.LevixHost;if(!(S!=null&&S.pickContact)){d(c==="ar"?"دليل الهاتف متاح من تطبيق أندرويد فقط":"Phone book is available in the Android app","info");return}const P=await new Promise(fe=>{var oe;const Se=be=>{window.removeEventListener("levix-contact",Se);const L=be.detail;if(!(L!=null&&L.phone)){fe(null);return}fe({name:String(L.name||""),phone:String(L.phone)})};window.addEventListener("levix-contact",Se);try{(oe=S.pickContact)==null||oe.call(S)}catch{window.removeEventListener("levix-contact",Se),fe(null)}});if(!P)return;const ne=sw(P.phone);if(!ne){d(c==="ar"?"الرقم غير صالح. استخدم رقمًا مع كود الدولة.":"That number is not valid. Use a number with country code.","error");return}const ye=`+${ne.split("@")[0]}`;B({id:ne,name:P.name||ye,phone:ye,type:"contact"})},Ue=()=>{if(!i){d(c==="ar"?"يلزم اتصال واتساب لجدولة الرسائل":"Active WhatsApp connection is required to schedule messages","warning");return}if(T){d(u("maxSchedulesReached"),"warning");return}B(null),X(""),J(""),W(!0),x.length||M()},Ge=async()=>{if(!D){d(c==="ar"?"يرجى اختيار المحادثة المستهدفة":"Please select a recipient chat","warning");return}if(!me.trim()){d(c==="ar"?"يرجى كتابة نص الرسالة":"Please write the message text","warning");return}if(Y==="once"&&(!$||new Date($).getTime()<=Date.now())){d(c==="ar"?"يرجى تحديد وقت وتاريخ مستقبلي صالح":"Please select a valid future date and time","warning");return}ae(!0);const S={targetJid:D.id,message:me.trim(),type:Y};Y==="recurring"?S.cronString=I:S.scheduledTime=new Date($).getTime();try{await re.createSchedule(S),d(u("savedSuccessfully"),"success"),W(!1),B(null),J(""),F()}catch(P){d(P.message,"error")}finally{ae(!1)}},N=x.filter(S=>{const P=G.toLowerCase().trim();return P?S.name.toLowerCase().includes(P)||S.phone&&S.phone.includes(P)||S.id.toLowerCase().includes(P):!0});return o.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[!i&&o.jsxs("div",{className:"rounded-2xl border border-warn/30 bg-warn/10 p-4 sm:p-5 flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-3.5",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-warn/20 text-warn flex items-center justify-center shrink-0",children:o.jsx(qr,{size:22})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm sm:text-base font-bold text-warn",children:c==="ar"?"واتساب غير متصل حالياً":"WhatsApp is Disconnected"}),o.jsx("p",{className:"text-xs sm:text-sm text-text-main/80 mt-0.5",children:c==="ar"?"يلزم وجود اتصال نشط بواتساب لجدولة الرسائل وإرسالها واختيار جهات الاتصال.":"An active WhatsApp connection is required to schedule messages, fetch chats, and deliver automated jobs."})]})]}),o.jsx("button",{type:"button",onClick:()=>r==null?void 0:r("connection"),className:"inline-flex items-center justify-center gap-2 px-4 h-11 rounded-xl bg-warn hover:bg-warn/90 text-bg font-bold text-xs sm:text-sm shadow-sm transition-all shrink-0",children:o.jsx("span",{children:c==="ar"?"الذهاب للاتصال":"Go to Connection"})})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-3.5",children:[o.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:o.jsx(bd,{size:24})}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[o.jsx("h2",{className:"text-lg md:text-xl font-bold text-text-main",children:u("schedules")}),o.jsxs("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-bold border ${T?"bg-warn/15 text-warn border-warn/30":"bg-brand-cyan/10 text-brand-cyan border-brand-cyan/20"}`,children:[h.length," / ",pe," ",c==="ar"?"مجدول":"scheduled"]})]}),o.jsxs("p",{className:"text-xs md:text-sm text-muted mt-1",children:[c==="ar"?"المنطقة الزمنية:":"Timezone:"," ",o.jsx("code",{className:"text-brand-cyan font-mono font-semibold px-1.5 py-0.5 rounded bg-bg-soft border border-line",children:g})," ","·"," ",c==="ar"?"إرسال دوري ومحدد بالوقت":"Cron & one-off automated message deliveries"]})]})]}),o.jsxs("button",{type:"button",onClick:Ue,disabled:T||!i,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 px-5 h-12 sm:h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-brand-blue/20 transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 shrink-0 disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx(Vx,{size:18}),o.jsx("span",{children:i?u(T?"limitReached":"scheduleNewMsg"):c==="ar"?"يلزم اتصال واتساب":"Connection Required"})]})]}),o.jsx("div",{className:"rounded-2xl border border-line bg-panel overflow-hidden shadow-sm overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[680px] text-start border-collapse text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-panel-raised border-b border-line text-xs font-bold text-muted uppercase tracking-wider",children:[o.jsx("th",{className:"px-5 py-4 text-start",children:u("thTarget")}),o.jsx("th",{className:"px-5 py-4 text-start",children:u("thMessage")}),o.jsx("th",{className:"px-5 py-4 text-start",children:u("thSchedule")}),o.jsx("th",{className:"px-5 py-4 text-start",children:u("thType")}),o.jsx("th",{className:"px-5 py-4 text-start",children:u("thDelivery")}),o.jsx("th",{className:"px-5 py-4 text-center",children:u("thActions")})]})}),o.jsx("tbody",{className:"divide-y divide-line/40",children:E?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"text-center py-16 text-muted",children:o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[o.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin"}),o.jsx("span",{className:"text-xs",children:u("loading")})]})})}):h.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"text-center py-16 text-muted text-xs sm:text-sm",children:o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[o.jsx(bd,{size:28,className:"text-muted/40"}),o.jsx("span",{children:c==="ar"?"لا توجد رسائل مجدولة حالياً.":"No active schedules found."})]})})}):h.map(S=>o.jsxs("tr",{className:"hover:bg-panel-hover/50 transition-colors",children:[o.jsx("td",{className:"px-5 py-4 text-xs text-text-main",children:o.jsx("bdi",{children:S.targetKind==="group"||S.targetJid.includes("@g.us")?o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-brand-cyan",children:[o.jsx(Ga,{size:14}),o.jsx("span",{className:"font-semibold truncate max-w-[12rem]",children:S.targetLabel&&S.targetLabel!=="Group"?S.targetLabel:c==="ar"?"مجموعة":"Group"})]}):o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-ok",children:[o.jsx(Hu,{size:14}),o.jsx("span",{className:"font-semibold",children:S.targetPhone||(S.targetLabel&&!S.targetLabel.includes("@lid")?S.targetLabel:null)||(c==="ar"?"جهة اتصال":"Contact")})]})})}),o.jsx("td",{className:"px-5 py-4 max-w-xs text-text-main truncate text-xs sm:text-sm",children:S.message}),o.jsx("td",{className:"px-5 py-4 text-xs font-mono text-muted",children:S.when||S.cronString||"—"}),o.jsx("td",{className:"px-5 py-4",children:o.jsx("span",{className:`inline-flex px-2.5 py-0.5 rounded-lg text-xs font-semibold ${S.type==="recurring"?"bg-brand-blue/10 text-brand-cyan":"bg-purple-500/10 text-purple-400"}`,children:S.type==="recurring"?c==="ar"?"متكرر":"Recurring":c==="ar"?"مرة واحدة":"Once"})}),o.jsx("td",{className:"px-5 py-4",children:o.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-bold ${S.lastDeliveryStatus==="failed"?"bg-danger/10 text-danger border border-danger/25":S.status==="active"?"bg-ok/10 text-ok border border-ok/25":"bg-muted/10 text-muted"}`,children:[S.lastDeliveryStatus==="failed"?o.jsx(qr,{size:13}):o.jsx(Qr,{size:13}),o.jsx("span",{children:S.lastDeliveryStatus==="failed"?c==="ar"?"فشل الإرسال":"Failed":S.status==="active"?c==="ar"?"نشط":"Active":S.status})]})}),o.jsx("td",{className:"px-5 py-4 text-center",children:o.jsxs("div",{className:"flex items-center justify-center gap-2",children:[S.lastDeliveryStatus==="failed"&&o.jsx("button",{type:"button",onClick:()=>V(S.id),className:"inline-flex items-center justify-center w-8 h-8 rounded-lg border border-line bg-panel-raised hover:bg-panel-hover text-brand-cyan transition-colors",title:"Retry delivery",children:o.jsx(Gr,{size:14})}),o.jsx("button",{type:"button",onClick:()=>se(S.id),className:"inline-flex items-center justify-center w-8 h-8 rounded-lg border border-danger/25 bg-danger/10 hover:bg-danger/20 text-danger transition-colors",title:u("delete"),children:o.jsx(cb,{size:14})})]})})]},S.id))})]})}),o.jsx(Zi,{isOpen:le,onClose:()=>W(!1),title:u("scheduleNewMsg"),footer:o.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[o.jsx("button",{type:"button",onClick:()=>W(!1),className:"px-4 h-10 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main font-bold text-xs sm:text-sm transition-colors",children:u("cancel")}),o.jsx("button",{type:"button",onClick:Ge,disabled:Q||!D||!me.trim(),className:"px-5 h-10 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-brand-blue/20 transition-all disabled:opacity-50",children:Q?u("saving"):c==="ar"?"جدولة الرسالة":"Schedule"})]}),children:o.jsxs("div",{className:"flex flex-col gap-4 py-1",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("label",{className:"block text-xs font-bold text-text-main",children:[u("selectRecipient")," ",o.jsx("span",{className:"text-danger",children:"*"})]}),D?o.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl border border-brand-blue/40 bg-brand-blue/10",children:[o.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[o.jsx("div",{className:"w-8 h-8 rounded-lg bg-brand-blue/20 text-brand-cyan flex items-center justify-center shrink-0",children:D.type==="group"?o.jsx(Ga,{size:16}):o.jsx(Hu,{size:16})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-xs sm:text-sm font-bold text-text-main truncate",children:D.name}),D.phone&&o.jsx("div",{className:"text-[11px] text-muted font-mono",dir:"ltr",children:D.phone})]})]}),o.jsx("button",{type:"button",onClick:()=>B(null),className:"p-1 rounded-lg hover:bg-panel text-muted hover:text-danger transition-colors",title:"Change chat",children:o.jsx(Ji,{size:16})})]}):o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(Ix,{size:16,className:"absolute start-3 top-3 text-muted"}),o.jsx("input",{type:"text",value:G,onChange:S=>X(S.target.value),placeholder:u("searchRecipients"),className:"w-full h-10 ps-9 pe-3 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50"})]}),iw()&&o.jsxs("button",{type:"button",onClick:Me,className:"inline-flex items-center justify-center gap-1.5 h-10 px-3 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover text-text-main text-xs font-bold shrink-0",title:u("pickPhoneContactHint"),children:[o.jsx(xv,{size:15}),o.jsx("span",{className:"hidden sm:inline",children:u("pickPhoneContact")})]})]}),o.jsx("div",{className:"max-h-48 overflow-y-auto rounded-xl border border-line bg-panel-raised divide-y divide-line/40",children:U?o.jsx("div",{className:"p-4 text-center text-xs text-muted",children:u("loading")}):N.length===0?o.jsx("div",{className:"p-4 text-center text-xs text-muted",children:u("noRecipientsFound")}):N.map(S=>o.jsxs("button",{type:"button",onClick:()=>B(S),className:"w-full p-2.5 flex items-center justify-between gap-2 hover:bg-panel text-start transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[o.jsx("div",{className:"w-7 h-7 rounded-lg bg-panel border border-line flex items-center justify-center shrink-0 text-muted",children:S.type==="group"?o.jsx(Ga,{size:14}):o.jsx(Hu,{size:14})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-xs font-bold text-text-main truncate",children:S.name}),S.phone&&o.jsx("div",{className:"text-[10px] text-muted font-mono",dir:"ltr",children:S.phone})]})]}),o.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded bg-panel text-muted shrink-0",children:S.type==="group"?c==="ar"?"مجموعة":"Group":c==="ar"?"محادثة":"Contact"})]},S.id))})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs font-bold text-text-main",children:c==="ar"?"نوع الجدولة":"Schedule Type"}),o.jsxs("select",{className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:Y,onChange:S=>R(S.target.value),children:[o.jsx("option",{value:"recurring",children:c==="ar"?"دوري متكرر (Cron Expression)":"Recurring (Cron Expression)"}),o.jsx("option",{value:"once",children:c==="ar"?"مرة واحدة (تاريخ ووقت محدد)":"One-Off (Specific Date & Time)"})]})]}),Y==="recurring"?o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs font-bold text-text-main",children:c==="ar"?"تعبير Cron (دقيقة ساعة يوم شهر يوم-الأسبوع)":"Cron Expression (5 fields: min hour day month weekday)"}),o.jsx("input",{type:"text",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised font-mono text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:I,onChange:S=>ie(S.target.value),placeholder:"0 9 * * *"}),o.jsxs("span",{className:"block text-xs text-muted",children:[c==="ar"?"مثال: ":"e.g. ",o.jsx("code",{className:"text-brand-cyan",children:"0 9 * * *"})," (",c==="ar"?"يومياً الساعة 9:00 صباحاً":"Every day at 9:00 AM",")"]})]}):o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs font-bold text-text-main",children:c==="ar"?"موعد وتاريخ الإرسال":"Delivery Date & Time"}),o.jsx("input",{type:"datetime-local",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:$,onChange:S=>te(S.target.value)})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("label",{className:"block text-xs font-bold text-text-main",children:[c==="ar"?"نص الرسالة":"Message Text"," ",o.jsx("span",{className:"text-danger",children:"*"})]}),o.jsx("textarea",{className:"w-full p-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50 resize-y min-h-[90px]",rows:3,placeholder:c==="ar"?"اكتب الرسالة التي سيتم إرسالها تلقائياً...":"Message to be sent automatically...",value:me,onChange:S=>J(S.target.value)})]})]})})]})},ow=["!","/",".","#","$","?"],cw=()=>{const{t:i,language:r,setLanguage:u}=rn(),{toast:c}=yl(),[d,h]=K.useState("general"),[p,g]=K.useState({}),[b,E]=K.useState(!0),[v,x]=K.useState("!"),[C,U]=K.useState("!"),[Z,D]=K.useState(!1),[B,G]=K.useState(""),[X,le]=K.useState(""),[W,me]=K.useState(""),[J,Y]=K.useState(!1),[R,I]=K.useState(!1),[ie,$]=K.useState(!1),[te,Q]=K.useState(!1),ae=async()=>{try{const M=await re.getSettings();if(M!=null&&M.settings){const se={};M.settings.forEach(V=>{se[V.key]=V.value}),g(se)}M!=null&&M.prefix&&(x(M.prefix),U(M.prefix))}catch(M){c(M.message,"error")}finally{E(!1)}};K.useEffect(()=>{ae()},[]);const pe=async(M,se)=>{g(V=>({...V,[M]:se}));try{await re.updateSetting(M,se),c(i("savedSuccessfully"),"success")}catch(V){c(V.message,"error")}},T=async M=>{const se=(M!==void 0?M:C).trim();if(!se||se.length>3){c(i("prefixValidation"),"error");return}D(!0);try{await re.updatePrefix(se),x(se),U(se),c(`${i("prefixUpdated")} (${se})`,"success")}catch(V){c(V.message,"error")}finally{D(!1)}},F=async M=>{if(M.preventDefault(),X!==W){c(i("passwordMatchError"),"error");return}if(X.length<8){c(i("passwordMinLength"),"error");return}Y(!0);try{await re.changePassword(B,X),c(i("passwordChangedSuccess"),"success"),G(""),le(""),me("")}catch(se){c(se.message,"error")}finally{Y(!1)}};return b?o.jsxs("div",{className:"flex items-center justify-center p-12 text-muted",children:[o.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin mr-2"}),o.jsx("span",{className:"text-sm font-semibold",children:i("loading")})]}):o.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[o.jsxs("div",{role:"tablist","aria-label":"Settings Categories",className:"flex items-center gap-1.5 p-1.5 rounded-2xl bg-panel border border-line overflow-x-auto no-scrollbar shadow-sm",children:[o.jsxs("button",{type:"button",role:"tab","aria-selected":d==="general",onClick:()=>h("general"),className:Nn("flex items-center gap-2 px-3.5 py-2.5 min-h-[44px] rounded-xl font-bold text-xs sm:text-sm whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",d==="general"?"bg-brand-blue text-white shadow-md shadow-brand-blue/25":"text-muted hover:text-text-main hover:bg-panel-hover"),children:[o.jsx(tb,{size:17,className:"shrink-0"}),o.jsx("span",{children:i("tabGeneral")})]}),o.jsxs("button",{type:"button",role:"tab","aria-selected":d==="integrations",onClick:()=>h("integrations"),className:Nn("flex items-center gap-2 px-3.5 py-2.5 min-h-[44px] rounded-xl font-bold text-xs sm:text-sm whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",d==="integrations"?"bg-brand-blue text-white shadow-md shadow-brand-blue/25":"text-muted hover:text-text-main hover:bg-panel-hover"),children:[o.jsx(yd,{size:17,className:"shrink-0"}),o.jsx("span",{children:i("tabIntegrations")})]}),o.jsxs("button",{type:"button",role:"tab","aria-selected":d==="proxy",onClick:()=>h("proxy"),className:Nn("flex items-center gap-2 px-3.5 py-2.5 min-h-[44px] rounded-xl font-bold text-xs sm:text-sm whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",d==="proxy"?"bg-brand-blue text-white shadow-md shadow-brand-blue/25":"text-muted hover:text-text-main hover:bg-panel-hover"),children:[o.jsx(Hr,{size:17,className:"shrink-0"}),o.jsx("span",{children:i("tabProxy")})]}),o.jsxs("button",{type:"button",role:"tab","aria-selected":d==="security",onClick:()=>h("security"),className:Nn("flex items-center gap-2 px-3.5 py-2.5 min-h-[44px] rounded-xl font-bold text-xs sm:text-sm whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",d==="security"?"bg-brand-blue text-white shadow-md shadow-brand-blue/25":"text-muted hover:text-text-main hover:bg-panel-hover"),children:[o.jsx(Wx,{size:17,className:"shrink-0"}),o.jsx("span",{children:i("tabSecurity")})]}),o.jsxs("button",{type:"button",role:"tab","aria-selected":d==="storage",onClick:()=>h("storage"),className:Nn("flex items-center gap-2 px-3.5 py-2.5 min-h-[44px] rounded-xl font-bold text-xs sm:text-sm whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",d==="storage"?"bg-brand-blue text-white shadow-md shadow-brand-blue/25":"text-muted hover:text-text-main hover:bg-panel-hover"),children:[o.jsx(vg,{size:17,className:"shrink-0"}),o.jsx("span",{children:i("tabStorage")})]})]}),d==="general"&&o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsxs("div",{className:"rounded-2xl border border-line bg-gradient-to-br from-panel-raised to-panel p-4 sm:p-6 shadow-sm flex flex-col gap-4 sm:gap-5",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-4 border-b border-line",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 sm:w-11 sm:h-11 rounded-xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:o.jsx(Va,{size:22})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:i("prefixTitle")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:i("prefixDesc")})]})]}),o.jsxs("div",{className:"flex items-center gap-2 self-start sm:self-auto",children:[o.jsxs("span",{className:"text-xs text-muted font-semibold",children:[i("activePrefix"),":"]}),o.jsx("span",{className:"inline-flex items-center justify-center px-3 py-1 rounded-lg bg-brand-cyan/15 text-brand-cyan font-mono font-bold text-base border border-brand-cyan/30 shadow-sm",children:v})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-4 pt-1",children:[o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("span",{className:"text-xs text-muted font-semibold",children:i("prefixPresets")}),o.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:ow.map(M=>{const se=v===M;return o.jsx("button",{type:"button",className:Nn("w-10 h-10 sm:w-11 sm:h-11 rounded-xl border font-mono font-bold text-sm transition-all flex items-center justify-center focus-visible:ring-2 focus-visible:ring-brand-blue/50",se?"bg-brand-cyan text-slate-900 border-brand-cyan shadow-sm":"bg-panel-raised border-line text-text-main hover:bg-panel-hover"),onClick:()=>{U(M),T(M)},children:M},M)})})]}),o.jsxs("div",{className:"flex flex-col gap-1.5 flex-1 min-w-[200px]",children:[o.jsx("span",{className:"text-xs text-muted font-semibold",children:i("changePrefix")}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"text",className:"w-20 sm:w-24 h-11 px-3 text-center font-mono font-bold text-base rounded-xl border border-line bg-panel text-text-main focus:outline-none focus:ring-2 focus:ring-brand-blue/50 shrink-0",maxLength:3,placeholder:i("prefixPlaceholder"),value:C,onChange:M=>U(M.target.value),onKeyDown:M=>{M.key==="Enter"&&T()}}),o.jsxs("button",{type:"button",onClick:()=>T(),disabled:Z||C.trim()===v,className:"inline-flex items-center justify-center gap-2 px-4 h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm whitespace-nowrap transition-all shadow-md shadow-brand-blue/20 focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50",children:[o.jsx(Vr,{size:16}),o.jsx("span",{children:i(Z?"saving":"prefixSaveBtn")})]})]})]})]}),o.jsxs("div",{className:"rounded-xl bg-bg-soft/70 border border-line p-3 flex flex-wrap items-center gap-2 text-xs sm:text-sm",children:[o.jsx("span",{className:"font-semibold text-muted",children:i("prefixPreview")}),o.jsx("div",{className:"px-2 py-0.5 rounded-lg bg-panel border border-line font-mono font-medium text-brand-cyan text-xs",children:o.jsxs("code",{children:[C||v,"help"]})}),o.jsx("div",{className:"px-2 py-0.5 rounded-lg bg-panel border border-line font-mono font-medium text-brand-cyan text-xs",children:o.jsxs("code",{children:[C||v,"lang ar"]})}),o.jsx("div",{className:"px-2 py-0.5 rounded-lg bg-panel border border-line font-mono font-medium text-brand-cyan text-xs",children:o.jsxs("code",{children:[C||v,"sticker"]})})]})]}),o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-4",children:[o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:r==="ar"?"سلوك النظام والردود":"System Behavior & Delays"}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("interfaceLanguage")}),o.jsxs("select",{className:"w-full h-11 px-3 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:r,onChange:M=>u(M.target.value),children:[o.jsx("option",{value:"ar",children:"العربية (RTL - اليمين لليسار)"}),o.jsx("option",{value:"en",children:"English (LTR - Left to Right)"})]}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("interfaceLanguageDesc")})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("botLanguage")}),o.jsxs("select",{className:"w-full h-11 px-3 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.bot_language||"auto",onChange:M=>pe("bot_language",M.target.value),children:[o.jsx("option",{value:"auto",children:i("langAuto")}),o.jsx("option",{value:"ar",children:i("langAr")}),o.jsx("option",{value:"en",children:i("langEn")})]}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("botLanguageDesc")})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("botTimezone")}),o.jsx("input",{type:"text",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised font-mono text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",placeholder:"Africa/Cairo",value:p.bot_timezone||"Africa/Cairo",onChange:M=>g({...p,bot_timezone:M.target.value}),onBlur:M=>pe("bot_timezone",M.target.value)}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("botTimezoneDesc")})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("botMinDelay")}),o.jsx("input",{type:"number",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.bot_min_delay_ms||400,onChange:M=>g({...p,bot_min_delay_ms:Number(M.target.value)}),onBlur:M=>pe("bot_min_delay_ms",Number(M.target.value))}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("delaysDesc")})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("botMaxDelay")}),o.jsx("input",{type:"number",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.bot_max_delay_ms||900,onChange:M=>g({...p,bot_max_delay_ms:Number(M.target.value)}),onBlur:M=>pe("bot_max_delay_ms",Number(M.target.value))})]})]})]})]}),d==="integrations"&&o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[o.jsxs("div",{className:"flex items-center gap-3.5 pb-4 border-b border-line",children:[o.jsx("div",{className:"w-11 h-11 rounded-xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:o.jsx(yd,{size:22})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:i("tabIntegrations")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:i("integrationsDesc")})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[o.jsx("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main mb-1",children:i("weatherApiKey")}),o.jsx("p",{className:"text-xs text-muted mb-3",children:r==="ar"?"مطلوب لتشغيل أمر الطقس والأحوال الجوية !weather":"Required for the !weather forecast command"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:ie?"text":"password",className:"w-full h-11 px-3.5 pe-11 rounded-xl border border-line bg-panel text-text-main font-mono text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",placeholder:"OpenWeatherMap API Key",value:p.openweathermap_api_key||"",onChange:M=>g({...p,openweathermap_api_key:M.target.value}),onBlur:M=>pe("openweathermap_api_key",M.target.value)}),o.jsx("button",{type:"button",onClick:()=>$(!ie),className:"absolute top-1.5 end-1.5 w-8 h-8 rounded-lg flex items-center justify-center text-muted hover:text-text-main transition-colors",children:ie?o.jsx(Du,{size:16}):o.jsx(Ha,{size:16})})]})]})}),o.jsx("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main mb-1",children:i("youtubeApiKey")}),o.jsx("p",{className:"text-xs text-muted mb-3",children:r==="ar"?"مطلوب لأدوات البحث ومعلومات الفيديوهات من يوتيوب":"Required for YouTube search and video tools"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:te?"text":"password",className:"w-full h-11 px-3.5 pe-11 rounded-xl border border-line bg-panel text-text-main font-mono text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",placeholder:"YouTube Data API Key",value:p.youtube_api_key||"",onChange:M=>g({...p,youtube_api_key:M.target.value}),onBlur:M=>pe("youtube_api_key",M.target.value)}),o.jsx("button",{type:"button",onClick:()=>Q(!te),className:"absolute top-1.5 end-1.5 w-8 h-8 rounded-lg flex items-center justify-center text-muted hover:text-text-main transition-colors",children:te?o.jsx(Du,{size:16}):o.jsx(Ha,{size:16})})]})]})})]})]}),d==="proxy"&&o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3 pb-4 border-b border-line",children:[o.jsxs("div",{className:"flex items-center gap-3.5 min-w-0 flex-1",children:[o.jsx("div",{className:"w-11 h-11 rounded-xl bg-blue-500/10 text-brand-blue flex items-center justify-center shrink-0",children:o.jsx(Hr,{size:22})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main truncate",children:i("proxyTitle")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5 truncate",children:i("proxyDesc")})]})]}),o.jsx("div",{className:"shrink-0",children:o.jsx(Xl,{checked:!!p.whatsapp_proxy_enabled,onChange:M=>pe("whatsapp_proxy_enabled",M)})})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("proxyProtocol")}),o.jsxs("select",{className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm font-semibold focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.whatsapp_proxy_protocol||"http",onChange:M=>pe("whatsapp_proxy_protocol",M.target.value),children:[o.jsx("option",{value:"http",children:"HTTP"}),o.jsx("option",{value:"https",children:"HTTPS"}),o.jsx("option",{value:"socks5",children:"SOCKS5"})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("proxyHost")}),o.jsx("input",{type:"text",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised font-mono text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",placeholder:"proxy.example.com",value:p.whatsapp_proxy_host||"",onChange:M=>g({...p,whatsapp_proxy_host:M.target.value}),onBlur:M=>pe("whatsapp_proxy_host",M.target.value)})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("proxyPort")}),o.jsx("input",{type:"number",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",placeholder:"1080",value:p.whatsapp_proxy_port||"",onChange:M=>g({...p,whatsapp_proxy_port:Number(M.target.value)}),onBlur:M=>pe("whatsapp_proxy_port",Number(M.target.value))})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("proxyUsername")}),o.jsx("input",{type:"text",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised font-mono text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.whatsapp_proxy_username||"",onChange:M=>g({...p,whatsapp_proxy_username:M.target.value}),onBlur:M=>pe("whatsapp_proxy_username",M.target.value)})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("proxyPassword")}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:R?"text":"password",className:"w-full h-11 px-3.5 pe-11 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.whatsapp_proxy_password||"",onChange:M=>g({...p,whatsapp_proxy_password:M.target.value}),onBlur:M=>pe("whatsapp_proxy_password",M.target.value)}),o.jsx("button",{type:"button",onClick:()=>I(!R),className:"absolute top-1.5 end-1.5 w-8 h-8 rounded-lg flex items-center justify-center text-muted hover:text-text-main transition-colors",children:R?o.jsx(Du,{size:16}):o.jsx(Ha,{size:16})})]})]})]})]}),d==="security"&&o.jsx("div",{className:"flex flex-col gap-5",children:o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-4 max-w-xl",children:[o.jsxs("div",{className:"flex items-center gap-3 pb-3 border-b border-line",children:[o.jsx(Tv,{size:20,className:"text-ok"}),o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:i("changePassword")})]}),o.jsxs("form",{onSubmit:F,className:"flex flex-col gap-3.5",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("currentPassword")}),o.jsx("input",{type:"password",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",required:!0,value:B,onChange:M=>G(M.target.value)})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("newPassword")}),o.jsx("input",{type:"password",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",required:!0,minLength:8,value:X,onChange:M=>le(M.target.value)}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("passwordMinLength")})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("confirmPassword")}),o.jsx("input",{type:"password",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",required:!0,minLength:8,value:W,onChange:M=>me(M.target.value)})]}),o.jsxs("button",{type:"submit",disabled:J,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 px-6 h-11 rounded-xl bg-brand-blue hover:bg-brand-blue/90 text-white font-bold text-xs sm:text-sm shadow-md shadow-brand-blue/20 transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50 self-start mt-2",children:[o.jsx(Vr,{size:16}),o.jsx("span",{children:i(J?"saving":"save")})]})]})]})}),d==="storage"&&o.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[o.jsxs("div",{className:"flex items-center gap-3.5 pb-4 border-b border-line",children:[o.jsx("div",{className:"w-11 h-11 rounded-xl bg-purple-500/10 text-purple-400 flex items-center justify-center shrink-0",children:o.jsx(vg,{size:22})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:i("storageTitle")}),o.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:i("storageDesc")})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("forwardTtl")}),o.jsx("input",{type:"number",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.forward_score_ttl_days||30,onChange:M=>g({...p,forward_score_ttl_days:Number(M.target.value)}),onBlur:M=>pe("forward_score_ttl_days",Number(M.target.value))}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("forwardTtlDesc")})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:i("maxFetchBytes")}),o.jsx("input",{type:"number",className:"w-full h-11 px-3.5 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-brand-blue/50",value:p.max_fetch_bytes||524288,onChange:M=>g({...p,max_fetch_bytes:Number(M.target.value)}),onBlur:M=>pe("max_fetch_bytes",Number(M.target.value))}),o.jsx("span",{className:"block text-[11px] text-muted",children:i("maxFetchBytesDesc")})]})]})]})]})},uw=()=>{const{t:i}=rn(),{toast:r}=yl(),[u,c]=K.useState(()=>{const D=window.location.hash.replace(/^#/,"");return["overview","connection","commands","ai","groups","schedules","settings","logs"].includes(D)?D:"overview"}),[d,h]=K.useState(!1),{sessionStatus:p,socket:g}=zN((D,B)=>{if(D==="status"){const G=B==null?void 0:B.state;r(`Connection state: ${G}`,"info")}}),[b,E]=K.useState(null),v=K.useCallback(async()=>{try{const D=await re.getSession();D!=null&&D.session?E({...D.session,qr:D.qr??null,pairingCode:D.pairingCode??null}):D!=null&&D.status&&E(D.status)}catch{}},[]);K.useEffect(()=>{v()},[v]);const x=b||p?{state:(p==null?void 0:p.state)||(b==null?void 0:b.state)||"idle",...b||{},...p||{}}:null,C=(x==null?void 0:x.connected)===!0||(x==null?void 0:x.state)==="connected";K.useEffect(()=>{const D=x==null?void 0:x.state,G=D==="starting"||D==="linking"||D==="reconnecting"||D==="waiting_for_qr"&&!(x!=null&&x.qr)&&!(x!=null&&x.pairingCode)?2e3:15e3,X=setInterval(()=>{v()},G);return()=>clearInterval(X)},[x==null?void 0:x.state,x==null?void 0:x.qr,x==null?void 0:x.pairingCode,v]);const U=D=>{c(D),window.location.hash=D};K.useEffect(()=>{const D=()=>{const B=window.location.hash.replace(/^#/,"");B&&c(B)};return window.addEventListener("hashchange",D),()=>window.removeEventListener("hashchange",D)},[]);const Z={overview:i("overview"),connection:i("connection"),commands:i("commands"),ai:i("ai"),groups:i("groups"),schedules:i("schedules"),settings:i("settings"),logs:i("logs")};return o.jsxs("div",{className:"min-h-screen min-h-[100dvh] flex bg-bg text-text-main bg-ambient-glow overflow-x-hidden relative",children:[o.jsx(D2,{currentView:u,onSelectView:U,isOpenMobile:d,onCloseMobile:()=>h(!1)}),o.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[o.jsx(Vv,{onToggleMobileMenu:()=>h(D=>!D),title:Z[u]||"Dashboard",status:x}),o.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto p-4 sm:p-6 lg:p-8",children:[u==="overview"&&o.jsx(aw,{status:x,onNavigate:U}),u==="connection"&&o.jsx(tw,{status:x,onRefresh:v,onStatusUpdate:D=>E(B=>({...B||{},...D}))}),u==="ai"&&o.jsx(MN,{}),u==="commands"&&o.jsx(ON,{}),u==="schedules"&&o.jsx(rw,{isConnected:C,onNavigate:U}),u==="groups"&&o.jsx(nw,{}),u==="settings"&&o.jsx(cw,{}),u==="logs"&&o.jsx(lw,{socket:g})]})]})]})},dw=()=>o.jsx(Gv,{children:o.jsx(B2,{children:o.jsx(uw,{})})}),ox=document.getElementById("root");ox&&av.createRoot(ox).render(o.jsx(Qi.StrictMode,{children:o.jsx(dw,{})}));