levix-bot 4.0.4 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/dashboard/assets/index-DngAcp-o.js +431 -0
- package/public/dashboard/assets/index-LvfJ8ybs.css +2 -0
- package/public/dashboard/index.html +2 -2
- package/scheduler.cjs +19 -0
- package/src/commands/gemini.cjs +18 -21
- package/src/commands/group/antilink.cjs +3 -1
- package/src/commands/group/media.cjs +3 -1
- package/src/commands/help.cjs +12 -6
- package/src/commands/mod.cjs +3 -1
- package/src/commands/poll.cjs +36 -20
- package/src/commands/stt.cjs +1 -0
- package/src/commands/tts.cjs +36 -29
- package/src/config/baileys.config.js +5 -1
- package/src/config/settings.cjs +10 -2
- package/src/core/connection.js +21 -2
- package/src/core/socket.js +31 -7
- package/src/db/store.cjs +24 -0
- package/src/handlers/command.handler.js +5 -3
- package/src/middleware/antispam.middleware.js +4 -1
- package/src/middleware/blacklist.middleware.js +4 -1
- package/src/middleware/permissions.middleware.js +38 -51
- package/src/routes/dashboard.api.esm.js +91 -10
- package/src/services/aiAgent.cjs +7 -2
- package/src/services/aiRouter.cjs +9 -2
- package/src/services/aiToolAuth.cjs +114 -0
- package/src/services/aiTools.cjs +490 -55
- package/src/services/modelRegistry.cjs +20 -5
- package/src/utils/groupMetadataCache.cjs +83 -0
- package/src/utils/memory.cjs +35 -20
- package/src/utils/permissionLevel.cjs +55 -0
- package/src/utils/sendBotMessage.esm.js +14 -0
- package/src/utils/storage-hub.cjs +21 -0
- package/public/dashboard/assets/index-BnJbz8iW.css +0 -2
- package/public/dashboard/assets/index-Dn8ZyzsW.js +0 -426
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.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 Bd(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ou={exports:{}},Ws={};/**
|
|
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 gx;function iv(){if(gx)return Ws;gx=1;var s=Symbol.for("react.transitional.element"),o=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 x in d)x!=="key"&&(h[x]=d[x])}else h=d;return d=h.ref,{$$typeof:s,type:c,key:p,ref:d!==void 0?d:null,props:h}}return Ws.Fragment=o,Ws.jsx=u,Ws.jsxs=u,Ws}var bx;function rv(){return bx||(bx=1,Ou.exports=iv()),Ou.exports}var r=rv(),Du={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 yx;function ov(){if(yx)return we;yx=1;var s=Symbol.for("react.transitional.element"),o=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"),x=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),T=Symbol.for("react.view_transition"),L=Symbol.iterator;function K(w){return w===null||typeof w!="object"?null:(w=L&&w[L]||w["@@iterator"],typeof w=="function"?w:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,G={};function Q(w,v,P){this.props=w,this.context=v,this.refs=G,this.updater=P||B}Q.prototype.isReactComponent={},Q.prototype.setState=function(w,v){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,v,"setState")},Q.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function $(){}$.prototype=Q.prototype;function F(w,v,P){this.props=w,this.context=v,this.refs=G,this.updater=P||B}var xe=F.prototype=new $;xe.constructor=F,U(xe,Q.prototype),xe.isPureReactComponent=!0;var Z=Array.isArray;function V(){}var z={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function le(w,v,P){var te=P.ref;return{$$typeof:s,type:w,key:v,ref:te!==void 0?te:null,props:P}}function ae(w,v){return le(w.type,v,w.props)}function W(w){return typeof w=="object"&&w!==null&&w.$$typeof===s}function ie(w){var v={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(P){return v[P]})}var re=/\/+/g;function ge(w,v){return typeof w=="object"&&w!==null&&w.key!=null?ie(""+w.key):v.toString(36)}function A(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(V,V):(w.status="pending",w.then(function(v){w.status==="pending"&&(w.status="fulfilled",w.value=v)},function(v){w.status==="pending"&&(w.status="rejected",w.reason=v)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function I(w,v,P,te,ye){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var Se=!1;if(w===null)Se=!0;else switch(fe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(w.$$typeof){case s:case o:Se=!0;break;case N:return Se=w._init,I(Se(w._payload),v,P,te,ye)}}if(Se)return ye=ye(w),Se=te===""?"."+ge(w,0):te,Z(ye)?(P="",Se!=null&&(P=Se.replace(re,"$&/")+"/"),I(ye,v,P,"",function(tt){return tt})):ye!=null&&(W(ye)&&(ye=ae(ye,P+(ye.key==null||w&&w.key===ye.key?"":(""+ye.key).replace(re,"$&/")+"/")+Se)),v.push(ye)),1;Se=0;var se=te===""?".":te+":";if(Z(w))for(var oe=0;oe<w.length;oe++)te=w[oe],fe=se+ge(te,oe),Se+=I(te,v,P,fe,ye);else if(oe=K(w),typeof oe=="function")for(w=oe.call(w),oe=0;!(te=w.next()).done;)te=te.value,fe=se+ge(te,oe++),Se+=I(te,v,P,fe,ye);else if(fe==="object"){if(typeof w.then=="function")return I(A(w),v,P,te,ye);throw v=String(w),Error("Objects are not valid as a React child (found: "+(v==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":v)+"). If you meant to render a collection of children, use an array instead.")}return Se}function M(w,v,P){if(w==null)return w;var te=[],ye=0;return I(w,te,"","",function(fe){return v.call(P,fe,ye++)}),te}function me(w){if(w._status===-1){var v=w._result,P=v();P.then(function(te){(w._status===0||w._status===-1)&&(w._status=1,w._result=te,P.status===void 0&&(P.status="fulfilled",P.value=te))},function(te){(w._status===0||w._status===-1)&&(w._status=2,w._result=te,P.status===void 0&&(P.status="rejected",P.reason=te))}),w._status===-1&&(w._status=0,w._result=P)}if(w._status===1)return w._result.default;throw w._result}var X=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var v=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(v))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)};function qe(w){var v=z.T,P={};P.types=v!==null?v.types:null,z.T=P;try{var te=w(),ye=z.S;ye!==null&&ye(P,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(V,X)}catch(fe){X(fe)}finally{v!==null&&P.types!==null&&(v.types=P.types),z.T=v}}function et(w){var v=z.T;if(v!==null){var P=v.types;P===null?v.types=[w]:P.indexOf(w)===-1&&P.push(w)}else qe(et.bind(null,w))}var Ce={map:M,forEach:function(w,v,P){M(w,function(){v.apply(this,arguments)},P)},count:function(w){var v=0;return M(w,function(){v++}),v},toArray:function(w){return M(w,function(v){return v})||[]},only:function(w){if(!W(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return we.Activity=g,we.Children=Ce,we.Component=Q,we.Fragment=u,we.Profiler=d,we.PureComponent=F,we.StrictMode=c,we.Suspense=b,we.ViewTransition=T,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,we.__COMPILER_RUNTIME={__proto__:null,c:function(w){return z.H.useMemoCache(w)}},we.addTransitionType=et,we.cache=function(w){return function(){return w.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(w,v,P){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var te=U({},w.props),ye=w.key;if(v!=null)for(fe in v.key!==void 0&&(ye=""+v.key),v)!J.call(v,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&v.ref===void 0||(te[fe]=v[fe]);var fe=arguments.length-2;if(fe===1)te.children=P;else if(1<fe){for(var Se=Array(fe),se=0;se<fe;se++)Se[se]=arguments[se+2];te.children=Se}return le(w.type,ye,te)},we.createContext=function(w){return w={$$typeof:p,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:h,_context:w},w},we.createElement=function(w,v,P){var te,ye={},fe=null;if(v!=null)for(te in v.key!==void 0&&(fe=""+v.key),v)J.call(v,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ye[te]=v[te]);var Se=arguments.length-2;if(Se===1)ye.children=P;else if(1<Se){for(var se=Array(Se),oe=0;oe<Se;oe++)se[oe]=arguments[oe+2];ye.children=se}if(w&&w.defaultProps)for(te in Se=w.defaultProps,Se)ye[te]===void 0&&(ye[te]=Se[te]);return le(w,fe,ye)},we.createRef=function(){return{current:null}},we.forwardRef=function(w){return{$$typeof:x,render:w}},we.isValidElement=W,we.lazy=function(w){return{$$typeof:N,_payload:{_status:-1,_result:w},_init:me}},we.memo=function(w,v){return{$$typeof:E,type:w,compare:v===void 0?null:v}},we.startTransition=qe,we.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},we.use=function(w){return z.H.use(w)},we.useActionState=function(w,v,P){return z.H.useActionState(w,v,P)},we.useCallback=function(w,v){return z.H.useCallback(w,v)},we.useContext=function(w){return z.H.useContext(w)},we.useDebugValue=function(){},we.useDeferredValue=function(w,v){return z.H.useDeferredValue(w,v)},we.useEffect=function(w,v){return z.H.useEffect(w,v)},we.useEffectEvent=function(w){return z.H.useEffectEvent(w)},we.useId=function(){return z.H.useId()},we.useImperativeHandle=function(w,v,P){return z.H.useImperativeHandle(w,v,P)},we.useInsertionEffect=function(w,v){return z.H.useInsertionEffect(w,v)},we.useLayoutEffect=function(w,v){return z.H.useLayoutEffect(w,v)},we.useMemo=function(w,v){return z.H.useMemo(w,v)},we.useOptimistic=function(w,v){return z.H.useOptimistic(w,v)},we.useReducer=function(w,v,P){return z.H.useReducer(w,v,P)},we.useRef=function(w){return z.H.useRef(w)},we.useState=function(w){return z.H.useState(w)},we.useSyncExternalStore=function(w,v,P){return z.H.useSyncExternalStore(w,v,P)},we.useTransition=function(){return z.H.useTransition()},we.version="19.3.0",we}var vx;function Ud(){return vx||(vx=1,Du.exports=ov()),Du.exports}var Y=Ud();const si=Bd(Y);var Ru={exports:{}},ei={},Bu={exports:{}},Uu={};/**
|
|
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 Nx;function cv(){return Nx||(Nx=1,(function(s){function o(A,I){var M=A.length;A.push(I);e:for(;0<M;){var me=M-1>>>1,X=A[me];if(0<d(X,I))A[me]=I,A[M]=X,M=me;else break e}}function u(A){return A.length===0?null:A[0]}function c(A){if(A.length===0)return null;var I=A[0],M=A.pop();if(M!==I){A[0]=M;e:for(var me=0,X=A.length,qe=X>>>1;me<qe;){var et=2*(me+1)-1,Ce=A[et],w=et+1,v=A[w];if(0>d(Ce,M))w<X&&0>d(v,Ce)?(A[me]=v,A[w]=M,me=w):(A[me]=Ce,A[et]=M,me=et);else if(w<X&&0>d(v,M))A[me]=v,A[w]=M,me=w;else break e}}return I}function d(A,I){var M=A.sortIndex-I.sortIndex;return M!==0?M:A.id-I.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var p=Date,x=p.now();s.unstable_now=function(){return p.now()-x}}var b=[],E=[],N=1,g=null,T=3,L=!1,K=!1,B=!1,U=!1,G=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function F(A){for(var I=u(E);I!==null;){if(I.callback===null)c(E);else if(I.startTime<=A)c(E),I.sortIndex=I.expirationTime,o(b,I);else break;I=u(E)}}function xe(A){if(B=!1,F(A),!K)if(u(b)!==null)K=!0,Z||(Z=!0,W());else{var I=u(E);I!==null&&ge(xe,I.startTime-A)}}var Z=!1,V=-1,z=5,J=-1;function le(){return U?!0:!(s.unstable_now()-J<z)}function ae(){if(U=!1,Z){var A=s.unstable_now();J=A;var I=!0;try{e:{K=!1,B&&(B=!1,Q(V),V=-1),L=!0;var M=T;try{t:{for(F(A),g=u(b);g!==null&&!(g.expirationTime>A&&le());){var me=g.callback;if(typeof me=="function"){g.callback=null,T=g.priorityLevel;var X=me(g.expirationTime<=A);if(A=s.unstable_now(),typeof X=="function"){g.callback=X,F(A),I=!0;break t}g===u(b)&&c(b),F(A)}else c(b);g=u(b)}if(g!==null)I=!0;else{var qe=u(E);qe!==null&&ge(xe,qe.startTime-A),I=!1}}break e}finally{g=null,T=M,L=!1}I=void 0}}finally{I?W():Z=!1}}}var W;if(typeof $=="function")W=function(){$(ae)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,re=ie.port2;ie.port1.onmessage=ae,W=function(){re.postMessage(null)}}else W=function(){G(ae,0)};function ge(A,I){V=G(function(){A(s.unstable_now())},I)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(A){A.callback=null},s.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<A?Math.floor(1e3/A):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_next=function(A){switch(T){case 1:case 2:case 3:var I=3;break;default:I=T}var M=T;T=I;try{return A()}finally{T=M}},s.unstable_requestPaint=function(){U=!0},s.unstable_runWithPriority=function(A,I){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var M=T;T=A;try{return I()}finally{T=M}},s.unstable_scheduleCallback=function(A,I,M){var me=s.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?me+M:me):M=me,A){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=M+X,A={id:N++,callback:I,priorityLevel:A,startTime:M,expirationTime:X,sortIndex:-1},M>me?(A.sortIndex=M,o(E,A),u(b)===null&&A===u(E)&&(B?(Q(V),V=-1):B=!0,ge(xe,M-me))):(A.sortIndex=X,o(b,A),K||L||(K=!0,Z||(Z=!0,W()))),A},s.unstable_shouldYield=le,s.unstable_wrapCallback=function(A){var I=T;return function(){var M=T;T=I;try{return A.apply(this,arguments)}finally{T=M}}}})(Uu)),Uu}var wx;function uv(){return wx||(wx=1,Bu.exports=cv()),Bu.exports}var Lu={exports:{}},wt={};/**
|
|
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 Sx;function dv(){if(Sx)return wt;Sx=1;var s=Ud();function o(N){var g="https://react.dev/errors/"+N;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)g+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+N+"; visit "+g+" 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(o(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 x(N,g,T){var L=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:L==null?null:L===p?p:""+L,children:N,containerInfo:g,implementation:T}}var b=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(N,g){if(N==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,wt.browser=function(N){return{$$typeof:h,_reason:N}},wt.createPortal=function(N,g){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(o(299));return x(N,g,null,T)},wt.flushSync=function(N){var g=b.T,T=c.p;try{if(b.T=null,c.p=2,N)return N()}finally{b.T=g,c.p=T,c.d.f()}},wt.preconnect=function(N,g){typeof N=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,c.d.C(N,g))},wt.prefetchDNS=function(N){typeof N=="string"&&c.d.D(N)},wt.preinit=function(N,g){if(typeof N=="string"&&g&&typeof g.as=="string"){var T=g.as,L=E(T,g.crossOrigin),K=typeof g.integrity=="string"?g.integrity:void 0,B=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;T==="style"?c.d.S(N,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:L,integrity:K,fetchPriority:B}):T==="script"&&c.d.X(N,{crossOrigin:L,integrity:K,fetchPriority:B,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},wt.preinitModule=function(N,g){if(typeof N=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var T=E(g.as,g.crossOrigin);c.d.M(N,{crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&c.d.M(N)},wt.preload=function(N,g){if(typeof N=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var T=g.as,L=E(T,g.crossOrigin);c.d.L(N,T,{crossOrigin:L,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},wt.preloadModule=function(N,g){if(typeof N=="string")if(g){var T=E(g.as,g.crossOrigin);c.d.m(N,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else c.d.m(N)},wt.requestFormReset=function(N){c.d.r(N)},wt.unstable_batchedUpdates=function(N,g){return N(g)},wt.useFormState=function(N,g,T){return b.H.useFormState(N,g,T)},wt.useFormStatus=function(){return b.H.useHostTransitionStatus()},wt.version="19.3.0",wt}var jx;function fv(){if(jx)return Lu.exports;jx=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Lu.exports=dv(),Lu.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 _x;function hv(){if(_x)return ei;_x=1;var s=uv(),o=Ud(),u=fv();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 x(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,a=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return b(l),e;if(i===a)return b(l),t;i=i.sibling}throw Error(c(188))}if(n.return!==a.return)n=l,a=i;else{for(var f=!1,m=l.child;m;){if(m===n){f=!0,n=l,a=i;break}if(m===a){f=!0,a=l,n=i;break}m=m.sibling}if(!f){for(m=i.child;m;){if(m===n){f=!0,n=i,a=l;break}if(m===a){f=!0,a=i,n=l;break}m=m.sibling}if(!f)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}function g(e,t,n,a,l,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,a,l,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&g(e.child,t,n,a,l,i))return!0;e=e.sibling}return!1}function T(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 L(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 K(e){var t=[null,null],n=T(e);return n===null||B(t,e,n.child,{foundSelf:!1}),t}function B(e,t,n,a){for(;n!==null;){if(n===t)a.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(a.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&B(e,t,n.child,a))return!0;n=n.sibling}return!1}function U(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,Q=null;function $(e,t,n){return e===n?!0:e===t?(G=e,!0):!1}function F(e,t,n){return e===n?(Q=e,!1):e===t?(Q!==null&&(G=e),!0):!1}function xe(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 Z(e,t,n){for(var a=0,l=e;l;l=n(l))a++;l=0;for(var i=t;i;i=n(i))l++;for(;0<a-l;)e=n(e),a--;for(;0<l-a;)t=n(t),l--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var V=Object.assign,z=Symbol.for("react.element"),J=Symbol.for("react.transitional.element"),le=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),ge=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),qe=Symbol.for("react.activity"),et=Symbol.for("react.legacy_hidden"),Ce=Symbol.for("react.memo_cache_sentinel"),w=Symbol.for("react.view_transition"),v=Symbol.for("react.recoverable"),P=Symbol.iterator;function te(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 ae:return"Fragment";case ie:return"Profiler";case W:return"StrictMode";case I:return"Suspense";case M:return"SuspenseList";case qe:return"Activity";case w:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case le:return"Portal";case ge:return e.displayName||"Context";case re:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case X:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var Se=Array.isArray,se=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tt={pending:!1,data:null,method:null,action:null},ln=[],sn=-1;function Dt(e){return{current:e}}function Pe(e){0>sn||(e.current=ln[sn],ln[sn]=null,sn--)}function ke(e,t){sn++,ln[sn]=e.current,e.current=t}var Kt=Dt(null),Ta=Dt(null),rn=Dt(null),al=Dt(null);function ll(e,t){switch(ke(rn,t),ke(Ta,e),ke(Kt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cp(t),e=Tp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Pe(Kt),ke(Kt,e)}function Jn(){Pe(Kt),Pe(Ta),Pe(rn)}function as(e){var t=e.memoizedState;t!==null&&(Jl._currentValue=t.memoizedState,ke(al,e)),t=Kt.current;var n=Tp(t,e.type);t!==n&&(ke(Ta,e),ke(Kt,n))}function sl(e){Ta.current===e&&(Pe(Kt),Pe(Ta)),al.current===e&&(Pe(al),Jl._currentValue=tt)}var ls,ss;function on(e){if(ls===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ls=t&&t[1]||"",ss=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ls+e+ss}var il=!1;function rl(e,t){if(!e||il)return"";il=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={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(ne){var j=ne}Reflect.construct(e,[],H)}else{try{H.call()}catch(ne){j=ne}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(ne){j=ne}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(ne){if(ne&&j&&typeof ne.stack=="string")return[ne.stack,j.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),f=i[0],m=i[1];if(f&&m){var y=f.split(`
|
|
44
|
+
`),C=m.split(`
|
|
45
|
+
`);for(l=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;if(a===y.length||l===C.length)for(a=y.length-1,l=C.length-1;1<=a&&0<=l&&y[a]!==C[l];)l--;for(;1<=a&&0<=l;a--,l--)if(y[a]!==C[l]){if(a!==1||l!==1)do if(a--,l--,0>l||y[a]!==C[l]){var R=`
|
|
46
|
+
`+y[a].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=a&&0<=l);break}}}finally{il=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?on(n):""}function di(e,t){switch(e.tag){case 26:case 27:case 5:return on(e.type);case 16:return on("Lazy");case 13:return e.child!==t&&t!==null?on("Suspense Fallback"):on("Suspense");case 19:return on("SuspenseList");case 0:case 15:return rl(e.type,!1);case 11:return rl(e.type.render,!1);case 1:return rl(e.type,!0);case 31:return on("Activity");case 30:return on("ViewTransition");default:return""}}function D(e){try{var t="",n=null;do t+=di(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var ve=Object.prototype.hasOwnProperty,Ze=s.unstable_scheduleCallback,Fe=s.unstable_cancelCallback,Re=s.unstable_shouldYield,In=s.unstable_requestPaint,He=s.unstable_now,h0=s.unstable_getCurrentPriorityLevel,Jd=s.unstable_ImmediatePriority,Id=s.unstable_UserBlockingPriority,fi=s.unstable_NormalPriority,m0=s.unstable_LowPriority,Pd=s.unstable_IdlePriority,p0=s.log,x0=s.unstable_setDisableYieldValue,is=null,Rt=null;function Pn(e){if(typeof p0=="function"&&x0(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(is,e)}catch{}}var Bt=Math.clz32?Math.clz32:y0,g0=Math.log,b0=Math.LN2;function y0(e){return e>>>=0,e===0?32:31-(g0(e)/b0|0)|0}var hi=256,mi=262144,pi=4194304;function Aa(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 xi(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~i,a!==0?l=Aa(a):(f&=m,f!==0?l=Aa(f):n||(n=m&~e,n!==0&&(l=Aa(n))))):(m=a&~i,m!==0?l=Aa(m):f!==0?l=Aa(f):n||(n=a&~e,n!==0&&(l=Aa(n)))),l===0?0:t!==0&&t!==l&&(t&i)===0&&(i=l&-l,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:l}function rs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fd(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Bt(n),l=1<<a;t|=e[a],n&=~l}return t}function v0(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 $d(){var e=pi;return pi<<=1,(pi&62914560)===0&&(pi=4194304),e}function so(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function os(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function N0(e,t,n,a,l,i){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,C=e.hiddenUpdates;for(n=f&~n;0<n;){var R=31-Bt(n),H=1<<R;m[R]=0,y[R]=-1;var j=C[R];if(j!==null)for(C[R]=null,R=0;R<j.length;R++){var O=j[R];O!==null&&(O.lane&=-536870913)}n&=~H}a!==0&&Wd(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(f&~t))}function Wd(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function ef(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Bt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function tf(e,t){var n=t&-t;return n=(n&42)!==0?1:io(n),(n&(e.suspendedLanes|t))!==0?0:n}function io(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 ro(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function nf(){var e=oe.p;return e!==0?e:(e=window.event,e===void 0?32:ux(e.type))}function af(e,t){var n=oe.p;try{return oe.p=e,t()}finally{oe.p=n}}var kn=Math.random().toString(36).slice(2),xt="__reactFiber$"+kn,At="__reactProps$"+kn,ol="__reactContainer$"+kn,lf="__reactEvents$"+kn,w0="__reactListeners$"+kn,S0="__reactHandles$"+kn,sf="__reactResources$"+kn,cs="__reactMarker$"+kn,gi="__reactLoad$"+kn;function bi(e){delete e[xt],delete e[At],delete e[w0],delete e[S0]}function Ea(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[ol]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qp(e);e!==null;){if(n=e[xt])return n;e=Qp(e)}return t}e=n,n=e.parentNode}return null}function cl(e){if(e=e[xt]||e[ol]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function us(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function ul(e){var t=e[sf];return t||(t=e[sf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[cs]=!0}function rf(e){e[gi]=void 0}var of=new Set,cf={};function za(e,t){dl(e,t),dl(e+"Capture",t)}function dl(e,t){for(cf[e]=t,e=0;e<t.length;e++)of.add(t[e])}var j0=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]*$"),uf={},df={};function _0(e){return ve.call(df,e)?!0:ve.call(uf,e)?!1:j0.test(e)?df[e]=!0:(uf[e]=!0,!1)}var Ue=!1;function ff(){var e=Ue;return Ue=!1,e}function yi(e,t,n){if(_0(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function vi(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 Mn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,a)}}function Ut(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function C0(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(f){n=""+f,i.call(this,f)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function oo(e){if(!e._valueTracker){var t=hf(e)?"checked":"value";e._valueTracker=C0(e,t,""+e[t])}}function mf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=hf(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}var T0=/[\n"\\]/g;function Zt(e){return e.replace(T0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function co(e,t,n,a,l,i,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=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?f==="number"&&e.value==t?uo(e,Ut(e.value)):uo(e,Ut(t)):n!=null?uo(e,Ut(n)):a!=null&&e.removeAttribute("value"),l==null&&i!=null&&(e.defaultChecked=!!i),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Ut(m):e.removeAttribute("name")}function pf(e,t,n,a,l,i,f,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){oo(e);return}n=n!=null?""+Ut(n):"",t=t!=null?""+Ut(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),oo(e)}function uo(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function fl(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Ut(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function xf(e,t,n){if(t!=null&&(t=""+Ut(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ut(n):""}function gf(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(c(92));if(Se(a)){if(1<a.length)throw Error(c(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Ut(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),oo(e)}function hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var A0=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 bf(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||A0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function yf(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Ue=!0);for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&(bf(e,l,a),Ue=!0)}else for(var i in t)t.hasOwnProperty(i)&&bf(e,i,t[i])}function fo(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 E0=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"]]),z0=/^[\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 Ni(e){return z0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var ho=null;function mo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,pl=null;function vf(e){var t=cl(e);if(t&&(e=t.stateNode)){var n=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(co(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="'+Zt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[At]||null;if(!l)throw Error(c(90));co(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&mf(a)}break e;case"textarea":xf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fl(e,!!n.multiple,t,!1)}}}var po=!1;function Nf(e,t,n){if(po)return e(t,n);po=!0;try{var a=e(t);return a}finally{if(po=!1,(ml!==null||pl!==null)&&(Nr(),ml&&(t=ml,e=pl,pl=ml=null,vf(t),e)))for(t=0;t<e.length;t++)vf(e[t])}}function ds(e,t){var n=e.stateNode;if(n===null)return null;var a=n[At]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xo=!1;if(On)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){xo=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{xo=!1}var Fn=null,go=null,wi=null;function wf(){if(wi)return wi;var e,t=go,n=t.length,a,l="value"in Fn?Fn.value:Fn.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var f=n-e;for(a=1;a<=f&&t[n-a]===l[i-a];a++);return wi=l.slice(e,1<a?1-a:void 0)}function Si(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 ji(){return!0}function Sf(){return!1}function jt(e){function t(n,a,l,i,f){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=f,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ji:Sf,this.isPropagationStopped=Sf,this}return V(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=ji)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ji)},persist:function(){},isPersistent:ji}),t}var $n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_i=jt($n),hs=V({},$n,{view:0,detail:0}),k0=jt(hs),bo,yo,ms,Ci=V({},hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:No,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!==ms&&(ms&&e.type==="mousemove"?(bo=e.screenX-ms.screenX,yo=e.screenY-ms.screenY):yo=bo=0,ms=e),bo)},movementY:function(e){return"movementY"in e?e.movementY:yo}}),jf=jt(Ci),M0=V({},Ci,{dataTransfer:0}),O0=jt(M0),D0=V({},hs,{relatedTarget:0}),vo=jt(D0),R0=V({},$n,{animationName:0,elapsedTime:0,pseudoElement:0}),B0=jt(R0),U0=V({},$n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),L0=jt(U0),q0=V({},$n,{data:0}),_f=jt(q0),H0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G0={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"},V0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=V0[e])?!!t[e]:!1}function No(){return Y0}var Q0=V({},hs,{key:function(e){if(e.key){var t=H0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?G0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:No,charCode:function(e){return e.type==="keypress"?Si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),X0=jt(Q0),K0=V({},Ci,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cf=jt(K0),Z0=V({},$n,{submitter:0}),J0=jt(Z0),I0=V({},hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:No}),P0=jt(I0),F0=V({},$n,{propertyName:0,elapsedTime:0,pseudoElement:0}),$0=jt(F0),W0=V({},Ci,{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}),e1=jt(W0),t1=V({},$n,{newState:0,oldState:0,source:0}),n1=jt(t1),a1=[9,13,27,32],wo=On&&"CompositionEvent"in window,ps=null;On&&"documentMode"in document&&(ps=document.documentMode);var l1=On&&"TextEvent"in window&&!ps,Tf=On&&(!wo||ps&&8<ps&&11>=ps),Af=" ",Ef=!1;function zf(e,t){switch(e){case"keyup":return a1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function s1(e,t){switch(e){case"compositionend":return kf(t);case"keypress":return t.which!==32?null:(Ef=!0,Af);case"textInput":return e=t.data,e===Af&&Ef?null:e;default:return null}}function i1(e,t){if(xl)return e==="compositionend"||!wo&&zf(e,t)?(e=wf(),wi=go=Fn=null,xl=!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 Tf&&t.locale!=="ko"?null:t.data;default:return null}}var r1={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 Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!r1[e.type]:t==="textarea"}function Of(e,t,n,a){ml?pl?pl.push(a):pl=[a]:ml=a,t=Tr(t,"onChange"),0<t.length&&(n=new _i("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var xs=null,gs=null;function o1(e){vp(e,0)}function Ti(e){var t=us(e);if(mf(t))return e}function Df(e,t){if(e==="change")return t}var Rf=!1;if(On){var So;if(On){var jo="oninput"in document;if(!jo){var Bf=document.createElement("div");Bf.setAttribute("oninput","return;"),jo=typeof Bf.oninput=="function"}So=jo}else So=!1;Rf=So&&(!document.documentMode||9<document.documentMode)}function Uf(){xs&&(xs.detachEvent("onpropertychange",Lf),gs=xs=null)}function Lf(e){if(e.propertyName==="value"&&Ti(gs)){var t=[];Of(t,gs,e,mo(e)),Nf(o1,t)}}function c1(e,t,n){e==="focusin"?(Uf(),xs=t,gs=n,xs.attachEvent("onpropertychange",Lf)):e==="focusout"&&Uf()}function u1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ti(gs)}function d1(e,t){if(e==="click")return Ti(t)}function f1(e,t){if(e==="input"||e==="change")return Ti(t)}function h1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:h1;function bs(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!ve.call(t,l)||!Lt(e[l],t[l]))return!1}return!0}function _o(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 qf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var n=qf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qf(n)}}function Gf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_o(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=_o(e.document)}return t}function Co(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 m1=On&&"documentMode"in document&&11>=document.documentMode,gl=null,To=null,ys=null,Ao=!1;function Yf(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ao||gl==null||gl!==_o(a)||(a=gl,"selectionStart"in a&&Co(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ys&&bs(ys,a)||(ys=a,a=Tr(To,"onSelect"),0<a.length&&(t=new _i("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=gl)))}function ka(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bl={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},Eo={},Qf={};On&&(Qf=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Ma(e){if(Eo[e])return Eo[e];if(!bl[e])return e;var t=bl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qf)return Eo[e]=t[n];return e}var Xf=Ma("animationend"),Kf=Ma("animationiteration"),Zf=Ma("animationstart"),p1=Ma("transitionrun"),x1=Ma("transitionstart"),g1=Ma("transitioncancel"),Jf=Ma("transitionend"),If=new Map,zo="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(" ");zo.push("scrollEnd");function cn(e,t){If.set(e,t),za(t,[e])}var b1=0;function Dn(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=hn.identifierPrefix;var n=b1++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Pf(e){if(e==null||typeof e=="string")return e;var t=null,n=Ll;if(n!==null)for(var a=0;a<n.length;a++){var l=e[n[a]];if(l!=null){if(l==="none")return"none";t=t==null?l:t+(" "+l)}}return t??e.default}function Rn(e,t){return e=Pf(e),t=Pf(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Ai=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)},Jt=[],yl=0,ko=0;function Ei(){for(var e=yl,t=ko=yl=0;t<e;){var n=Jt[t];Jt[t++]=null;var a=Jt[t];Jt[t++]=null;var l=Jt[t];Jt[t++]=null;var i=Jt[t];if(Jt[t++]=null,a!==null&&l!==null){var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}i!==0&&Ff(n,l,i)}}function zi(e,t,n,a){Jt[yl++]=e,Jt[yl++]=t,Jt[yl++]=n,Jt[yl++]=a,ko|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Mo(e,t,n,a){return zi(e,t,n,a),ki(e)}function Oa(e,t){return zi(e,null,null,t),ki(e)}function Ff(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(l=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,l&&t!==null&&(l=31-Bt(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function ki(e){if(50<Gs)throw Gs=0,vr=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vl={};function y1(e,t,n,a){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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,n,a){return new y1(e,t,n,a)}function Oo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bn(e,t){var n=e.alternate;return n===null?(n=Et(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 $f(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 Mi(e,t,n,a,l,i){var f=0;if(a=e,typeof a=="function")Oo(a)&&(f=1);else if(typeof a=="string")f=Zy(e,n,Kt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case qe:return e=Et(31,n,t,l),e.elementType=qe,e.lanes=i,e;case ae:return Da(n.children,l,i,t);case W:f=8,l|=24;break;case ie:return e=Et(12,n,t,l|2),e.elementType=ie,e.lanes=i,e;case I:return e=Et(13,n,t,l),e.elementType=I,e.lanes=i,e;case M:return e=Et(19,n,t,l),e.elementType=M,e.lanes=i,e;case et:case w:return e=l|32,e=Et(30,n,t,e),e.elementType=w,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case ge:f=10;break e;case re:f=9;break e;case A:f=11;break e;case me:f=14;break e;case X:f=16,a=null;break e}f=29,n=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=Et(f,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function Da(e,t,n,a){return e=Et(7,e,a,t),e.lanes=n,e}function Do(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function Wf(e){var t=Et(18,null,null,0);return t.stateNode=e,t}function Ro(e,t,n){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var eh=new WeakMap;function It(e,t){if(typeof e=="object"&&e!==null){var n=eh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:D(t)},eh.set(e,t),t)}return{value:e,source:t,stack:D(t)}}var Nl=[],wl=0,Oi=null,vs=0,Pt=[],Ft=0,Wn=null,gn=1,bn="";function Un(e,t){Nl[wl++]=vs,Nl[wl++]=Oi,Oi=e,vs=t}function th(e,t,n){Pt[Ft++]=gn,Pt[Ft++]=bn,Pt[Ft++]=Wn,Wn=e;var a=gn;e=bn;var l=32-Bt(a)-1;a&=~(1<<l),n+=1;var i=32-Bt(t)+l;if(30<i){var f=l-l%5;i=(a&(1<<f)-1).toString(32),a>>=f,l-=f,gn=1<<32-Bt(t)+l|n<<l|a,bn=i+e}else gn=1<<i|n<<l|a,bn=e}function Di(e){e.return!==null&&(Un(e,1),th(e,1,0))}function Bo(e){for(;e===Oi;)Oi=Nl[--wl],Nl[wl]=null,vs=Nl[--wl],Nl[wl]=null;for(;e===Wn;)Wn=Pt[--Ft],Pt[Ft]=null,bn=Pt[--Ft],Pt[Ft]=null,gn=Pt[--Ft],Pt[Ft]=null}function nh(e,t){Pt[Ft++]=gn,Pt[Ft++]=bn,Pt[Ft++]=Wn,gn=t.id,bn=t.overflow,Wn=e}var ht=null,Je=null,Te=!1,ea=null,$t=!1,Uo=Error(c(519));function ta(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ns(It(t,e)),Uo}function ah(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[xt]=e,t[At]=a,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<Ys.length;n++)ze(Ys[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),pf(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),gf(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||jp(t.textContent,n)?(a.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),a.onScroll!=null&&ze("scroll",t),a.onScrollEnd!=null&&ze("scrollend",t),a.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||ta(e,!0)}function Ri(e){for(ht=e.return;ht;)switch(ht.tag){case 5:case 31:case 13:$t=!1;return;case 27:case 3:$t=!0;return;default:ht=ht.return}}function Sl(e){if(e!==ht)return!1;if(!Te)return Ri(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")||hu(e.type,e.memoizedProps)),n=!n),n&&Je&&ta(e),Ri(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Je=Yp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Je=Yp(e)}else t===27?(t=Je,ga(e.type)?(e=wu,wu=null,Je=e):Je=t):Je=ht?en(e.stateNode.nextSibling):null;return!0}function Ra(){Je=ht=null,Te=!1}function Lo(){var e=ea;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),ea=null),e}function Ns(e){ea===null?ea=[e]:ea.push(e)}var qo=Dt(null),Ba=null,Ln=null;function na(e,t,n){ke(qo,t._currentValue),t._currentValue=n}function qn(e){e._currentValue=qo.current,Pe(qo)}function Bi(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Ho(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var f=l.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=l;for(var y=0;y<t.length;y++)if(m.context===t[y]){i.lanes|=n,m=i.alternate,m!==null&&(m.lanes|=n),Bi(i.return,n,e),a||(f=null);break e}i=m.next}}else if(l.tag===18){if(f=l.return,f===null)throw Error(c(341));f.lanes|=n,i=f.alternate,i!==null&&(i.lanes|=n),Bi(f,n,e),f=null}else l.tag===13&&l.memoizedState!==null&&l.memoizedState.dehydrated===null?(l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),Bi(l.return,n,e),f=l.child,f=f!==null?f.sibling:null):f=l.child;if(f!==null)f.return=l;else for(f=l;f!==null;){if(f===e){f=null;break}if(l=f.sibling,l!==null){l.return=f.return,f=l;break}f=f.return}l=f}}function Ua(e,t,n,a){e=null;for(var l=t,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var f=l.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var m=l.type;Lt(l.pendingProps.value,f.value)||(e!==null?e.push(m):e=[m])}}else if(l===al.current){if(f=l.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Jl):e=[Jl])}l=l.return}return e!==null&&Ho(t,e,n,a),t.flags|=262144,e!==null}function Ui(e){for(e=e.firstContext;e!==null;){if(!Lt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function La(e){Ba=e,Ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return lh(Ba,e)}function Li(e,t){return Ba===null&&La(e),lh(e,t)}function lh(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ln===null){if(e===null)throw Error(c(308));Ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ln=Ln.next=t;return n}var v1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},N1=s.unstable_scheduleCallback,w1=s.unstable_NormalPriority,st={$$typeof:ge,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Go(){return{controller:new v1,data:new Map,refCount:0}}function ws(e){e.refCount--,e.refCount===0&&N1(w1,function(){e.controller.abort()})}function sh(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];n.indexOf(a)===-1&&n.push(a)}}}var Ss=null;function S1(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var js=null,Vo=0,qa=0,jl=null;function j1(e,t){if(js===null){var n=js=[];Vo=0,qa=lu(),jl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Vo++,t.then(ih,ih),t}function ih(){if(--Vo===0&&(Ss=null,js!==null)){jl!==null&&(jl.status="fulfilled");var e=js;js=null,qa=0,jl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _1(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var rh=se.S;se.S=function(e,t){if(Wm=He(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&j1(e,t),Ss!==null)for(var n=Vl;n!==null;)sh(n,Ss),n=n.next;if(n=e.types,n!==null){for(var a=Vl;a!==null;)sh(a,n),a=a.next;if(qa!==0){a=Ss,a===null&&(a=Ss=[]);for(var l=0;l<n.length;l++){var i=n[l];a.indexOf(i)===-1&&a.push(i)}}}rh!==null&&rh(e,t)};var Ha=Dt(null);function Yo(){var e=Ha.current;return e!==null?e:Ke.pooledCache}function qi(e,t){t===null?ke(Ha,Ha.current):ke(Ha,t.pool)}function oh(){var e=Yo();return e===null?null:{parent:st._currentValue,pool:e}}var _l=Error(c(460)),Qo=Error(c(474)),Hi=Error(c(542)),Gi={then:function(){}};function ch(e){return e=e.status,e==="fulfilled"||e==="rejected"}function uh(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fh(e),e===void 0&&!("reason"in t)?Error(c(600)):e;default:if(typeof t.status=="string")t.then(xn,xn);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fh(e),e}throw Va=t,_l}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Va=n,_l):n}}var Va=null;function dh(){if(Va===null)throw Error(c(459));var e=Va;return Va=null,e}function fh(e){if(e===_l||e===Hi)throw Error(c(483))}var Cl=null,_s=0;function Vi(e){var t=_s;return _s+=1,Cl===null&&(Cl=[]),uh(Cl,e,t)}function aa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Yi(e,t){throw t.$$typeof===z?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hh(e){function t(_,S){if(e){var k=_.deletions;k===null?(_.deletions=[S],_.flags|=16):k.push(S)}}function n(_,S){if(!e)return null;for(;S!==null;)t(_,S),S=S.sibling;return null}function a(_){for(var S=new Map;_!==null;)_.key===null?S.set(_.index,_):S.set(_.key,_),_=_.sibling;return S}function l(_,S){return _=Bn(_,S),_.index=0,_.sibling=null,_}function i(_,S,k){return _.index=k,e?(k=_.alternate,k!==null?(k=k.index,k<S?(_.flags|=2,S):k):(_.flags|=134217730,S)):(_.flags|=1048576,S)}function f(_){return e&&_.alternate===null&&(_.flags|=134217730),_}function m(_,S,k,q){return S===null||S.tag!==6?(S=Do(k,_.mode,q),S.return=_,S):(S=l(S,k),S.return=_,S)}function y(_,S,k,q){var ce=k.type;return ce===ae?(_=R(_,S,k.props.children,q,k.key),aa(_,k),_):S!==null&&(S.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===X&&Ga(ce)===S.type)?(S=l(S,k.props),aa(S,k),S.return=_,S):(S=Mi(k.type,k.key,k.props,null,_.mode,q),aa(S,k),S.return=_,S)}function C(_,S,k,q){return S===null||S.tag!==4||S.stateNode.containerInfo!==k.containerInfo||S.stateNode.implementation!==k.implementation?(S=Ro(k,_.mode,q),S.return=_,S):(S=l(S,k.children||[]),S.return=_,S)}function R(_,S,k,q,ce){return S===null||S.tag!==7?(S=Da(k,_.mode,q,ce),S.return=_,S):(S=l(S,k),S.return=_,S)}function H(_,S,k){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Do(""+S,_.mode,k),S.return=_,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case J:return k=Mi(S.type,S.key,S.props,null,_.mode,k),aa(k,S),k.return=_,k;case le:return S=Ro(S,_.mode,k),S.return=_,S;case X:return S=Ga(S),H(_,S,k)}if(Se(S)||te(S))return S=Da(S,_.mode,k,null),S.return=_,S;if(typeof S.then=="function")return H(_,Vi(S),k);if(S.$$typeof===ge)return H(_,Li(_,S),k);Yi(_,S)}return null}function j(_,S,k,q){var ce=S!==null?S.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ce!==null?null:m(_,S,""+k,q);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case J:return k.key===ce?y(_,S,k,q):null;case le:return k.key===ce?C(_,S,k,q):null;case X:return k=Ga(k),j(_,S,k,q)}if(Se(k)||te(k))return ce!==null?null:R(_,S,k,q,null);if(typeof k.then=="function")return j(_,S,Vi(k),q);if(k.$$typeof===ge)return j(_,S,Li(_,k),q);Yi(_,k)}return null}function O(_,S,k,q,ce){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(k)||null,m(S,_,""+q,ce);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case J:return _=_.get(q.key===null?k:q.key)||null,y(S,_,q,ce);case le:return _=_.get(q.key===null?k:q.key)||null,C(S,_,q,ce);case X:return q=Ga(q),O(_,S,k,q,ce)}if(Se(q)||te(q))return _=_.get(k)||null,R(S,_,q,ce,null);if(typeof q.then=="function")return O(_,S,k,Vi(q),ce);if(q.$$typeof===ge)return O(_,S,k,Li(S,q),ce);Yi(S,q)}return null}function ne(_,S,k,q){for(var ce=null,Oe=null,be=S,Ne=S=0,ot=null;be!==null&&Ne<k.length;Ne++){be.index>Ne?(ot=be,be=null):ot=be.sibling;var Be=j(_,be,k[Ne],q);if(Be===null){be===null&&(be=ot);break}e&&be&&Be.alternate===null&&t(_,be),S=i(Be,S,Ne),Oe===null?ce=Be:Oe.sibling=Be,Oe=Be,be=ot}if(Ne===k.length)return n(_,be),Te&&Un(_,Ne),ce;if(be===null){for(;Ne<k.length;Ne++)be=H(_,k[Ne],q),be!==null&&(S=i(be,S,Ne),Oe===null?ce=be:Oe.sibling=be,Oe=be);return Te&&Un(_,Ne),ce}for(be=a(be);Ne<k.length;Ne++)ot=O(be,_,Ne,k[Ne],q),ot!==null&&(e&&(Be=ot.alternate,Be!==null&&be.delete(Be.key===null?Ne:Be.key)),S=i(ot,S,Ne),Oe===null?ce=ot:Oe.sibling=ot,Oe=ot);return e&&be.forEach(function(wa){return t(_,wa)}),Te&&Un(_,Ne),ce}function pe(_,S,k,q){if(k==null)throw Error(c(151));for(var ce=null,Oe=null,be=S,Ne=S=0,ot=null,Be=k.next();be!==null&&!Be.done;Ne++,Be=k.next()){be.index>Ne?(ot=be,be=null):ot=be.sibling;var wa=j(_,be,Be.value,q);if(wa===null){be===null&&(be=ot);break}e&&be&&wa.alternate===null&&t(_,be),S=i(wa,S,Ne),Oe===null?ce=wa:Oe.sibling=wa,Oe=wa,be=ot}if(Be.done)return n(_,be),Te&&Un(_,Ne),ce;if(be===null){for(;!Be.done;Ne++,Be=k.next())Be=H(_,Be.value,q),Be!==null&&(S=i(Be,S,Ne),Oe===null?ce=Be:Oe.sibling=Be,Oe=Be);return Te&&Un(_,Ne),ce}for(be=a(be);!Be.done;Ne++,Be=k.next())Be=O(be,_,Ne,Be.value,q),Be!==null&&(e&&(ot=Be.alternate,ot!==null&&be.delete(ot.key===null?Ne:ot.key)),S=i(Be,S,Ne),Oe===null?ce=Be:Oe.sibling=Be,Oe=Be);return e&&be.forEach(function(sv){return t(_,sv)}),Te&&Un(_,Ne),ce}function _e(_,S,k,q){if(typeof k=="object"&&k!==null&&k.type===ae&&k.key===null&&k.props.ref===void 0&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case J:e:{for(var ce=k.key;S!==null;){if(S.key===ce){if(ce=k.type,ce===ae){if(S.tag===7){n(_,S.sibling),q=l(S,k.props.children),aa(q,k),q.return=_,_=q;break e}}else if(S.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===X&&Ga(ce)===S.type){n(_,S.sibling),q=l(S,k.props),aa(q,k),q.return=_,_=q;break e}n(_,S);break}else t(_,S);S=S.sibling}k.type===ae?(q=Da(k.props.children,_.mode,q,k.key),aa(q,k),q.return=_,_=q):(q=Mi(k.type,k.key,k.props,null,_.mode,q),aa(q,k),q.return=_,_=q)}return f(_);case le:e:{for(ce=k.key;S!==null;){if(S.key===ce)if(S.tag===4&&S.stateNode.containerInfo===k.containerInfo&&S.stateNode.implementation===k.implementation){n(_,S.sibling),q=l(S,k.children||[]),q.return=_,_=q;break e}else{n(_,S);break}else t(_,S);S=S.sibling}q=Ro(k,_.mode,q),q.return=_,_=q}return f(_);case X:return k=Ga(k),_e(_,S,k,q)}if(Se(k))return ne(_,S,k,q);if(te(k)){if(ce=te(k),typeof ce!="function")throw Error(c(150));return k=ce.call(k),pe(_,S,k,q)}if(typeof k.then=="function")return _e(_,S,Vi(k),q);if(k.$$typeof===ge)return _e(_,S,Li(_,k),q);Yi(_,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,S!==null&&S.tag===6?(n(_,S.sibling),q=l(S,k),q.return=_,_=q):(n(_,S),q=Do(k,_.mode,q),q.return=_,_=q),f(_)):n(_,S)}return function(_,S,k,q){try{_s=0;var ce=_e(_,S,k,q);return Cl=null,ce}catch(be){if(be===_l||be===Hi)throw be;var Oe=Et(29,be,null,_.mode);return Oe.lanes=q,Oe.return=_,Oe}finally{}}}var Ya=hh(!0),mh=hh(!1),la=!1;function Xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ko(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 sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ia(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Le&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=ki(e),Ff(e,null,n),t}return zi(e,a,t,n),ki(e)}function Cs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,ef(e,n)}}function Zo(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=f:i=i.next=f,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Jo=!1;function Ts(){if(Jo){var e=jl;if(e!==null)throw e}}function As(e,t,n,a){Jo=!1;var l=e.updateQueue;la=!1;var i=l.firstBaseUpdate,f=l.lastBaseUpdate,m=l.shared.pending;if(m!==null){l.shared.pending=null;var y=m,C=y.next;y.next=null,f===null?i=C:f.next=C,f=y;var R=e.alternate;R!==null&&(R=R.updateQueue,m=R.lastBaseUpdate,m!==f&&(m===null?R.firstBaseUpdate=C:m.next=C,R.lastBaseUpdate=y))}if(i!==null){var H=l.baseState;f=0,R=C=y=null,m=i;do{var j=m.lane&-536870913,O=j!==m.lane;if(O?(Me&j)===j:(a&j)===j){j!==0&&j===qa&&(Jo=!0),R!==null&&(R=R.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ne=e,pe=m;j=t;var _e=n;switch(pe.tag){case 1:if(ne=pe.payload,typeof ne=="function"){H=ne.call(_e,H,j);break e}H=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=pe.payload,j=typeof ne=="function"?ne.call(_e,H,j):ne,j==null)break e;H=V({},H,j);break e;case 2:la=!0}}j=m.callback,j!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[j]:O.push(j))}else O={lane:j,tag:m.tag,payload:m.payload,callback:m.callback,next:null},R===null?(C=R=O,y=H):R=R.next=O,f|=j;if(m=m.next,m===null){if(m=l.shared.pending,m===null)break;O=m,m=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);R===null&&(y=H),l.baseState=y,l.firstBaseUpdate=C,l.lastBaseUpdate=R,i===null&&(l.shared.lanes=0),ha|=f,e.lanes=f,e.memoizedState=H}}function ph(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function xh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ph(n[e],t)}var ra=Dt(null),Qi=Dt(0);function gh(e,t){e=Qn,ke(Qi,e),ke(ra,t),Qn=e|t.baseLanes}function Io(){ke(Qi,Qn),ke(ra,ra.current)}function Po(){Qn=Qi.current,Pe(ra),Pe(Qi)}var bt=Dt(null),St=null;function oa(e){var t=e.alternate;ke(yt,yt.current&1),ke(bt,e),St===null&&(t===null||ra.current!==null||t.memoizedState!==null)&&(St=e)}function Fo(e){ke(yt,yt.current),ke(bt,e),St===null&&(St=e)}function bh(e){e.tag===22?(ke(yt,yt.current),ke(bt,e),St===null&&(St=e)):ca()}function ca(){ke(yt,yt.current),ke(bt,bt.current)}function qt(e){Pe(bt),St===e&&(St=null),Pe(yt)}var yt=Dt(0);function Es(e,t){ke(bt,bt.current),ke(yt,t)}function $o(e){Pe(yt),Pe(bt),St===e&&(St=null)}function Xi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vu(n)||Nu(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 Hn=0,je=null,Xe=null,it=null,Ki=!1,Tl=!1,Qa=!1,Zi=0,zs=0,Al=null,C1=0;function nt(){throw Error(c(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lt(e[n],t[n]))return!1;return!0}function ec(e,t,n,a,l,i){return Hn=i,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,se.H=e===null||e.memoizedState===null?tm:nm,Qa=!1,i=n(a,l),Qa=!1,Tl&&(i=vh(t,n,a,l)),yh(e),i}function yh(e){se.H=er;var t=Xe!==null&&Xe.next!==null;if(Hn=0,it=Xe=je=null,Ki=!1,zs=0,Al=null,t)throw Error(c(300));e===null||rt||(e=e.dependencies,e!==null&&Ui(e)&&(rt=!0))}function vh(e,t,n,a){je=e;var l=0;do{if(Tl&&(Al=null),zs=0,Tl=!1,25<=l)throw Error(c(301));if(l+=1,it=Xe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}se.H=D1,i=t(n,a)}while(Tl);return i}function T1(){var e=se.H,t=e.useState()[0];return t=typeof t.then=="function"?ks(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(je.flags|=1024),t}function tc(){var e=Zi!==0;return Zi=0,e}function nc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ac(e){if(Ki){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ki=!1}Hn=0,it=Xe=je=null,Tl=!1,zs=Zi=0,Al=null}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?je.memoizedState=it=e:it=it.next=e,it}function lt(){if(Xe===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=it===null?je.memoizedState:it.next;if(t!==null)it=t,Xe=e;else{if(e===null)throw je.alternate===null?Error(c(467)):Error(c(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},it===null?je.memoizedState=it=e:it=it.next=e}return it}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ks(e){var t=zs;return zs+=1,Al===null&&(Al=[]),e=uh(Al,e,t),t=je,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,se.H=t===null||t.memoizedState===null?tm:nm),e}function Ii(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ks(e);if(e.$$typeof===v)return;if(e.$$typeof===ge)return gt(e)}throw Error(c(438,String(e)))}function lc(e){var t=null,n=je.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=je.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ji(),je.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Ce;return t.index++,n}function Gn(e,t){return typeof t=="function"?t(e):t}function Pi(e){var t=lt();return sc(t,Xe,e)}function sc(e,t,n){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var f=l.next;l.next=i.next,i.next=f}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var m=f=null,y=null,C=t,R=!1;do{var H=C.lane&-536870913;if(H!==C.lane?(Me&H)===H:(Hn&H)===H){var j=C.revertLane;if(j===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),H===qa&&(R=!0);else if((Hn&j)===j){C=C.next,j===qa&&(R=!0);continue}else H={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},y===null?(m=y=H,f=i):y=y.next=H,je.lanes|=j,ha|=j;H=C.action,Qa&&n(i,H),i=C.hasEagerState?C.eagerState:n(i,H)}else j={lane:H,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},y===null?(m=y=j,f=i):y=y.next=j,je.lanes|=H,ha|=H;C=C.next}while(C!==null&&C!==t);if(y===null?f=i:y.next=m,!Lt(i,e.memoizedState)&&(rt=!0,R&&(n=jl,n!==null)))throw n;e.memoizedState=i,e.baseState=f,e.baseQueue=y,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ic(e){var t=lt(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var f=l=l.next;do i=e(i,f.action),f=f.next;while(f!==l);Lt(i,t.memoizedState)||(rt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function Nh(e,t,n){var a=je,l=lt(),i=Te;if(i){if(n===void 0)throw Error(c(407));n=n()}else n=t();var f=!Lt((Xe||l).memoizedState,n);if(f&&(l.memoizedState=n,rt=!0),l=l.queue,cc(jh.bind(null,a,l,e),[e]),e=l.getSnapshot!==t||f||it!==null&&(it.memoizedState.tag&1)!==0,El(e?9:8,{destroy:void 0},Sh.bind(null,a,l,n,t),null),e){if(a.flags|=2048,Ke===null)throw Error(c(349));i||(Hn&127)!==0||wh(a,t,n)}return n}function wh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t=Ji(),je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sh(e,t,n,a){t.value=n,t.getSnapshot=a,_h(t)&&Ch(e)}function jh(e,t,n){return n(function(){_h(t)&&Ch(e)})}function _h(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lt(e,n)}catch{return!0}}function Ch(e){var t=Oa(e,2);t!==null&&Ot(t,e,2)}function rc(e){var t=_t();if(typeof e=="function"){var n=e;if(e=n(),Qa){Pn(!0);try{n()}finally{Pn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:e},t}function Th(e,t,n,a){return e.baseState=n,sc(e,Xe,typeof a=="function"?a:Gn)}function A1(e,t,n,a,l){if(Wi(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){i.listeners.push(f)}};se.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,Ah(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Ah(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=se.T,f={};f.types=i!==null?i.types:null,se.T=f;try{var m=n(l,a),y=se.S;y!==null&&y(f,m),Eh(e,t,m)}catch(C){oc(e,t,C)}finally{i!==null&&f.types!==null&&(i.types=f.types),se.T=i}}else try{i=n(l,a),Eh(e,t,i)}catch(C){oc(e,t,C)}}function Eh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){zh(e,t,a)},function(a){return oc(e,t,a)}):zh(e,t,n)}function zh(e,t,n){t.status="fulfilled",t.value=n,kh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ah(e,n)))}function oc(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,kh(t),t=t.next;while(t!==a)}e.action=null}function kh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mh(e,t){return t}function Oh(e,t){if(Te){var n=Ke.formState;if(n!==null){e:{var a=je;if(Te){if(Je){t:{for(var l=Je,i=$t;l.nodeType!==8;){if(!i){l=null;break t}if(l=en(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){Je=en(l.nextSibling),a=l.data==="F!";break e}}ta(a)}a=!1}a&&(t=n[0])}}return n=_t(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mh,lastRenderedState:t},n.queue=a,n=$h.bind(null,je,a),a.dispatch=n,a=rc(!1),i=mc.bind(null,je,!1,a.queue),a=_t(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=A1.bind(null,je,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Dh(e){var t=lt();return Rh(t,Xe,e)}function Rh(e,t,n){if(t=sc(e,t,Mh)[0],e=Pi(Gn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ks(t)}catch(f){throw f===_l?Hi:f}else a=t;t=lt();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(je.flags|=2048,El(9,{destroy:void 0},E1.bind(null,l,n),null)),[a,i,e]}function E1(e,t){e.action=t}function Bh(e){var t=lt(),n=Xe;if(n!==null)return Rh(t,n,e);lt(),t=t.memoizedState,n=lt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function El(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=je.updateQueue,t===null&&(t=Ji(),je.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Uh(){return lt().memoizedState}function Fi(e,t,n,a){var l=_t();je.flags|=e,l.memoizedState=El(1|t,{destroy:void 0},n,a===void 0?null:a)}function $i(e,t,n,a){var l=lt();a=a===void 0?null:a;var i=l.memoizedState.inst;Xe!==null&&a!==null&&Wo(a,Xe.memoizedState.deps)?l.memoizedState=El(t,i,n,a):(je.flags|=e,l.memoizedState=El(1|t,i,n,a))}function Lh(e,t){Fi(8390656,8,e,t)}function cc(e,t){$i(2048,8,e,t)}function z1(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Ji(),je.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qh(e){var t=lt().memoizedState;return z1({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Hh(e,t){return $i(4,2,e,t)}function Gh(e,t){return $i(4,4,e,t)}function Vh(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 Yh(e,t,n){n=n!=null?n.concat([e]):null,$i(4,4,Vh.bind(null,t,e),n)}function uc(){}function Qh(e,t){var n=lt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Wo(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Xh(e,t){var n=lt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Wo(t,a[1]))return a[0];if(a=e(),Qa){Pn(!0);try{e()}finally{Pn(!1)}}return n.memoizedState=[a,t],a}function dc(e,t,n){return n===void 0||(Hn&1073741824)!==0&&(Me&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=tp(),je.lanes|=e,ha|=e,n)}function Kh(e,t,n,a){return Lt(n,t)?n:ra.current!==null?(e=dc(e,n,a),Lt(e,t)||(rt=!0),e):(Hn&106)===0||(Hn&1073741824)!==0&&(Me&261930)===0?(rt=!0,e.memoizedState=n):(e=tp(),je.lanes|=e,ha|=e,t)}function Zh(e,t,n,a,l){var i=oe.p;oe.p=i!==0&&8>i?i:8;var f=se.T,m={};m.types=f!==null?f.types:null,se.T=m,mc(e,!1,t,n);try{var y=l(),C=se.S;if(C!==null&&C(m,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var R=_1(y,a);Ms(e,t,R,Yt(e))}else Ms(e,t,a,Yt(e))}catch(H){Ms(e,t,{then:function(){},status:"rejected",reason:H},Yt())}finally{oe.p=i,f!==null&&m.types!==null&&(f.types=m.types),se.T=f}}function k1(){}function fc(e,t,n,a){if(e.tag!==5)throw Error(c(476));var l=Jh(e).queue;Zh(e,l,t,tt,n===null?k1:function(){return Ih(e),n(a)})}function Jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:tt,baseState:tt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:tt},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ih(e){var t=Jh(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},Yt())}function hc(){return gt(Jl)}function Ph(){return lt().memoizedState}function Fh(){return lt().memoizedState}function M1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yt();e=sa(n);var a=ia(t,e,n);a!==null&&(Ot(a,t,n),Cs(a,t,n)),t={cache:Go()},e.payload=t;return}t=t.return}}function O1(e,t,n){var a=Yt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Wi(e)?Wh(t,n):(n=Mo(e,t,n,a),n!==null&&(Ot(n,e,a),em(n,t,a)))}function $h(e,t,n){var a=Yt();Ms(e,t,n,a)}function Ms(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wi(e))Wh(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,m=i(f,n);if(l.hasEagerState=!0,l.eagerState=m,Lt(m,f))return zi(e,t,l,0),Ke===null&&Ei(),!1}catch{}finally{}if(n=Mo(e,t,l,a),n!==null)return Ot(n,e,a),em(n,t,a),!0}return!1}function mc(e,t,n,a){if(a={lane:2,revertLane:lu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Wi(e)){if(t)throw Error(c(479))}else t=Mo(e,n,a,2),t!==null&&Ot(t,e,2)}function Wi(e){var t=e.alternate;return e===je||t!==null&&t===je}function Wh(e,t){Tl=Ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function em(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,ef(e,n)}}var er={readContext:gt,use:Ii,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt,useEffectEvent:nt},tm={readContext:gt,use:Ii,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Lh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Fi(4194308,4,Vh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4194308,4,e,t)},useInsertionEffect:function(e,t){Fi(4,2,e,t)},useMemo:function(e,t){var n=_t();t=t===void 0?null:t;var a=e();if(Qa){Pn(!0);try{e()}finally{Pn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=_t();if(n!==void 0){var l=n(t);if(Qa){Pn(!0);try{n(t)}finally{Pn(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=O1.bind(null,je,e),[a.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:function(e){e=rc(e);var t=e.queue,n=$h.bind(null,je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:uc,useDeferredValue:function(e,t){var n=_t();return dc(n,e,t)},useTransition:function(){var e=rc(!1);return e=Zh.bind(null,je,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=je,l=_t();if(Te){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ke===null)throw Error(c(349));(Me&127)!==0||wh(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Lh(jh.bind(null,a,i,e),[e]),a.flags|=2048,El(9,{destroy:void 0},Sh.bind(null,a,i,n,t),null),n},useId:function(){var e=_t(),t=Ke.identifierPrefix;if(Te){var n=bn,a=gn;n=(a&~(1<<32-Bt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Zi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=C1++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hc,useFormState:Oh,useActionState:Oh,useOptimistic:function(e){var t=_t();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=mc.bind(null,je,!0,n),n.dispatch=t,[e,t]},useMemoCache:lc,useCacheRefresh:function(){return _t().memoizedState=M1.bind(null,je)},useEffectEvent:function(e){var t=_t(),n={impl:e};return t.memoizedState=n,function(){if((Le&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},nm={readContext:gt,use:Ii,useCallback:Qh,useContext:gt,useEffect:cc,useImperativeHandle:Yh,useInsertionEffect:Hh,useLayoutEffect:Gh,useMemo:Xh,useReducer:Pi,useRef:Uh,useState:function(){return Pi(Gn)},useDebugValue:uc,useDeferredValue:function(e,t){var n=lt();return Kh(n,Xe.memoizedState,e,t)},useTransition:function(){var e=Pi(Gn)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:ks(e),t]},useSyncExternalStore:Nh,useId:Ph,useHostTransitionStatus:hc,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var n=lt();return Th(n,Xe,e,t)},useMemoCache:lc,useCacheRefresh:Fh,useEffectEvent:qh},D1={readContext:gt,use:Ii,useCallback:Qh,useContext:gt,useEffect:cc,useImperativeHandle:Yh,useInsertionEffect:Hh,useLayoutEffect:Gh,useMemo:Xh,useReducer:ic,useRef:Uh,useState:function(){return ic(Gn)},useDebugValue:uc,useDeferredValue:function(e,t){var n=lt();return Xe===null?dc(n,e,t):Kh(n,Xe.memoizedState,e,t)},useTransition:function(){var e=ic(Gn)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:ks(e),t]},useSyncExternalStore:Nh,useId:Ph,useHostTransitionStatus:hc,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var n=lt();return Xe!==null?Th(n,Xe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:lc,useCacheRefresh:Fh,useEffectEvent:qh};function pc(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:V({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xc={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Yt(),l=sa(a);l.payload=t,n!=null&&(l.callback=n),t=ia(e,l,a),t!==null&&(Ot(t,e,a),Cs(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Yt(),l=sa(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=ia(e,l,a),t!==null&&(Ot(t,e,a),Cs(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Yt(),a=sa(n);a.tag=2,t!=null&&(a.callback=t),t=ia(e,a,n),t!==null&&(Ot(t,e,n),Cs(t,e,n))}};function am(e,t,n,a,l,i,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,f):t.prototype&&t.prototype.isPureReactComponent?!bs(n,a)||!bs(l,i):!0}function lm(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&xc.enqueueReplaceState(t,t.state,null)}function Xa(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=V({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function sm(e){Ai(e)}function im(e){console.error(e)}function rm(e){Ai(e)}function tr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function om(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function gc(e,t,n){return n=sa(n),n.tag=3,n.payload={element:null},n.callback=function(){tr(e,t)},n}function cm(e){return e=sa(e),e.tag=3,e}function um(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var i=a.value;e.payload=function(){return l(i)},e.callback=function(){om(t,n,a)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){om(t,n,a),typeof l!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function R1(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ua(t,n,l,!0),n=bt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return St===null?wr():n.alternate===null&&at===0&&(at=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Gi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),tu(e,a,l)),!1;case 22:return n.flags|=65536,a===Gi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),tu(e,a,l)),!1}throw Error(c(435,n.tag))}return tu(e,a,l),wr(),!1}if(Te)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==Uo&&(e=Error(c(422),{cause:a}),Ns(It(e,n)))):(a!==Uo&&(t=Error(c(423),{cause:a}),Ns(It(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=It(a,n),l=gc(e.stateNode,a,l),Zo(e,l),at!==4&&(at=2)),!1;var i=Error(c(520),{cause:a});if(i=It(i,n),Hs===null?Hs=[i]:Hs.push(i),at!==4&&(at=2),t===null)return!0;a=It(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=gc(n.stateNode,a,e),Zo(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ma===null||!ma.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=cm(l),um(l,e,n,a),Zo(n,l),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var bc=Error(c(461)),rt=!1;function ut(e,t,n,a){t.child=e===null?mh(t,null,n,a):Ya(t,e.child,n,a)}function dm(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var f={};for(var m in a)m!=="ref"&&(f[m]=a[m])}else f=a;return La(t),a=ec(e,t,n,f,i,l),m=tc(),e!==null&&!rt?(nc(e,t,l),Vn(e,t,l)):(Te&&m&&Di(t),t.flags|=1,ut(e,t,a,l),t.child)}function fm(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!Oo(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,hm(e,t,i,a,l)):(e=Mi(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Cc(e,l)){var f=i.memoizedProps;if(n=n.compare,n=n!==null?n:bs,n(f,a)&&e.ref===t.ref)return Vn(e,t,l)}return t.flags|=1,e=Bn(i,a),e.ref=t.ref,e.return=t,t.child=e}function hm(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if(bs(i,a)&&e.ref===t.ref)if(rt=!1,t.pendingProps=a=i,Cc(e,l))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Vn(e,t,l)}return yc(e,t,n,a,l)}function mm(e,t,n,a){var l=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~i}else a=0,t.child=null;return pm(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qi(t,i!==null?i.cachePool:null),i!==null?gh(t,i):Io(),bh(t);else return a=t.lanes=536870912,pm(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(qi(t,i.cachePool),gh(t,i),ca(),t.memoizedState=null):(e!==null&&qi(t,null),Io(),ca());return ut(e,t,l,n),t.child}function Os(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pm(e,t,n,a,l){var i=Yo();return i=i===null?null:{parent:st._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&qi(t,null),Io(),bh(t),e!==null&&Ua(e,t,a,!0),t.childLanes=l,null}function nr(e,t){return t=ar({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xm(e,t,n){return Ya(t,e.child,null,n),e=nr(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function B1(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(a.mode==="hidden")return e=nr(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Os(null,e);if(Fo(t),(e=Je)?(e=Vp(e,$t),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wn!==null?{id:gn,overflow:bn}:null,retryLane:536870912,hydrationErrors:null},n=Wf(e),n.return=t,t.child=n,ht=t,Je=null)):e=null,e===null)throw ta(t);return t.lanes=536870912,null}return nr(t,a)}var i=e.memoizedState;if(i!==null){var f=i.dehydrated;if(Fo(t),l)if(t.flags&256)t.flags&=-257,t=xm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(rt||Ua(e,t,n,!1),l=(n&e.childLanes)!==0,rt||l){if(ra.current===null){if(a=Ke,a!==null&&(f=tf(a,n),f!==0&&f!==i.retryLane))throw i.retryLane=f,Oa(e,f),Ot(a,e,f),bc;wr()}t=xm(e,t,n)}else e=i.treeContext,Je=en(f.nextSibling),ht=t,Te=!0,ea=null,$t=!1,e!==null&&nh(t,e),t=nr(t,a),t.flags|=134221824;return t}return e=Bn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zl(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 yc(e,t,n,a,l){return La(t),n=ec(e,t,n,a,void 0,l),a=tc(),e!==null&&!rt?(nc(e,t,l),Vn(e,t,l)):(Te&&a&&Di(t),t.flags|=1,ut(e,t,n,l),t.child)}function gm(e,t,n,a,l,i){return La(t),t.updateQueue=null,n=vh(t,a,n,l),yh(e),a=tc(),e!==null&&!rt?(nc(e,t,i),Vn(e,t,i)):(Te&&a&&Di(t),t.flags|=1,ut(e,t,n,i),t.child)}function bm(e,t,n,a,l){if(La(t),t.stateNode===null){var i=vl,f=n.contextType;typeof f=="object"&&f!==null&&(i=gt(f)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=xc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Xo(t),f=n.contextType,i.context=typeof f=="object"&&f!==null?gt(f):vl,i.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(pc(t,n,f,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(f=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),f!==i.state&&xc.enqueueReplaceState(i,i.state,null),As(t,a,i,l),Ts(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,y=Xa(n,m);i.props=y;var C=i.context,R=n.contextType;f=vl,typeof R=="object"&&R!==null&&(f=gt(R));var H=n.getDerivedStateFromProps;R=typeof H=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,R||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||C!==f)&&lm(t,i,a,f),la=!1;var j=t.memoizedState;i.state=j,As(t,a,i,l),Ts(),C=t.memoizedState,m||j!==C||la?(typeof H=="function"&&(pc(t,n,H,a),C=t.memoizedState),(y=la||am(t,n,y,a,j,C,f))?(R||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=C),i.props=a,i.state=C,i.context=f,a=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Ko(e,t),f=t.memoizedProps,R=Xa(n,f),i.props=R,H=t.pendingProps,j=i.context,C=n.contextType,y=vl,typeof C=="object"&&C!==null&&(y=gt(C)),m=n.getDerivedStateFromProps,(C=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f!==H||j!==y)&&lm(t,i,a,y),la=!1,j=t.memoizedState,i.state=j,As(t,a,i,l),Ts();var O=t.memoizedState;f!==H||j!==O||la||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof m=="function"&&(pc(t,n,m,a),O=t.memoizedState),(R=la||am(t,n,R,a,j,O,y)||e!==null&&e.dependencies!==null&&Ui(e.dependencies))?(C||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=y,a=R):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,zl(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Ya(t,e.child,null,l),t.child=Ya(t,null,n,l)):ut(e,t,n,l),t.memoizedState=i.state,e=t.child):e=Vn(e,t,l),e}function ym(e,t,n,a){return Ra(),t.flags|=256,ut(e,t,n,a),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nc(e){return{baseLanes:e,cachePool:oh()}}function wc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vt),e}function vm(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,f;if((f=i)||(f=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),f&&(l=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(l?oa(t):ca(),(e=Je)?(e=Vp(e,$t),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wn!==null?{id:gn,overflow:bn}:null,retryLane:536870912,hydrationErrors:null},n=Wf(e),n.return=t,t.child=n,ht=t,Je=null)):e=null,e===null)throw ta(t);return Nu(e)?t.lanes=32:t.lanes=536870912,null}return i=a.children,a=a.fallback,l?(ca(),l=t.mode,i=ar({mode:"hidden",children:i},l),a=Da(a,l,n,null),i.return=t,a.return=t,i.sibling=a,t.child=i,a=t.child,a.memoizedState=Nc(n),a.childLanes=wc(e,f,n),t.memoizedState=vc,Os(null,a)):(oa(t),Sc(t,i))}var m=e.memoizedState;if(m!==null){var y=m.dehydrated;if(y!==null)return U1(e,t,i,f,a,y,m,n)}return l?(ca(),l=a.fallback,i=t.mode,m=e.child,y=m.sibling,a=Bn(m,{mode:"hidden",children:a.children}),a.subtreeFlags=m.subtreeFlags&1206910976,y!==null?l=Bn(y,l):(l=Da(l,i,n,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,Os(null,a),a=t.child,l=e.child.memoizedState,l===null?l=Nc(n):(i=l.cachePool,i!==null?(m=st._currentValue,i=i.parent!==m?{parent:m,pool:m}:i):i=oh(),l={baseLanes:l.baseLanes|n,cachePool:i}),a.memoizedState=l,a.childLanes=wc(e,f,n),t.memoizedState=vc,Os(e.child,a)):(oa(t),n=e.child,e=n.sibling,n=Bn(n,{mode:"visible",children:a.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 Sc(e,t){return t=ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ar(e,t){return e=Et(22,e,null,t),e.lanes=0,e}function lr(e,t,n){return Ya(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function U1(e,t,n,a,l,i,f,m){if(n)return t.flags&256?(oa(t),t.flags&=-257,lr(e,t,m)):t.memoizedState!==null?(ca(),t.child=e.child,t.flags|=128,null):(ca(),i=l.fallback,f=t.mode,l=ar({mode:"visible",children:l.children},f),i=Da(i,f,m,null),i.flags|=2,l.return=t,i.return=t,l.sibling=i,t.child=l,Ya(t,e.child,null,m),l=t.child,l.memoizedState=Nc(m),l.childLanes=wc(e,a,m),t.memoizedState=vc,Os(null,l));if(oa(t),Nu(i)){if(a=i.nextSibling&&i.nextSibling.dataset,a)var y=a.dgst;return a=y,a!==""&&(l=Error(c(419)),l.stack="",l.digest=a,Ns({value:l,source:null,stack:null})),lr(e,t,m)}if(rt||Ua(e,t,m,!1),a=(m&e.childLanes)!==0,rt||a){if(ra.current!==null)return lr(e,t,m);if(a=Ke,a!==null&&(l=tf(a,m),l!==0&&l!==f.retryLane))throw f.retryLane=l,Oa(e,l),Ot(a,e,l),bc;return vu(i)||wr(),lr(e,t,m)}return vu(i)?(t.flags|=192,t.child=e.child,null):(e=f.treeContext,Je=en(i.nextSibling),ht=t,Te=!0,ea=null,$t=!1,e!==null&&nh(t,e),t=Sc(t,l.children),t.flags|=134221824,t)}function Nm(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Bi(e.return,t,n)}function wm(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Xi(n)===null&&(t=e),e=e.sibling}return t}function sr(e,t,n,a,l,i){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=n,f.tailMode=l,f.treeForkCount=i)}function jc(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 _c(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var f=yt.current;if(t.flags&128)return Es(t,f),null;var m=(f&2)!==0;if(m?(f=f&1|2,t.flags|=128):f&=1,Es(t,f),l==="backwards"&&e!==null?(jc(e),ut(e,t,a,n),jc(e)):ut(e,t,a,n),a=Te?vs:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nm(e,n,t);else if(e.tag===19)Nm(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(l){case"backwards":n=wm(t.child),n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null,jc(t)),sr(t,!0,l,null,i,a);break;case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Xi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}sr(t,!0,n,null,i,a);break;case"together":sr(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:n=wm(t.child),n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),sr(t,!1,l,n,i,a)}return t.child}function Sm(e,t,n){var a=t.pendingProps;return na(t,t.type,a.value),ut(e,t,a.children,n),t.child}function Vn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ha|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ua(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=Bn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ui(e)))}function L1(e,t,n){switch(t.tag){case 3:ll(t,t.stateNode.containerInfo),na(t,st,e.memoizedState.cache),Ra();break;case 27:case 5:as(t);break;case 4:ll(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fo(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return oa(t),t.flags|=128,null;a=Ua(e,t,n,!1);var l=t.child.childLanes;return a||(n&l)!==0?vm(e,t,n):(oa(t),e=Vn(e,t,n),e!==null?e.sibling:null)}oa(t);break;case 19:if(t.flags&128)return _c(e,t,n);if(l=(e.flags&128)!==0,a=(n&t.childLanes)!==0,a||(Ua(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return _c(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Es(t,yt.current),a)break;return null;case 22:return t.lanes=0,mm(e,t,n,t.pendingProps);case 24:na(t,st,e.memoizedState.cache)}return Vn(e,t,n)}function jm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!Cc(e,n)&&(t.flags&128)===0)return rt=!1,L1(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Te&&(t.flags&1048576)!==0&&th(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e=="function")Oo(e)?(a=Xa(e,a),t.tag=1,t=bm(null,t,e,a,n)):(t.tag=0,t=yc(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===A){t.tag=11,t=dm(null,t,e,a,n);break e}else if(l===me){t.tag=14,t=fm(null,t,e,a,n);break e}else if(l===ge){t.tag=10,t.type=e,t=Sm(null,t,n);break e}}throw t=fe(e)||e,Error(c(306,t,""))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Xa(a,t.pendingProps),bm(e,t,a,l,n);case 3:e:{if(ll(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,Ko(e,t),As(t,a,null,n);var f=t.memoizedState;if(a=f.cache,na(t,st,a),a!==i.cache&&Ho(t,[st],n,!0),Ts(),a=f.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=ym(e,t,a,n);break e}else if(a!==l){l=It(Error(c(424)),t),Ns(l),t=ym(e,t,a,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(Je=en(e.firstChild),ht=t,Te=!0,ea=null,$t=!0,n=mh(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Ra(),a===l){t=Vn(e,t,n);break e}ut(e,t,a,n)}t=t.child}return t;case 26:return zl(e,t),e===null?(n=Ip(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(t.stateNode=Ap(t.type,t.pendingProps,rn.current,t)):t.memoizedState=Ip(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return as(t),e===null&&Te&&(a=t.stateNode=Xp(t.type,t.pendingProps,rn.current),ht=t,$t=!0,l=Je,ga(t.type)?(wu=l,Je=en(a.firstChild)):Je=l),ut(e,t,t.pendingProps.children,n),zl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((l=a=Je)&&(a=My(a,t.type,t.pendingProps,$t),a!==null?(t.stateNode=a,ht=t,Je=en(a.firstChild),$t=!1,l=!0):l=!1),l||ta(t)),as(t),l=t.type,i=t.pendingProps,f=e!==null?e.memoizedProps:null,a=i.children,hu(l,i)?a=null:f!==null&&hu(l,f)&&(t.flags|=32),t.memoizedState!==null&&(l=ec(e,t,T1,null,null,n),Jl._currentValue=l),zl(e,t),ut(e,t,a,n),t.child;case 6:return e===null&&Te&&((e=n=Je)&&(n=Oy(n,t.pendingProps,$t),n!==null?(t.stateNode=n,ht=t,Je=null,e=!0):e=!1),e||ta(t)),null;case 13:return vm(e,t,n);case 4:return ll(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ya(t,null,a,n):ut(e,t,a,n),t.child;case 11:return dm(e,t,t.type,t.pendingProps,n);case 7:return a=t.pendingProps,zl(e,t),ut(e,t,a,n),t.child;case 8:return ut(e,t,t.pendingProps.children,n),t.child;case 12:return ut(e,t,t.pendingProps.children,n),t.child;case 10:return Sm(e,t,n);case 9:return l=t.type._context,a=t.pendingProps.children,La(t),l=gt(l),a=a(l),t.flags|=1,ut(e,t,a,n),t.child;case 14:return fm(e,t,t.type,t.pendingProps,n);case 15:return hm(e,t,t.type,t.pendingProps,n);case 19:return _c(e,t,n);case 31:return B1(e,t,n);case 22:return mm(e,t,n,t.pendingProps);case 24:return La(t),a=gt(st),e===null?(l=Yo(),l===null&&(l=Ke,i=Go(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},Xo(t),na(t,st,l)):((e.lanes&n)!==0&&(Ko(e,t),As(t,null,null,n),Ts()),l=e.memoizedState,i=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),na(t,st,a)):(a=i.cache,na(t,st,a),a!==l.cache&&Ho(t,[st],n,!0))),ut(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Te&&Di(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:zl(e,t),ut(e,t,a.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Yn(e){e.flags|=4}function Tc(e,t,n,a,l){var i;if((i=(e.mode&32)!==0)&&(i=n===null?Wp(t,a):Wp(t,a)&&(a.src!==n.src||a.srcSet!==n.srcSet)),i){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(sp())e.flags|=8192;else throw Va=Gi,Qo}else e.flags&=-16777217}function _m(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ex(t))if(sp())e.flags|=8192;else throw Va=Gi,Qo}function ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?$d():536870912,e.lanes|=t,Rl|=t)}function Ds(e,t){if(!Te)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.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 Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&1206910976,a|=l.flags&1206910976,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function q1(e,t,n){var a=t.pendingProps;switch(Bo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),qn(st),Jn(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?Yn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Lo())),Ie(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(Yn(t),i!==null?(Ie(t),_m(t,i)):(Ie(t),Tc(t,l,null,a,n))):i?i!==e.memoizedState?(Yn(t),Ie(t),_m(t,i)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Yn(t),Ie(t),Tc(t,l,e,a,n)),null;case 27:if(sl(t),n=rn.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Yn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Ie(t),t.subtreeFlags&=-33554433,null}e=Kt.current,Sl(t)?ah(t):(e=Xp(l,a,n),t.stateNode=e,Yn(t))}return Ie(t),t.subtreeFlags&=-33554433,null;case 5:if(sl(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Yn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Ie(t),t.subtreeFlags&=-33554433,null}if(i=Kt.current,Sl(t))ah(t);else{var f=Xs(rn.current);switch(i){case 1:i=f.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=f.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=f.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?f.createElement(l,{is:a.is}):f.createElement(l)}}i[xt]=t,i[At]=a;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.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=i;e:switch(Nt(i,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Yn(t)}}return Ie(t),t.subtreeFlags&=-33554433,Tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Yn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=rn.current,Sl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=ht,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||jp(e.nodeValue,n)),e||ta(t,!0)}else e=Xs(e).createTextNode(a),e[xt]=t,t.stateNode=e}return Ie(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Sl(t),n!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[xt]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else n=Lo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ie(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Sl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(c(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(c(317));l[xt]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),l=!1}else l=Lo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ir(t,t.updateQueue),Ie(t),null);case 4:return Jn(),e===null&&ou(t.stateNode.containerInfo),t.flags|=67108864,Ie(t),null;case 10:return qn(t.type),Ie(t),null;case 19:if($o(t),a=t.memoizedState,a===null)return Ie(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)Ds(a,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Xi(e),i!==null){for(t.flags|=128,Ds(a,!1),e=i.updateQueue,t.updateQueue=e,ir(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)$f(n,e),n=n.sibling;return Es(t,yt.current&1|2),Te&&Un(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&He()>br&&(t.flags|=128,l=!0,Ds(a,!1),t.lanes=4194304)}else{if(!l)if(e=Xi(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,ir(t,e),Ds(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!i.alternate&&!Te)return Ie(t),null}else 2*He()-a.renderingStartTime>br&&n!==536870912&&(t.flags|=128,l=!0,Ds(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}if(a.tail!==null){e=a.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=He(),e.sibling=null,i=yt.current,i=l?i&1|2:i&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!n||Te?Es(t,i):(n=i,ke(bt,t),ke(yt,n),St===null&&(St=t)),Te&&Un(t,a.treeForkCount),e}return Ie(t),null;case 22:case 23:return qt(t),Po(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),n=t.updateQueue,n!==null&&ir(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Pe(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qn(st),Ie(t),null;case 25:return null;case 30:return t.flags|=33554432,Ie(t),null}throw Error(c(156,t.tag))}function H1(e,t){switch(Bo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qn(st),Jn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return sl(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(c(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $o(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 Jn(),null;case 10:return qn(t.type),null;case 22:case 23:return qt(t),Po(),e!==null&&Pe(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qn(st),null;case 25:return null;default:return null}}function Cm(e,t){switch(Bo(t),t.tag){case 3:qn(st),Jn();break;case 26:case 27:case 5:sl(t);break;case 4:Jn();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:$o(t);break;case 10:qn(t.type);break;case 22:case 23:qt(t),Po(),e!==null&&Pe(Ha);break;case 24:qn(st)}}function Rs(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var i=n.create,f=n.inst;a=i(),f.destroy=a}n=n.next}while(n!==l)}}catch(m){Ye(t,t.return,m)}}function ua(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){var f=a.inst,m=f.destroy;if(m!==void 0){f.destroy=void 0,l=t;var y=n,C=m;try{C()}catch(R){Ye(l,y,R)}}}a=a.next}while(a!==i)}}catch(R){Ye(t,t.return,R)}}function Tm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xh(t,n)}catch(a){Ye(e,e.return,a)}}}function Am(e,t,n){n.props=Xa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Ye(e,t,a)}}function yn(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var l=e.stateNode,i=Dn(e.memoizedProps,l);(l.ref===null||l.ref.name!==i)&&(l.ref=Rp(i)),a=l.ref;break;case 7:if(e.stateNode===null){var f=new Qt(e);g(e.child,!1,zy,f,void 0,void 0),e.stateNode=f}a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(m){Ye(e,t,m)}}function vt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){Ye(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){Ye(e,t,l)}else n.current=null}function rr(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++)Gp(e.stateNode,t[n])}function Em(e){for(var t=e.return;t!==null&&(Ec(t)&&Gp(e.stateNode,t.stateNode),!Ac(t));)t=t.return}function Bs(e){for(var t=e.return;t!==null&&(Ec(t)&&ky(e.stateNode,t.stateNode),!Ac(t));)t=t.return}function Ac(e){return e.tag===5||e.tag===3||e.tag===27}function Ec(e){return e&&e.tag===7&&e.stateNode!==null}function zc(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){Ye(e,e.return,l)}}function kc(e,t,n){try{var a=e.stateNode;fy(a,e.type,n,t),a[At]=t}catch(l){Ye(e,e.return,l)}}function zm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ga(e.type)||e.tag===4}function Mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zm(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&&ga(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 Oc(e,t,n,a){var l=e.tag;if(l===5||l===6)l=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(l,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(l),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),rr(e,a),Ue=!0;else if(l!==4&&(l===27&&(rr(e,a),a=null,ga(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Oc(e,t,n,a),e=e.sibling;e!==null;)Oc(e,t,n,a),e=e.sibling}function or(e,t,n,a){var l=e.tag;if(l===5||l===6)l=e.stateNode,t?n.insertBefore(l,t):n.appendChild(l),rr(e,a),Ue=!0;else if(l!==4&&(l===27&&(rr(e,a),a=null,ga(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(or(e,t,n,a),e=e.sibling;e!==null;)or(e,t,n,a),e=e.sibling}function km(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Nt(t,a,n),t[xt]=e,t[At]=n}catch(i){Ye(e,e.return,i)}}var cr=!1,Ht=null;function Mm(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(cr=!0)}var vn=null;function Om(){var e=vn;return vn=null,e}var zt=0;function kl(e,t,n,a,l){return zt=0,Dm(e.child,t,n,a,l)}function Dm(e,t,n,a,l){for(var i=!1;e!==null;){if(e.tag===5){var f=e.stateNode;if(a!==null){var m=xu(f);a.push(m),m.view&&(i=!0)}else i||xu(f).view&&(i=!0);cr=!0,Op(f,zt===0?t:t+"_"+zt,n),zt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&l||Dm(e.child,t,n,a,l)&&(i=!0));e=e.sibling}return i}function Nn(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Nn(e.child,t)),e=e.sibling}function ur(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ur(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=Rn(t.default,t.share),t!=="none"&&(kl(e,n,t,null,!1)||Nn(e.child,!1))}e=e.sibling}}function Dc(e,t){if(e.tag===30){var n=e.stateNode,a=e.memoizedProps,l=Dn(a,n),i=Rn(a.default,n.paired?a.share:a.enter);i!=="none"?kl(e,l,i,null,!1)?(ur(e),n.paired||t||ql(e,a.onEnter)):Nn(e.child,!1):ur(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Dc(e,t),e=e.sibling;else ur(e)}function Rc(e){if(Ht!==null&&Ht.size!==0){var t=Ht;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,a=n.name;if(a!=null&&a!=="auto"){var l=t.get(a);if(l!==void 0){var i=Rn(n.default,n.share);if(i!=="none"&&(kl(e,a,i,null,!1)?(i=e.stateNode,l.paired=i,i.paired=l,ql(e,n.onShare)):Nn(e.child,!1)),t.delete(a),t.size===0)break}}}Rc(e)}e=e.sibling}}}function Bc(e){if(e.tag===30){var t=e.memoizedProps,n=Dn(t,e.stateNode),a=Ht!==null?Ht.get(n):void 0,l=Rn(t.default,a!==void 0?t.share:t.exit);l!=="none"&&(kl(e,n,l,null,!1)?a!==void 0?(l=e.stateNode,a.paired=l,l.paired=a,Ht.delete(n),ql(e,t.onShare)):ql(e,t.onExit):Nn(e.child,!1)),Ht!==null&&Rc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Bc(e),e=e.sibling;else Ht!==null&&Rc(e)}function Rm(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Dn(t,e.stateNode);t=Rn(t.default,t.update),e.flags&=-5,t!=="none"&&kl(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Rm(e);e=e.sibling}}function Uc(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,Nn(e.child,!1))}Uc(e)}e=e.sibling}}function dr(e){if(e.tag===30)e.stateNode.paired=null,Nn(e.child,!1),Uc(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)dr(e),e=e.sibling;else Uc(e)}function Bm(e){for(e=e.child;e!==null;)e.tag===30?Nn(e.child,!1):(e.subtreeFlags&33554432)!==0&&Bm(e),e=e.sibling}function Lc(e,t,n,a,l,i,f){for(var m=!1;t!==null;){if(t.tag===5){var y=t.stateNode;if(i!==null&&zt<i.length){var C=i[zt],R=xu(y);(C.view||R.view)&&(m=!0);var H;if(H=(e.flags&4)===0)if(R.clip)H=!0;else{H=C.rect;var j=R.rect;H=H.y!==j.y||H.x!==j.x||H.height!==j.height||H.width!==j.width}H&&(e.flags|=4),R.abs?R=!C.abs:(C=C.rect,R=R.rect,R=C.height!==R.height||C.width!==R.width),R&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Op(y,zt===0?n:n+"_"+zt,l),m&&(e.flags&4)!==0||(vn===null&&(vn=[]),vn.push(y,zt===0?a:a+"_"+zt,t.memoizedProps)),zt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f?e.flags|=t.flags&32:Lc(e,t.child,n,a,l,i,f)&&(m=!0));t=t.sibling}return m}function Um(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,a=e.stateNode,l=Dn(n,a),i=Rn(n.default,n.update),f;f=e.memoizedState,e.memoizedState=null,a=e;var m=e.child;zt=0,l=Lc(a,m,l,l,i,f,!1),(e.flags&4)!==0&&l&&ql(e,n.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Um(e);e=e.sibling}}var mt=!1,Ge=!1,wn=!1,qc=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,pt=null,Sn=!1,Us=!1,fr=!1,Hc=!1;function G1(e,t,n){if(e=e.containerInfo,du=Il,e=Vf(e),Co(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var i=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var m=0,y=-1,C=-1,R=0,H=0,j=e,O=null;t:for(;;){for(var ne;j!==a||i!==0&&j.nodeType!==3||(y=m+i),j!==f||l!==0&&j.nodeType!==3||(C=m+l),j.nodeType===3&&(m+=j.nodeValue.length),(ne=j.firstChild)!==null;)O=j,j=ne;for(;;){if(j===e)break t;if(O===a&&++R===i&&(y=m),O===f&&++H===l&&(C=m),(ne=j.nextSibling)!==null)break;j=O,O=j.parentNode}j=ne}a=y===-1||C===-1?null:{start:y,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(fu={focusedElem:e,selectionRange:a},Il=!1,n=(n&335544064)===n,pt=t,t=n?9270:1024;pt!==null;){if(e=pt,n&&(a=e.deletions,a!==null))for(i=0;i<a.length;i++)n&&Bc(a[i]);if(e.alternate===null&&(e.flags&2)!==0)n&&Mm(e),hr(n);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&n&&Bc(a),hr(n);continue}else if(a!==null&&a.memoizedState!==null){n&&Mm(e),hr(n);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,pt=a):(n&&Rm(e),hr(n))}}Ht=null}function hr(e){for(;pt!==null;){var t=pt,n=e,a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((l&1024)!==0&&a!==null){n=void 0,l=a.memoizedProps,a=a.memoizedState;var i=t.stateNode;try{var f=Xa(t.type,l);n=i.getSnapshotBeforeUpdate(f,a),i.__reactInternalSnapshotBeforeUpdate=n}catch(m){Ye(t,t.return,m)}}break;case 3:if((l&1024)!==0){if(a=t.stateNode.containerInfo,n=a.nodeType,n===9)yu(a);else if(n===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":yu(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&a!==null&&(n=Dn(a.memoizedProps,a.stateNode),l=t.memoizedProps,l=Rn(l.default,l.update),l!=="none"&&kl(a,n,l,a.memoizedState=[],!0));break;default:if((l&1024)!==0)throw Error(c(163))}if(a=t.sibling,a!==null){a.return=t.return,pt=a;break}pt=t.return}}function qm(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:jn(e,n),a&4&&Rs(5,n);break;case 1:if(jn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(f){Ye(n,n.return,f)}else{var l=Xa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Ye(n,n.return,f)}}a&64&&Tm(n),a&512&&yn(n,n.return);break;case 3:if(jn(e,n),a&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{xh(e,t)}catch(f){Ye(n,n.return,f)}}break;case 27:t===null&&a&4&&km(n);case 26:case 5:jn(e,n),t===null&&a&4&&zc(n),a&512&&yn(n,n.return);break;case 12:jn(e,n);break;case 31:jn(e,n),a&4&&Ym(e,n);break;case 13:jn(e,n),a&4&&Qm(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=W1.bind(null,n),Dy(e,n))));break;case 22:if(a=n.memoizedState!==null||mt,!a){var i=t!==null&&t.memoizedState!==null||Ge;t=mt,l=Ge,mt=a,(Ge=i)&&!l?(a=2,(n.subtreeFlags&8772)!==0&&(a|=1),fn(e,n,a)):jn(e,n),mt=t,Ge=l}break;case 30:jn(e,n),a&512&&yn(n,n.return);break;case 7:a&512&&yn(n,n.return);default:jn(e,n)}}function Gc(e,t){for(e=e.child;e!==null;)Hm(e,t),e=e.sibling}function Hm(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var a=n.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var l=e.stateNode,i=e.memoizedProps.style,f=i!=null&&i.hasOwnProperty("display")?i.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(y){Ye(e,e.return,y)}Vc(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ue=!0}catch(y){Ye(e,e.return,y)}break;case 18:try{var m=e.stateNode;t?Mp(m,!0):Mp(e.stateNode,!1)}catch(y){Ye(e,e.return,y)}break;case 22:case 23:e.memoizedState===null&&Gc(e,t);break;default:Gc(e,t)}}function Vc(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,a=t;switch(n.tag){case 4:Hm(n,a);break e;case 22:n.memoizedState===null&&Vc(n,a);break e;default:Vc(n,a)}}e=e.sibling}}function Gm(e){var t=e.alternate;t!==null&&(e.alternate=null,Gm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bi(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 $e=null,kt=!1;function un(e,t,n){for(n=n.child;n!==null;)Vm(e,t,n),n=n.sibling}function Vm(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(is,n)}catch{}switch(n.tag){case 26:Ge||vt(n,t),un(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ge&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ge||vt(n,t),Bs(n);var a=$e,l=kt;ga(n.type)&&($e=n.stateNode,kt=!1),un(e,t,n),Kp(n.stateNode,n.type,n.memoizedProps),$e=a,kt=l;break;case 5:Ge||vt(n,t),Bs(n);case 6:if(n.tag===6&&Bs(n),a=$e,l=kt,$e=null,un(e,t,n),$e=a,kt=l,$e!==null)if(kt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(n.stateNode),Ue=!0}catch(i){Ye(n,t,i)}else try{$e.removeChild(n.stateNode),Ue=!0}catch(i){Ye(n,t,i)}break;case 18:$e!==null&&(kt?(e=$e,kp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Pl(e)):kp($e,n.stateNode));break;case 4:a=$e,l=kt,$e=n.stateNode.containerInfo,kt=!0,un(e,t,n),$e=a,kt=l;break;case 0:case 11:case 14:case 15:ua(2,n,t),Ge||ua(4,n,t),un(e,t,n);break;case 1:Ge||(vt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Am(n,t,a)),un(e,t,n);break;case 21:un(e,t,n);break;case 22:Ge=(a=Ge)||n.memoizedState!==null,un(e,t,n),Ge=a;break;case 30:vt(n,t),un(e,t,n);break;case 7:Ge||vt(n,t),un(e,t,n);break;default:un(e,t,n)}}function Ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pl(e)}catch(n){Ye(t,t.return,n)}}}function Qm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pl(e)}catch(n){Ye(t,t.return,n)}}function V1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lm),t;default:throw Error(c(435,e.tag))}}function mr(e,t){var n=V1(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=ey.bind(null,e,a);a.then(l,l)}})}function Ct(e,t,n){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var i=a[l],f=e,m=t,y=m;e:for(;y!==null;){switch(y.tag){case 27:if(ga(y.type)){$e=y.stateNode,kt=!1;break e}break;case 5:$e=y.stateNode,kt=!1;break e;case 3:case 4:$e=y.stateNode.containerInfo,kt=!0;break e}y=y.return}if($e===null)throw Error(c(160));Vm(f,m,i),$e=null,kt=!1,f=i.alternate,f!==null&&(f.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xm(t,e,n),t=t.sibling}var dn=null;function Xm(e,t,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(l&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var i=0;i<a.length;i++){var f=a[i];f.ref.impl=f.nextImpl}Ct(t,e,n),Tt(e),l&4&&(ua(3,e,e.return),Rs(3,e),ua(5,e,e.return));break;case 1:Ct(t,e,n),Tt(e),l&512&&(Ge||a===null||vt(a,a.return)),l&64&&mt&&(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(i=dn,Ct(t,e,n),Tt(e),l&512&&(Ge||a===null||vt(a,a.return)),l&4)if(l=a!==null?a.memoizedState:null,n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null)if(mt)e.stateNode=Ap(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,l=i.ownerDocument||i;t:switch(t){case"title":a=l.getElementsByTagName("title")[0],(!a||a[cs]||a[xt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=l.createElement(t),l.head.insertBefore(a,l.querySelector("head > title"))),Nt(a,t,n),a[xt]=e,ft(a),t=a;break e;case"link":if(i=$p("link","href",l).get(t+(n.href||""))){for(f=0;f<i.length;f++)if(a=i[f],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(f,1);break t}}a=l.createElement(t),Nt(a,t,n),l.head.appendChild(a);break;case"meta":if(i=$p("meta","content",l).get(t+(n.content||""))){for(f=0;f<i.length;f++)if(a=i[f],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(f,1);break t}}a=l.createElement(t),Nt(a,t,n),l.head.appendChild(a);break;default:throw Error(c(468,t))}a[xt]=e,ft(a),t=a}e.stateNode=t}else mt||Cu(i,e.type,e.stateNode);else e.stateNode=Fp(i,n,e.memoizedProps);else l!==n?(l===null?(t=a.stateNode,t===null||Ge||t.parentNode.removeChild(t)):l.count--,n===null?mt||Cu(i,e.type,e.stateNode):Fp(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&kc(e,e.memoizedProps,a.memoizedProps);break;case 27:Ct(t,e,n),Tt(e),l&512&&(Ge||a===null||vt(a,a.return)),a!==null&&l&4&&kc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(i=wn,wn=!1,Ct(t,e,n),wn=i,Tt(e),l&512&&(Ge||a===null||vt(a,a.return)),e.flags&32){t=e.stateNode;try{hl(t,""),Ue=!0}catch(R){Ye(e,e.return,R)}}l&4&&e.stateNode!=null&&(t=e.memoizedProps,kc(e,t,a!==null?a.memoizedProps:t)),l&1024&&(qc=!0);break;case 6:if(Ct(t,e,n),Tt(e),l&4){if(e.stateNode===null)throw Error(c(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ue=!0}catch(R){Ye(e,e.return,R)}}break;case 3:if(Ue=!1,Er=null,i=dn,dn=Ks(t.containerInfo),Ct(t,e,n),dn=i,Tt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Pl(t.containerInfo)}catch(R){Ye(e,e.return,R)}qc&&(qc=!1,Km(e)),Ue=!1;break;case 4:l=wn,wn=mt,a=ff(),i=dn,dn=Ks(e.stateNode.containerInfo),Ct(t,e,n),Tt(e),dn=i,Ue&&Us&&(fr=!0),Ue=a,wn=l;break;case 12:Ct(t,e,n),Tt(e);break;case 31:Ct(t,e,n),Tt(e),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,mr(e,t)));break;case 13:Ct(t,e,n),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(gr=He()),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,mr(e,t)));break;case 22:i=e.memoizedState!==null,f=a!==null&&a.memoizedState!==null;var m=mt,y=Ge,C=wn;mt=m||i,wn=C||i,Ge=y||f,Ct(t,e,n),Ge=y,wn=C,mt=m,Tt(e),l&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||a===null||f||mt||Ge||(t=f||Ge,n=mt,a=Ge,mt=i||mt,Ge=t,da(e,2),mt=n,Ge=a),!i&&wn||Gc(e,i)),l&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,mr(e,n))));break;case 19:Ct(t,e,n),Tt(e),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,mr(e,t)));break;case 30:l&512&&(Ge||a===null||vt(a,a.return)),l=ff(),i=Us,f=(n&335544064)===n,m=e.memoizedProps,Us=f&&Rn(m.default,m.update)!=="none",Ct(t,e,n),Tt(e),f&&a!==null&&Ue&&(e.flags|=4),Us=i,Ue=l;break;case 21:break;case 7:l&512&&(Ge||a===null||vt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Ct(t,e,n),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(zm(a)){n=a;break}a=a.return}a=null;for(var l=e.return;l!==null;){if(Ec(l)){var i=l.stateNode;a===null?a=[i]:a.push(i)}if(Ac(l))break;l=l.return}var f=a;if(n==null)throw Error(c(160));switch(n.tag){case 27:var m=n.stateNode,y=Mc(e);or(e,y,m,f);break;case 5:var C=n.stateNode;n.flags&32&&(hl(C,""),n.flags&=-33);var R=Mc(e);or(e,R,C,f);break;case 3:case 4:var H=n.stateNode.containerInfo,j=Mc(e);Oc(e,j,H,f);break;default:throw Error(c(161))}}catch(O){Ye(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Km(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Km(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Il=!0,t.reset(),Il=!1),e=e.sibling}}function Ml(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Zm(t,e),t=t.sibling;else Um(t)}function Zm(e,t){var n=e.alternate;if(n===null)Dc(e,!1);else switch(e.tag){case 3:if(Hc=Sn=!1,Om(),Ml(t,e),!Sn&&!fr){if(e=vn,e!==null)for(var a=0;a<e.length;a+=3){n=e[a];var l=e[a+1];Dp(n,e[a+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+l+")"})}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"})),Hc=!0}vn=null;break;case 5:Ml(t,e);break;case 4:a=Sn,Sn=!1,Ml(t,e),Sn&&(fr=!0),Sn=a;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Dc(e,!1):Ml(t,e));break;case 30:a=Sn,l=Om(),Sn=!1,Ml(t,e),Sn&&(e.flags|=4);var i=e.memoizedProps,f=e.stateNode;t=Dn(i,f),f=Dn(n.memoizedProps,f);var m=Rn(i.default,i.update);m==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,zt=0,t=Lc(e,n,t,f,m,i,!0),zt!==(i===null?0:i.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(ql(e,e.memoizedProps.onUpdate),vn=l):l!==null&&(l.push.apply(l,vn),vn=l),Sn=(e.flags&32)!==0?!0:a;break;default:Ml(t,e)}}function jn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qm(e,t.alternate,t),t=t.sibling}function da(e,t){for(e=e.child;e!==null;){var n=e,a=t;switch(n.tag){case 0:case 11:case 14:case 15:ua(4,n,n.return),da(n,a);break;case 1:vt(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Am(n,n.return,l),da(n,a);break;case 27:(a&2)!==0&&Kp(n.stateNode,n.type,n.memoizedProps);case 5:vt(n,n.return),n.tag!==5&&n.tag!==27||Bs(n),da(n,a);break;case 6:Bs(n);break;case 26:vt(n,n.return),l=n.stateNode,n.memoizedState!==null||l===null||Ge||l.parentNode.removeChild(l),da(n,a);break;case 22:n.memoizedState===null&&da(n,a);break;case 30:vt(n,n.return),da(n,a);break;case 7:vt(n,n.return);default:da(n,a)}e=e.sibling}}function fn(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,f=i.flags,m=(n&1)!==0;switch(i.tag){case 0:case 11:case 15:fn(l,i,n),Rs(4,i);break;case 1:if(fn(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){Ye(a,a.return,R)}if(a=i,l=a.updateQueue,l!==null){var y=a.stateNode;try{var C=l.shared.hiddenCallbacks;if(C!==null)for(l.shared.hiddenCallbacks=null,l=0;l<C.length;l++)ph(C[l],y)}catch(R){Ye(a,a.return,R)}}m&&f&64&&Tm(i),yn(i,i.return);break;case 27:(n&2)!==0&&km(i);case 5:i.tag!==5&&i.tag!==27||Em(i),fn(l,i,n),m&&a===null&&f&4&&zc(i),yn(i,i.return);break;case 6:Em(i);break;case 26:y=i.stateNode,i.memoizedState!==null||y===null||mt||Cu(Ks(y.ownerDocument),i.type,y),fn(l,i,n),m&&a===null&&f&4&&zc(i),yn(i,i.return);break;case 12:fn(l,i,n);break;case 31:fn(l,i,n),m&&f&4&&Ym(l,i);break;case 13:fn(l,i,n),m&&f&4&&Qm(l,i);break;case 22:i.memoizedState===null&&fn(l,i,n),yn(i,i.return);break;case 30:fn(l,i,n),yn(i,i.return);break;case 7:yn(i,i.return);default:fn(l,i,n)}t=t.sibling}}function Yc(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&&ws(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&&ws(e))}function Wt(e,t,n,a){var l=(n&335544064)===n;if(t.subtreeFlags&(l?10262:10256))for(t=t.child;t!==null;)Jm(e,t,n,a),t=t.sibling;else l&&Bm(t)}function Jm(e,t,n,a){var l=(n&335544064)===n;l&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&dr(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:Wt(e,t,n,a),i&2048&&Rs(9,t);break;case 1:Wt(e,t,n,a);break;case 3:Wt(e,t,n,a),l&&Hc&&(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="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&ws(i)));break;case 12:if(i&2048){Wt(e,t,n,a),i=t.stateNode;try{var f=t.memoizedProps,m=f.id,y=f.onPostCommit;typeof y=="function"&&y(m,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(C){Ye(t,t.return,C)}}else Wt(e,t,n,a);break;case 31:Wt(e,t,n,a);break;case 13:Wt(e,t,n,a);break;case 23:break;case 22:f=t.stateNode,m=t.alternate,t.memoizedState!==null?(l&&m!==null&&m.memoizedState===null&&dr(m),f._visibility&2?Wt(e,t,n,a):Ls(e,t)):(l&&m!==null&&m.memoizedState!==null&&dr(t),f._visibility&2?Wt(e,t,n,a):(f._visibility|=2,Ol(e,t,n,a,(t.subtreeFlags&10256)!==0||!1))),i&2048&&Yc(m,t);break;case 24:Wt(e,t,n,a),i&2048&&Qc(t.alternate,t);break;case 30:l&&(i=t.alternate,i!==null&&(Nn(i.child,!0),Nn(t.child,!0))),Wt(e,t,n,a);break;default:Wt(e,t,n,a)}}function Ol(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,f=t,m=n,y=a,C=f.flags;switch(f.tag){case 0:case 11:case 15:Ol(i,f,m,y,l),Rs(8,f);break;case 23:break;case 22:var R=f.stateNode;f.memoizedState!==null?R._visibility&2?Ol(i,f,m,y,l):Ls(i,f):(R._visibility|=2,Ol(i,f,m,y,l)),l&&C&2048&&Yc(f.alternate,f);break;case 24:Ol(i,f,m,y,l),l&&C&2048&&Qc(f.alternate,f);break;default:Ol(i,f,m,y,l)}t=t.sibling}}function Ls(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Ls(n,a),l&2048&&Yc(a.alternate,a);break;case 24:Ls(n,a),l&2048&&Qc(a.alternate,a);break;default:Ls(n,a)}t=t.sibling}}var Ka=8192;function Za(e,t,n){if(e.subtreeFlags&Ka)for(e=e.child;e!==null;)Im(e,t,n),e=e.sibling}function Im(e,t,n){switch(e.tag){case 26:Za(e,t,n),e.flags&Ka&&(e.memoizedState!==null?Jy(n,dn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&nx(n,e)));break;case 5:Za(e,t,n),e.flags&Ka&&(e=e.stateNode,(t&335544128)===t&&nx(n,e));break;case 3:case 4:var a=dn;dn=Ks(e.stateNode.containerInfo),Za(e,t,n),dn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ka,Ka=16777216,Za(e,t,n),Ka=a):Za(e,t,n));break;case 30:if((e.flags&Ka)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var l=e.stateNode;l.paired=null,Ht===null&&(Ht=new Map),Ht.set(a,l)}Za(e,t,n);break;default:Za(e,t,n)}}function Pm(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 qs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];pt=a,$m(a,e)}Pm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fm(e),e=e.sibling}function Fm(e){switch(e.tag){case 0:case 11:case 15:qs(e),e.flags&2048&&ua(9,e,e.return);break;case 3:qs(e);break;case 12:qs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,pr(e)):qs(e);break;default:qs(e)}}function pr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];pt=a,$m(a,e)}Pm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ua(8,t,t.return),pr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,pr(t));break;default:pr(t)}e=e.sibling}}function $m(e,t){for(;pt!==null;){var n=pt;switch(n.tag){case 0:case 11:case 15:ua(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ws(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,pt=a;else e:for(n=e;pt!==null;){a=pt;var l=a.sibling,i=a.return;if(Gm(a),a===n){pt=null;break e}if(l!==null){l.return=i,pt=l;break e}pt=i}}}var Y1={getCacheForType:function(e){var t=gt(st),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return gt(st).controller.signal}},Q1=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ee=null,Me=0,Ve=0,Gt=null,fa=!1,Dl=!1,Xc=!1,Qn=0,at=0,ha=0,Ja=0,xr=0,Vt=0,Rl=0,Hs=null,Mt=null,Kc=!1,gr=0,Wm=0,br=1/0,yr=null,ma=null,We=0,hn=null,Ia=null,_n=0,Zc=0,Jc=null,ep=null,Bl=null,Ul=null,Ll=null,Gs=0,vr=null;function Yt(){return(Le&2)!==0&&Me!==0?Me&-Me:se.T!==null?lu():nf()}function tp(){if(Vt===0)if((Me&536870912)===0||Te){var e=mi;mi<<=1,(mi&3932160)===0&&(mi=262144),Vt=e}else Vt=536870912;return e=bt.current,e!==null&&(e.flags|=32),Vt}function ql(e,t){if(t!=null){var n=e.stateNode,a=n.ref;a===null&&(a=n.ref=Rp(Dn(e.memoizedProps,n))),Ul===null&&(Ul=[]),Ul.push(t.bind(null,a))}}function Ot(e,t,n){(e===Ke&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Hl(e,0),pa(e,Me,Vt,!1)),os(e,n),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(Ja|=n),at===4&&pa(e,Me,Vt,!1)),Cn(e))}function np(e,t,n){if((Le&6)!==0)throw Error(c(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||rs(e,t),l=a?Z1(e,t):Pc(e,t,!0),i=a;do{if(l===0){Dl&&!a&&pa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!X1(n)){l=Pc(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)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;l=Hs;var y=m.current.memoizedState.isDehydrated;if(y&&(Hl(m,f).flags|=256),f=Pc(m,f,!1),f!==2&&f!==6){if(Xc&&!y){m.errorRecoveryDisabledLanes|=i,Ja|=i,l=4;break e}i=Mt,Mt=l,i!==null&&(Mt===null?Mt=i:Mt.push.apply(Mt,i))}l=f}if(i=!1,l!==2)continue}}if(l===1){Hl(e,0),pa(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:pa(a,t,Vt,!fa);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(l=gr+300-He(),10<l)){if(pa(a,t,Vt,!fa),xi(a,0,!0)!==0)break e;_n=t,a.timeoutHandle=pu(ap.bind(null,a,n,Mt,yr,Kc,t,Vt,Ja,Rl,fa,i,"Throttled",-0,0),l);break e}ap(a,n,Mt,yr,Kc,t,Vt,Ja,Rl,fa,i,null,-0,0)}}break}while(!0);Cn(e)}function ap(e,t,n,a,l,i,f,m,y,C,R,H,j,O){e.timeoutHandle=-1;var ne=t.subtreeFlags,pe=(i&335544064)===i;if(H=null,(pe||ne&8192||(ne&16785408)===16785408)&&(H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Ht=null,Im(t,i,H),pe&&(ne=H,pe=e.containerInfo,pe=(pe.nodeType===9?pe:pe.ownerDocument).__reactViewTransition,pe!=null&&(ne.count++,ne.waitingForViewTransition=!0,ne=Is.bind(ne),pe.finished.then(ne,ne))),ne=(i&62914560)===i?gr-He():(i&4194048)===i?Wm-He():0,ne=Iy(H,ne),ne!==null)){_n=i,e.cancelPendingCommit=ne(dp.bind(null,e,t,i,n,a,l,f,m,y,C,R,H,null,j,O)),pa(e,i,f,!C);return}dp(e,t,i,n,a,l,f,m,y,C,R,H)}function X1(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 a=0;a<n.length;a++){var l=n[a],i=l.getSnapshot;l=l.value;try{if(!Lt(i(),l))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 pa(e,t,n,a){t=Fd(e,t),t&=~xr,t&=~Ja,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Bt(l),f=1<<i;a[i]=-1,l&=~f}n!==0&&Wd(e,n,t)}function Nr(){return(Le&6)===0?(Vs(0),!1):!0}function Ic(){if(Ee!==null){if(Ve===0)var e=Ee.return;else e=Ee,Ln=Ba=null,ac(e),Cl=null,_s=0,e=Ee;for(;e!==null;)Cm(e.alternate,e),e=e.return;Ee=null}}function Hl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,py(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_n=0,Ic(),Ke=e,Ee=n=Bn(e.current,null),Me=t,Ve=0,Gt=null,fa=!1,Dl=rs(e,t),Xc=!1,Rl=Vt=xr=Ja=ha=at=0,Mt=Hs=null,Kc=!1,Qn=Fd(e,t),Ei(),n}function lp(e,t){je=null,se.H=er,t===_l||t===Hi?(t=dh(),Ve=3):t===Qo?(t=dh(),Ve=4):Ve=t===bc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Gt=t,Ee===null&&(at=1,tr(e,It(t,e.current)))}function sp(){var e=bt.current;return e===null?!0:(Me&4194048)===Me?St===null:(Me&62914560)===Me||(Me&536870912)!==0?e===St:!1}function ip(){var e=se.H;return se.H=er,e===null?er:e}function rp(){var e=se.A;return se.A=Y1,e}function wr(){at=4,fa||(Me&4194048)!==Me&&bt.current!==null||(Dl=!0),(ha&134217727)===0&&(Ja&134217727)===0||Ke===null||pa(Ke,Me,Vt,!1)}function Pc(e,t,n){var a=Le;Le|=2;var l=ip(),i=rp();(Ke!==e||Me!==t)&&(yr=null,Hl(e,t)),t=!1;var f=at;e:do try{if(Ve!==0&&Ee!==null){var m=Ee,y=Gt;switch(Ve){case 8:Ic(),f=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var C=Ve;if(Ve=0,Gt=null,Gl(e,m,y,C),n&&Dl){f=0;break e}break;default:C=Ve,Ve=0,Gt=null,Gl(e,m,y,C)}}K1(),f=at;break}catch(R){lp(e,R)}while(!0);return t&&e.shellSuspendCounter++,Ln=Ba=null,Le=a,se.H=l,se.A=i,Ee===null&&(Ke=null,Me=0,Ei()),f}function K1(){for(;Ee!==null;)op(Ee)}function Z1(e,t){var n=Le;Le|=2;var a=ip(),l=rp();Ke!==e||Me!==t?(yr=null,br=He()+500,Hl(e,t)):Dl=rs(e,t);e:do try{if(Ve!==0&&Ee!==null){t=Ee;var i=Gt;t:switch(Ve){case 1:Ve=0,Gt=null,Gl(e,t,i,1);break;case 2:case 9:if(ch(i)){Ve=0,Gt=null,cp(t);break}t=function(){Ve!==2&&Ve!==9||Ke!==e||(Ve=7),Cn(e)},i.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:ch(i)?(Ve=0,Gt=null,cp(t)):(Ve=0,Gt=null,Gl(e,t,i,7));break;case 5:var f=null;switch(Ee.tag){case 26:f=Ee.memoizedState;case 5:case 27:var m=Ee;if(f?ex(f):m.stateNode.complete){Ve=0,Gt=null;var y=m.sibling;if(y!==null)Ee=y;else{var C=m.return;C!==null?(Ee=C,Sr(C)):Ee=null}break t}}Ve=0,Gt=null,Gl(e,t,i,5);break;case 6:Ve=0,Gt=null,Gl(e,t,i,6);break;case 8:Ic(),at=6;break e;default:throw Error(c(462))}}J1();break}catch(R){lp(e,R)}while(!0);return Ln=Ba=null,se.H=a,se.A=l,Le=n,Ee!==null?0:(Ke=null,Me=0,Ei(),at)}function J1(){for(;Ee!==null&&!Re();)op(Ee)}function op(e){var t=jm(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,t===null?Sr(e):Ee=t}function cp(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gm(n,t,t.pendingProps,t.type,void 0,Me);break;case 11:t=gm(n,t,t.pendingProps,t.type.render,t.ref,Me);break;case 5:ac(t);var a=t;a===ht&&(Te?(Ri(a),a.tag===5&&a.stateNode!=null&&(Je=a.stateNode)):(Ri(a),Te=!0));default:Cm(n,t),t=Ee=$f(t,Qn),t=jm(n,t,Qn)}e.memoizedProps=e.pendingProps,t===null?Sr(e):Ee=t}function Gl(e,t,n,a){Ln=Ba=null,ac(t),Cl=null,_s=0;var l=t.return;try{if(R1(e,l,t,n,Me)){at=1,tr(e,It(n,e.current)),Ee=null;return}}catch(i){if(l!==null)throw Ee=l,i;at=1,tr(e,It(n,e.current)),Ee=null;return}t.flags&32768?(Te||a===1?e=!0:Dl||(Me&536870912)!==0?e=!1:(fa=e=!0,(a===2||a===9||a===3||a===6)&&(a=bt.current,a!==null&&a.tag===13&&(a.flags|=16384))),up(t,e)):Sr(t)}function Sr(e){var t=e;do{if((t.flags&32768)!==0){up(t,fa);return}e=t.return;var n=q1(t.alternate,t,Qn);if(n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);at===0&&(at=5)}function up(e,t){do{var n=H1(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);at=6,Ee=null}function dp(e,t,n,a,l,i,f,m,y,C,R,H){e.cancelPendingCommit=null;do jr();while(We!==0);if((Le&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));e===Ke&&(Ee=Ke=null,Me=0),Ia=t,hn=e,_n=n,Jc=l,ep=a,I1(e,t,n,f,m,y,H)}}function I1(e,t,n,a,l,i,f){var m=t.lanes|t.childLanes;if(Zc=m,m|=ko,N0(e,n,m,a,l,i),Ul=null,(n&335544064)===n?(Ll=S1(e),a=10262):(Ll=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,ty(fi,function(){return eu(),null})):(e.callbackNode=null,e.callbackPriority=0),cr=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=se.T,se.T=null,l=oe.p,oe.p=2,i=Le,Le|=4;try{G1(e,t,n)}finally{Le=i,oe.p=l,se.T=a}}We=1,cr?Bl=Ny(f,e.containerInfo,Ll,Fc,$c,F1,Wc,eu,P1):(Fc(),$c(),Wc())}function P1(e){if(We!==0){var t=hn.onRecoverableError;t(e,{componentStack:null})}}function F1(){We===3&&(We=0,Zm(Ia,hn),We=4)}function Fc(){if(We===1){We=0;var e=hn,t=Ia,n=_n,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=se.T,se.T=null;var l=oe.p;oe.p=2;var i=Le;Le|=4;try{Us=fr=!1,Xm(t,e,n),n=fu;var f=Vf(e.containerInfo),m=n.focusedElem,y=n.selectionRange;if(f!==m&&m&&m.ownerDocument&&Gf(m.ownerDocument.documentElement,m)){if(y!==null&&Co(m)){var C=y.start,R=y.end;if(R===void 0&&(R=C),"selectionStart"in m)m.selectionStart=C,m.selectionEnd=Math.min(R,m.value.length);else{var H=m.ownerDocument||document,j=H&&H.defaultView||window;if(j.getSelection){var O=j.getSelection(),ne=m.textContent.length,pe=Math.min(y.start,ne),_e=y.end===void 0?pe:Math.min(y.end,ne);!O.extend&&pe>_e&&(f=_e,_e=pe,pe=f);var _=Hf(m,pe),S=Hf(m,_e);if(_&&S&&(O.rangeCount!==1||O.anchorNode!==_.node||O.anchorOffset!==_.offset||O.focusNode!==S.node||O.focusOffset!==S.offset)){var k=H.createRange();k.setStart(_.node,_.offset),O.removeAllRanges(),pe>_e?(O.addRange(k),O.extend(S.node,S.offset)):(k.setEnd(S.node,S.offset),O.addRange(k))}}}}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}}Il=!!du,fu=du=null}finally{Le=i,oe.p=l,se.T=a}}e.current=t,We=2}}function $c(){if(We===2){We=0;var e=hn,t=Ia,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=se.T,se.T=null;var a=oe.p;oe.p=2;var l=Le;Le|=4;try{qm(e,t.alternate,t)}finally{Le=l,oe.p=a,se.T=n}}We=3}}function Wc(){if(We===4||We===3){We=0;var e=Bl;Bl=null,In();var t=hn,n=Ia,a=_n,l=ep,i=(a&335544064)===a?10262:10256;if((n.subtreeFlags&i)!==0||(n.flags&i)!==0?We=5:(We=0,Ia=hn=null,fp(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(ma=null),ro(a),n=n.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(is,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=se.T,i=oe.p,oe.p=2,se.T=null;try{for(var f=t.onRecoverableError,m=0;m<l.length;m++){var y=l[m];f(y.value,{componentStack:y.stack})}}finally{se.T=n,oe.p=i}}if(l=Ul,f=Ll,Ll=null,l!==null&&(Ul=null,f===null&&(f=[]),e!==null))for(y=0;y<l.length;y++)n=(0,l[y])(f),n!==void 0&&e.finished.finally(n);(_n&3)!==0&&jr(),Cn(t),i=t.pendingLanes,(a&261930)!==0&&(i&42)!==0?t===vr?Gs++:(Gs=0,vr=t):(Gs=0,vr=null),Vs(0)}}function fp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ws(t)))}function jr(){return Bl!==null&&(Bl.skipTransition(),Bl=null),Fc(),$c(),Wc(),eu()}function eu(){if(We!==5)return!1;var e=hn,t=Zc;Zc=0;var n=ro(_n),a=se.T,l=oe.p;try{oe.p=32>n?32:n,se.T=null,n=Jc,Jc=null;var i=hn,f=_n;if(We=0,Ia=hn=null,_n=0,(Le&6)!==0)throw Error(c(331));var m=Le;if(Le|=4,Fm(i.current),Jm(i,i.current,f,n),Le=m,Vs(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(is,i)}catch{}return!0}finally{oe.p=l,se.T=a,fp(e,t)}}function hp(e,t,n){t=It(n,t),t=gc(e.stateNode,t,2),e=ia(e,t,2),e!==null&&(os(e,2),Cn(e))}function Ye(e,t,n){if(e.tag===3)hp(e,e,n);else for(;t!==null;){if(t.tag===3){hp(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ma===null||!ma.has(a))){e=It(n,e),n=cm(2),a=ia(t,n,2),a!==null&&(um(n,a,t,e),os(a,2),Cn(a));break}}t=t.return}}function tu(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Q1;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(Xc=!0,l.add(n),e=$1.bind(null,e,t,n),t.then(e,e))}function $1(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Me&n)===n&&((at===4||at===3&&(Me&62914560)===Me&&300>He()-gr)&&(Le&2)===0?Hl(e,0):xr|=n,Rl===Me&&(Rl=0)),Cn(e)}function mp(e,t){t===0&&(t=$d()),e=Oa(e,t),e!==null&&(os(e,t),Cn(e))}function W1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mp(e,n)}function ey(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),mp(e,n)}function ty(e,t){return Ze(e,t)}var Vl=null,Yl=null,nu=!1,_r=!1,au=!1,xa=0;function Cn(e){e!==Yl&&e.next===null&&(Yl===null?Vl=Yl=e:Yl=Yl.next=e),_r=!0,nu||(nu=!0,ay())}function Vs(e,t){if(!au&&_r){au=!0;do for(var n=!1,a=Vl;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var f=a.suspendedLanes,m=a.pingedLanes;i=(1<<31-Bt(42|e)+1)-1,i&=l&~(f&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,bp(a,i))}else i=Me,i=xi(a,a===Ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||rs(a,i)||(n=!0,bp(a,i));a=a.next}while(n);au=!1}}function ny(){pp()}function pp(){_r=nu=!1;var e=0;xa!==0&&my()&&(e=xa);for(var t=He(),n=null,a=Vl;a!==null;){var l=a.next,i=xp(a,t);i===0?(a.next=null,n===null?Vl=l:n.next=l,l===null&&(Yl=n)):(n=a,(e!==0||(i&3)!==0)&&(_r=!0)),a=l}We!==0&&We!==5||Vs(e),xa!==0&&(xa=0)}function xp(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var f=31-Bt(i),m=1<<f,y=l[f];y===-1?((m&n)===0||(m&a)!==0)&&(l[f]=v0(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}if(t=Ke,n=Me,n=xi(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Fe(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||rs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Fe(a),ro(n)){case 2:case 8:n=Id;break;case 32:n=fi;break;case 268435456:n=Pd;break;default:n=fi}return a=gp.bind(null,e),n=Ze(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Fe(a),e.callbackPriority=2,e.callbackNode=null,2}function gp(e,t){if(We!==0&&We!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(jr()&&e.callbackNode!==n)return null;var a=Me;return a=xi(e,e===Ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(np(e,a,t),xp(e,He()),e.callbackNode!=null&&e.callbackNode===n?gp.bind(null,e):null)}function bp(e,t){if(jr())return null;np(e,t,!0)}function ay(){xy(function(){(Le&6)!==0?Ze(Jd,ny):pp()})}function lu(){if(xa===0){var e=qa;e===0&&(e=hi,hi<<=1,(hi&261888)===0&&(hi=256)),xa=e}return xa}function yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ni(e)}function ly(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=yp((l[At]||null).action),f=a.submitter;f&&(t=(t=f[At]||null)?yp(t.formAction):f.getAttribute("formAction"),t!==null&&(i=t,f=null));var m=new _i("action","action",null,a,l);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(xa!==0){var y=new FormData(l,f);fc(n,{pending:!0,data:y,method:l.method,action:i},null,y)}}else typeof i=="function"&&(m.preventDefault(),y=new FormData(l,f),fc(n,{pending:!0,data:y,method:l.method,action:i},i,y))},currentTarget:l}]})}}for(var su=0;su<zo.length;su++){var iu=zo[su],sy=iu.toLowerCase(),iy=iu[0].toUpperCase()+iu.slice(1);cn(sy,"on"+iy)}cn(Xf,"onAnimationEnd"),cn(Kf,"onAnimationIteration"),cn(Zf,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(p1,"onTransitionRun"),cn(x1,"onTransitionStart"),cn(g1,"onTransitionCancel"),cn(Jf,"onTransitionEnd"),dl("onMouseEnter",["mouseout","mouseover"]),dl("onMouseLeave",["mouseout","mouseover"]),dl("onPointerEnter",["pointerout","pointerover"]),dl("onPointerLeave",["pointerout","pointerover"]),za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),za("onBeforeInput",["compositionend","keypress","textInput","paste"]),za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),ry=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function vp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var f=a.length-1;0<=f;f--){var m=a[f],y=m.instance,C=m.currentTarget;if(m=m.listener,y!==i&&l.isPropagationStopped())break e;i=m,l.currentTarget=C;try{i(l)}catch(R){Ai(R)}l.currentTarget=null,i=y}else for(f=0;f<a.length;f++){if(m=a[f],y=m.instance,C=m.currentTarget,m=m.listener,y!==i&&l.isPropagationStopped())break e;i=m,l.currentTarget=C;try{i(l)}catch(R){Ai(R)}l.currentTarget=null,i=y}}}}function ze(e,t){var n=t[lf];n===void 0&&(n=t[lf]=new Set);var a=e+"__bubble";n.has(a)||(Np(t,e,2,!1),n.add(a))}function ru(e,t,n){var a=0;t&&(a|=4),Np(n,e,a,t)}var Cr="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[Cr]){e[Cr]=!0,of.forEach(function(n){n!=="selectionchange"&&(ry.has(n)||ru(n,!1,e),ru(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cr]||(t[Cr]=!0,ru("selectionchange",!1,t))}}function Np(e,t,n,a){switch(ux(t)){case 2:var l=Wy;break;case 8:l=ev;break;default:l=Au}n=l.bind(null,t,n,e),l=void 0,!xo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function cu(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var f=a.tag;if(f===3||f===4){var m=a.stateNode.containerInfo;if(m===l)break;if(f===4)for(f=a.return;f!==null;){var y=f.tag;if((y===3||y===4)&&f.stateNode.containerInfo===l)return;f=f.return}for(;m!==null;){if(f=Ea(m),f===null)return;if(y=f.tag,y===5||y===6||y===26||y===27){a=i=f;continue e}m=m.parentNode}}a=a.return}Nf(function(){var C=i,R=mo(n),H=[];e:{var j=If.get(e);if(j!==void 0){var O=_i,ne=e;switch(e){case"keypress":if(Si(n)===0)break e;case"keydown":case"keyup":O=X0;break;case"focusin":ne="focus",O=vo;break;case"focusout":ne="blur",O=vo;break;case"beforeblur":case"afterblur":O=vo;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=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=O0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=P0;break;case Xf:case Kf:case Zf:O=B0;break;case Jf:O=$0;break;case"scroll":case"scrollend":O=k0;break;case"wheel":O=e1;break;case"copy":case"cut":case"paste":O=L0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Cf;break;case"submit":O=J0;break;case"toggle":case"beforetoggle":O=n1}var pe=(t&4)!==0,_e=!pe&&(e==="scroll"||e==="scrollend"),_=pe?j!==null?j+"Capture":null:j;pe=[];for(var S=C,k;S!==null;){var q=S;if(k=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||k===null||_===null||(q=ds(S,_),q!=null&&pe.push(Qs(S,q,k))),_e)break;S=S.return}0<pe.length&&(j=new O(j,ne,null,n,R),H.push({event:j,listeners:pe}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",j=e==="mouseout"||e==="pointerout",O&&n!==ho&&(ne=n.relatedTarget||n.fromElement)&&(Ea(ne)||ne[ol]))break e;(j||O)&&(ne=R.window===R?R:(O=R.ownerDocument)?O.defaultView||O.parentWindow:window,j?(O=n.relatedTarget||n.toElement,j=C,O=O?Ea(O):null,O!==null&&(_e=h(O),pe=O.tag,O!==_e||pe!==5&&pe!==27&&pe!==6)&&(O=null)):(j=null,O=C),j!==O&&(pe=jf,q="onMouseLeave",_="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Cf,q="onPointerLeave",_="onPointerEnter",S="pointer"),_e=j==null?ne:us(j),k=O==null?ne:us(O),ne=new pe(q,S+"leave",j,n,R),ne.target=_e,ne.relatedTarget=k,q=null,Ea(R)===C&&(pe=new pe(_,S+"enter",O,n,R),pe.target=k,pe.relatedTarget=_e,q=pe),_e=q,pe=j&&O?Z(j,O,oy):null,j!==null&&wp(H,ne,j,pe,!1),O!==null&&_e!==null&&wp(H,_e,O,pe,!0)))}e:{if(j=C?us(C):window,O=j.nodeName&&j.nodeName.toLowerCase(),O==="select"||O==="input"&&j.type==="file")var ce=Df;else if(Mf(j))if(Rf)ce=f1;else{ce=u1;var Oe=c1}else O=j.nodeName,!O||O.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?C&&fo(C.elementType)&&(ce=Df):ce=d1;if(ce&&(ce=ce(e,C))){Of(H,ce,n,R);break e}Oe&&Oe(e,j,C)}switch(Oe=C?us(C):window,e){case"focusin":(Mf(Oe)||Oe.contentEditable==="true")&&(gl=Oe,To=C,ys=null);break;case"focusout":ys=To=gl=null;break;case"mousedown":Ao=!0;break;case"contextmenu":case"mouseup":case"dragend":Ao=!1,Yf(H,n,R);break;case"selectionchange":if(m1)break;case"keydown":case"keyup":Yf(H,n,R)}var be;if(wo)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 xl?zf(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(Tf&&n.locale!=="ko"&&(xl||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&xl&&(be=wf()):(Fn=R,go="value"in Fn?Fn.value:Fn.textContent,xl=!0)),Oe=Tr(C,Ne),0<Oe.length&&(Ne=new _f(Ne,e,null,n,R),H.push({event:Ne,listeners:Oe}),be?Ne.data=be:(be=kf(n),be!==null&&(Ne.data=be)))),(be=l1?s1(e,n):i1(e,n))&&(Ne=Tr(C,"onBeforeInput"),0<Ne.length&&(Oe=new _f("onBeforeInput","beforeinput",null,n,R),H.push({event:Oe,listeners:Ne}),Oe.data=be)),ly(H,e,C,n,R)}vp(H,t)})}function Qs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Tr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=ds(e,n),l!=null&&a.unshift(Qs(e,l,i)),l=ds(e,t),l!=null&&a.push(Qs(e,l,i))),e.tag===3)return a;e=e.return}return[]}function oy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function wp(e,t,n,a,l){for(var i=t._reactName,f=[];n!==null&&n!==a;){var m=n,y=m.alternate,C=m.stateNode;if(m=m.tag,y!==null&&y===a)break;m!==5&&m!==26&&m!==27||C===null||(y=C,l?(C=ds(n,i),C!=null&&f.unshift(Qs(n,C,y))):l||(C=ds(n,i),C!=null&&f.push(Qs(n,C,y)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var cy=/\r\n?/g,uy=/\u0000|\uFFFD/g;function Sp(e){return(typeof e=="string"?e:""+e).replace(cy,`
|
|
49
|
+
`).replace(uy,"")}function jp(e,t){return t=Sp(t),Sp(e)===t}function Qe(e,t,n,a,l,i){switch(n){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||hl(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&hl(e,""+a);else return;break;case"className":vi(e,"class",a);break;case"tabIndex":vi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":vi(e,n,a);break;case"style":yf(e,a,i);return;case"data":if(t!=="object"){vi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Ni(a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="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 i=="function"&&(n==="formAction"?(t!=="input"&&Qe(e,t,"name",l.name,l,null),Qe(e,t,"formEncType",l.formEncType,l,null),Qe(e,t,"formMethod",l.formMethod,l,null),Qe(e,t,"formTarget",l.formTarget,l,null)):(Qe(e,t,"encType",l.encType,l,null),Qe(e,t,"method",l.method,l,null),Qe(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Ni(a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=xn);return;case"onScroll":a!=null&&ze("scroll",e);return;case"onScrollEnd":a!=null&&ze("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(c(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=Ni(a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":ze("beforetoggle",e),ze("toggle",e),yi(e,"popover",a);break;case"xlinkActuate":Mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Mn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Mn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Mn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Mn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":yi(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=E0.get(n)||n,yi(e,n,a);else return}Ue=!0}function uu(e,t,n,a,l,i){switch(n){case"style":yf(e,a,i);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(c(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof a=="string")hl(e,a);else if(typeof a=="number"||typeof a=="bigint")hl(e,""+a);else return;break;case"onScroll":a!=null&&ze("scroll",e);return;case"onScrollEnd":a!=null&&ze("scrollend",e);return;case"onClick":a!=null&&(e.onclick=xn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!cf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),i=n.slice(2,l?n.length-7:void 0),t=e[At]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(i,t,l),typeof a=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(i,a,l);break e}Ue=!0,n in e?e[n]=a:a===!0?e.setAttribute(n,""):yi(e,n,a)}return}Ue=!0}function Nt(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 a=!1,l=!1,i;for(i in n)if(n.hasOwnProperty(i)){var f=n[i];if(f!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Qe(e,t,i,f,n,null)}}l&&Qe(e,t,"srcSet",n.srcSet,n,null),a&&Qe(e,t,"src",n.src,n,null);return;case"input":ze("invalid",e);var m=i=f=l=null,y=null,C=null;for(a in n)if(n.hasOwnProperty(a)){var R=n[a];if(R!=null)switch(a){case"name":l=R;break;case"type":f=R;break;case"checked":y=R;break;case"defaultChecked":C=R;break;case"value":i=R;break;case"defaultValue":m=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(c(137,t));break;default:Qe(e,t,a,R,n,null)}}pf(e,i,m,y,C,f,l,!1);return;case"select":ze("invalid",e),a=f=i=null;for(l in n)if(n.hasOwnProperty(l)&&(m=n[l],m!=null))switch(l){case"value":i=m;break;case"defaultValue":f=m;break;case"multiple":a=m;default:Qe(e,t,l,m,n,null)}t=i,n=f,e.multiple=!!a,t!=null?fl(e,!!a,t,!1):n!=null&&fl(e,!!a,n,!0);return;case"textarea":ze("invalid",e),i=l=a=null;for(f in n)if(n.hasOwnProperty(f)&&(m=n[f],m!=null))switch(f){case"value":a=m;break;case"defaultValue":l=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:Qe(e,t,f,m,n,null)}gf(e,a,l,i);return;case"option":for(y in n)if(n.hasOwnProperty(y)&&(a=n[y],a!=null))switch(y){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Qe(e,t,y,a,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(a=0;a<Ys.length;a++)ze(Ys[a],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(C in n)if(n.hasOwnProperty(C)&&(a=n[C],a!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Qe(e,t,C,a,n,null)}return;default:if(fo(t)){for(R in n)n.hasOwnProperty(R)&&(a=n[R],a!==void 0&&uu(e,t,R,a,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(a=n[m],a!=null&&Qe(e,t,m,a,n,null))}var dy={};function fy(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,i=null,f=null,m=null,y=null,C=null,R=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:a.hasOwnProperty(O)||Qe(e,t,O,null,a,H)}}for(var j in a){var O=a[j];if(H=n[j],a.hasOwnProperty(j)&&(O!=null||H!=null))switch(j){case"type":O!==H&&(Ue=!0),i=O;break;case"name":O!==H&&(Ue=!0),l=O;break;case"checked":O!==H&&(Ue=!0),C=O;break;case"defaultChecked":O!==H&&(Ue=!0),R=O;break;case"value":O!==H&&(Ue=!0),f=O;break;case"defaultValue":O!==H&&(Ue=!0),m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:O!==H&&Qe(e,t,j,O,a,H)}}co(e,f,m,y,C,R,i,l);return;case"select":O=f=m=j=null;for(i in n)if(y=n[i],n.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":O=y;default:a.hasOwnProperty(i)||Qe(e,t,i,null,a,y)}for(l in a)if(i=a[l],y=n[l],a.hasOwnProperty(l)&&(i!=null||y!=null))switch(l){case"value":i!==y&&(Ue=!0),j=i;break;case"defaultValue":i!==y&&(Ue=!0),m=i;break;case"multiple":i!==y&&(Ue=!0),f=i;default:i!==y&&Qe(e,t,l,i,a,y)}t=m,n=f,a=O,j!=null?fl(e,!!n,j,!1):!!a!=!!n&&(t!=null?fl(e,!!n,t,!0):fl(e,!!n,n?[]:"",!1));return;case"textarea":O=j=null;for(m in n)if(l=n[m],n.hasOwnProperty(m)&&l!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Qe(e,t,m,null,a,l)}for(f in a)if(l=a[f],i=n[f],a.hasOwnProperty(f)&&(l!=null||i!=null))switch(f){case"value":l!==i&&(Ue=!0),j=l;break;case"defaultValue":l!==i&&(Ue=!0),O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(c(91));break;default:l!==i&&Qe(e,t,f,l,a,i)}xf(e,j,O);return;case"option":for(var ne in n)if(j=n[ne],n.hasOwnProperty(ne)&&j!=null&&!a.hasOwnProperty(ne))switch(ne){case"selected":e.selected=!1;break;default:Qe(e,t,ne,null,a,j)}for(y in a)if(j=a[y],O=n[y],a.hasOwnProperty(y)&&j!==O&&(j!=null||O!=null))switch(y){case"selected":j!==O&&(Ue=!0),e.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:Qe(e,t,y,j,a,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 pe in n)j=n[pe],n.hasOwnProperty(pe)&&j!=null&&!a.hasOwnProperty(pe)&&Qe(e,t,pe,null,a,j);for(C in a)if(j=a[C],O=n[C],a.hasOwnProperty(C)&&j!==O&&(j!=null||O!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(c(137,t));break;default:Qe(e,t,C,j,a,O)}return;default:if(fo(t)){for(var _e in n)j=n[_e],n.hasOwnProperty(_e)&&j!==void 0&&!a.hasOwnProperty(_e)&&uu(e,t,_e,void 0,a,j);for(R in a)j=a[R],O=n[R],!a.hasOwnProperty(R)||j===O||j===void 0&&O===void 0||uu(e,t,R,j,a,O);return}}for(var _ in n)j=n[_],n.hasOwnProperty(_)&&j!=null&&!a.hasOwnProperty(_)&&Qe(e,t,_,null,a,j);for(H in a)j=a[H],O=n[H],!a.hasOwnProperty(H)||j===O||j==null&&O==null||Qe(e,t,H,j,a,O)}function _p(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],i=l.transferSize,f=l.initiatorType,m=l.duration;if(i&&m&&_p(f)){for(f=0,m=l.responseEnd,a+=1;a<n.length;a++){var y=n[a],C=y.startTime;if(C>m)break;var R=y.transferSize,H=y.initiatorType;R&&_p(H)&&(y=y.responseEnd,f+=R*(y<m?1:(m-C)/(y-C)))}if(--a,t+=8*(i+f)/(l.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 du=null,fu=null;function Xs(e){return e.nodeType===9?e:e.ownerDocument}function Cp(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 Tp(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 Ap(e,t,n,a){return n=Xs(n).createElement(e),n[xt]=a,n[At]=t,Nt(n,e,t),ft(n),n}function hu(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 mu=null;function my(){var e=window.event;return e&&e.type==="popstate"?e===mu?!1:(mu=e,!0):(mu=null,!1)}var pu=typeof setTimeout=="function"?setTimeout:void 0,py=typeof clearTimeout=="function"?clearTimeout:void 0,Ep=typeof Promise=="function"?Promise:void 0,zp=typeof requestAnimationFrame=="function"?requestAnimationFrame:pu,xy=typeof queueMicrotask=="function"?queueMicrotask:typeof Ep<"u"?function(e){return Ep.resolve(null).then(e).catch(gy)}:pu;function gy(e){setTimeout(function(){throw e})}function ga(e){return e==="head"}function kp(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),Pl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Su(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Su(n);for(var i=n.firstChild;i;){var f=i.nextSibling,m=i.nodeName;i[cs]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=f}}else n==="body"&&Su(e.ownerDocument.body);n=l}while(n);Pl(t)}function Mp(e,t){var n=e;e=0;do{var a=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||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Op(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 a=1;else for(var l=a=0;l<t.length;l++){var i=t[l];0<i.width&&0<i.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function Dp(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 by(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 xu(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return by(t,n,e)}function yy(e){return e.documentElement.clientHeight}function vy(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Ny(e,t,n,a,l,i,f,m,y){var C=t.nodeType===9?t:t.ownerDocument;try{var R=C.startViewTransition({update:function(){var j=C.defaultView,O=j.navigation&&j.navigation.transition,ne=C.fonts.status;a();var pe=[];if(ne==="loaded"&&(yy(C),C.fonts.status==="loading"&&pe.push(C.fonts.ready)),ne=pe.length,e!==null)for(var _e=e.suspenseyImages,_=0,S=0;S<_e.length;S++){var k=_e[S];if(!k.complete){var q=k.getBoundingClientRect();if(0<q.bottom&&0<q.right&&q.top<j.innerHeight&&q.left<j.innerWidth){if(_+=tx(k),_>zr){pe.length=ne;break}k=new Promise(vy.bind(k)),pe.push(k)}}}if(0<pe.length)return j=Promise.race([Promise.all(pe),new Promise(function(ce){return setTimeout(ce,500)})]).then(l,l),(O?Promise.allSettled([O.finished,j]):j).then(i,i);if(l(),O)return O.finished.then(i,i);i()},types:n});C.__reactViewTransition=R;var H=[];return R.ready.then(function(){for(var j=C.documentElement.getAnimations({subtree:!0}),O=0;O<j.length;O++){var ne=j[O],pe=ne.effect,_e=pe.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){H.push(ne),ne=pe.getKeyframes();for(var _=_e=void 0,S=!0,k=0;k<ne.length;k++){var q=ne[k],ce=q.width;if(_e===void 0)_e=ce;else if(_e!==ce){S=!1;break}if(ce=q.height,_===void 0)_=ce;else if(_!==ce){S=!1;break}delete q.width,delete q.height,q.transform==="none"&&delete q.transform}S&&_e!==void 0&&_!==void 0&&(pe.setKeyframes(ne),S=getComputedStyle(pe.target,pe.pseudoElement),S.width!==_e||S.height!==_)&&(S=ne[0],S.width=_e,S.height=_,S=ne[ne.length-1],S.width=_e,S.height=_,pe.setKeyframes(ne))}}f()},function(j){C.__reactViewTransition===R&&(C.__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{a(),l(),f()}}),R.finished.finally(function(){for(var j=0;j<H.length;j++)H[j].cancel();C.__reactViewTransition===R&&(C.__reactViewTransition=null),m()}),R}catch{return a(),l(),f(),null}}function Pa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Pa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:V({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),a=[],l=0;l<n.length;l++){var i=n[l].effect;i!==null&&i.target===e&&i.pseudoElement===t&&a.push(n[l])}return a},Pa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rp(e){return{name:e,group:new Pa("group",e),imagePair:new Pa("image-pair",e),old:new Pa("old",e),new:new Pa("new",e)}}function Qt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Qt.prototype.addEventListener=function(e,t,n){var a=null,l=null;if(!(n!=null&&typeof n!="boolean"&&(a=n.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(Up(i,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)}),a!==null&&(l=f.removeEventListener.bind(f,e,t,n),a.addEventListener("abort",l,{once:!0}),l=a.removeEventListener.bind(a,"abort",l)),a=Ql(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:m,cleanup:l}),g(this._fragmentFiber.child,!1,wy,e,m,a)}this._eventListeners=i}};function wy(e,t,n,a){return U(e).addEventListener(t,n,a),!1}Qt.prototype.removeEventListener=function(e,t,n){var a=this._eventListeners;if(a!==null&&(t=Up(a,e,t,n),t!==-1)){var l=a[t];n=l.attachedListener;var i=l.cleanup;l=Ql(l.optionsOrUseCapture),g(this._fragmentFiber.child,!1,Sy,e,n,l),a.splice(t,1),i!==null&&i()}};function Sy(e,t,n,a){return U(e).removeEventListener(t,n,a),!1}function Ql(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Up(e,t,n,a){if(e.length===0)return-1;a=Bp(a);for(var l=0;l<e.length;l++){var i=e[l];if(i.type===t&&i.listener===n&&Bp(i.optionsOrUseCapture)===a)return l}return-1}Qt.prototype.dispatchEvent=function(e){var t=T(this._fragmentFiber);if(t===null)return!0;t=U(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var l=0;l<n.length;l++){var i=n[l];a.addEventListener(i.type,i.attachedListener,Ql(i.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),n)for(l=0;l<n.length;l++)i=n[l],a.removeEventListener(i.type,i.attachedListener,Ql(i.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},Qt.prototype.focus=function(e){g(this._fragmentFiber.child,!0,Lp,e,void 0,void 0)};function Lp(e,t){return e.tag===6?!1:(e=U(e),Ry(e,t))}Qt.prototype.focusLast=function(e){var t=[];g(this._fragmentFiber.child,!0,gu,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Lp(t[n],e);n--);};function gu(e,t){return t.push(e),!1}Qt.prototype.blur=function(){var e=T(this._fragmentFiber);e!==null&&(e=U(e),e=Xs(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,jy,e,void 0,void 0))};function jy(e,t){return e.tag===6?!1:(e=U(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Qt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,_y,e,void 0,void 0)};function _y(e,t){return e.tag===6||(e=U(e),t.observe(e)),!1}Qt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),g(this._fragmentFiber.child,!1,Cy,e,void 0,void 0);for(var n=t=0;n<mn.length;n++){var a=mn[n];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):mn[t++]=a}mn.length=t}};function Cy(e,t){return e.tag===6||(e=U(e),t.unobserve(e)),!1}var mn=[],bu=!1;function Ty(e,t,n){mn.push({fragmentInstance:e,observer:t,instance:n}),bu||(bu=!0,By(function(){bu=!1;var a=mn;mn=[];for(var l=0;l<a.length;l++){var i=a[l];i.observer.unobserve(i.instance)}}))}Qt.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,Ay,e,void 0,void 0),e};function Ay(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=U(e),t.push.apply(t,e.getClientRects());return!1}Qt.prototype.getRootNode=function(e){var t=T(this._fragmentFiber);return t===null?this:U(t).getRootNode(e)},Qt.prototype.compareDocumentPosition=function(e){var t=T(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];g(this._fragmentFiber.child,!1,gu,n,void 0,void 0);var a=U(t);if(n.length===0){if(n=a,L(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 l=a=n.compareDocumentPosition(e);return n===e?l=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=K(t)[1],n===null?l=Node.DOCUMENT_POSITION_PRECEDING:(e=U(n).compareDocumentPosition(e),l=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),l|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=U(n[0]),l=U(n[n.length-1]);var i=L(this._fragmentFiber)?t.parentElement:a;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY;var f=t.compareDocumentPosition(e),m=l.compareDocumentPosition(e),y=f&Node.DOCUMENT_POSITION_CONTAINED_BY||m&Node.DOCUMENT_POSITION_CONTAINED_BY;return m=a&&i&&f&Node.DOCUMENT_POSITION_FOLLOWING&&m&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||i&&l===e||y||m?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!i&&l===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:f,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Ey(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Ey(e,t,n,a,l){var i=Ea(l);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){n=!0;break e}i=i.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=l.ownerDocument,l===i||l===i.documentElement||l===i.body;e:{for(i=t,t=T(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===n)&&(t=Z(n,i,xe),t===null?t=!1:(g(t,!0,$,i,n),i=G,G=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===a)&&(t=Z(a,i,xe),t===null?t=!1:(g(t,!0,F,i,a),i=G,Q=G=null,t=i!==null)),t):!1}function qp(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)}Qt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(c(566));var t=[];g(this._fragmentFiber.child,!1,gu,t,void 0,void 0);var n=e!==!1;if(t.length===0){var a=K(this._fragmentFiber);if(a=n?a[1]||a[0]||T(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=U(a),qp(e,n);return}if(a=U(a),a.nodeType!==9){if(a.nodeType===11){n="host"in a?a.host:null,n!==null&&n.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=n?t.length-1:0;a!==(n?-1:t.length);){var l=t[a];l.tag===6?(l=U(l),qp(l,n)):U(l).scrollIntoView(e),a+=n?-1:1}};function zy(e,t){return e=U(e),Hp(e,t),!1}function Hp(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Gp(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];e.addEventListener(l.type,l.attachedListener,Ql(l.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var f=0,m=0;m<mn.length;m++){var y=mn[m];(y.fragmentInstance!==t||y.observer!==i||y.instance!==e)&&(mn[f++]=y)}mn.length=f,i.observe(e)}),Hp(e,t))}function ky(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];e.removeEventListener(l.type,l.attachedListener,Ql(l.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin=="string"?Ty(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function yu(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":yu(n),bi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function My(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[cs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=en(e.nextSibling),e===null)break}return null}function Oy(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=en(e.nextSibling),e===null))return null;return e}function Vp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=en(e.nextSibling),e===null))return null;return e}function vu(e){return e.data==="$?"||e.data==="$~"}function Nu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Dy(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function en(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 wu=null;function Yp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return en(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Qp(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 Ry(e,t){function n(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return a}function By(e){zp(function(){zp(function(t){return e(t)})})}function Xp(e,t,n){switch(t=Xs(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 Kp(e,t,n){for(var a in n){var l=n[a];n.hasOwnProperty(a)&&l!=null&&Qe(e,t,a,null,dy,l)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===xn&&(e.onclick=null),bi(e)}function Su(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bi(e)}var tn=new Map,Zp=new Set;function Ks(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 Xn=oe.d;oe.d={f:Uy,r:Ly,D:qy,C:Hy,L:Gy,m:Vy,X:Qy,S:Yy,M:Xy};function Uy(){var e=Xn.f(),t=Nr();return e||t}function Ly(e){var t=cl(e);t!==null&&t.tag===5&&t.type==="form"?Ih(t):Xn.r(e)}var Xl=typeof document>"u"?null:document;function Jp(e,t,n){var a=Xl;if(a&&typeof t=="string"&&t){var l=Zt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Zp.has(l)||(Zp.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Nt(t,"link",e),ft(t),a.head.appendChild(t)))}}function qy(e){Xn.D(e),Jp("dns-prefetch",e,null)}function Hy(e,t){Xn.C(e,t),Jp("preconnect",e,t)}function Gy(e,t,n){Xn.L(e,t,n);var a=Xl;if(a&&e&&t){var l='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Zt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Zt(n.imageSizes)+'"]')):l+='[href="'+Zt(e)+'"]';var i=l;switch(t){case"style":i=Kl(e);break;case"script":i=Zl(e)}if(!(tn.has(i)||(e=V({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),tn.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Zs(i))||t==="script"&&a.querySelector(Js(i))))){var f=a.createElement("link");Nt(f,"link",e),t==="style"&&(f[gi]=!0,f.onload=f.onerror=function(){rf(f)}),ft(f),a.head.appendChild(f)}}}function Vy(e,t){Xn.m(e,t);var n=Xl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Zt(a)+'"][href="'+Zt(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Zl(e)}if(!tn.has(i)&&(e=V({rel:"modulepreload",href:e},t),tn.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Js(i)))return}a=n.createElement("link"),Nt(a,"link",e),ft(a),n.head.appendChild(a)}}}function Yy(e,t,n){Xn.S(e,t,n);var a=Xl;if(a&&e){var l=ul(a).hoistableStyles,i=Kl(e);t=t||"default";var f=l.get(i);if(!f){var m={loading:0,preload:null};if(f=a.querySelector(Zs(i)))m.loading=5;else{e=V({rel:"stylesheet",href:e,"data-precedence":t},n),(n=tn.get(i))&&ju(e,n);var y=f=a.createElement("link");ft(y),Nt(y,"link",e),y._p=new Promise(function(C,R){y.onload=C,y.onerror=R}),y.addEventListener("load",function(){m.loading|=1}),y.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Ar(f,t,a)}f={type:"stylesheet",instance:f,count:1,state:m},l.set(i,f)}}}function Qy(e,t){Xn.X(e,t);var n=Xl;if(n&&e){var a=ul(n).hoistableScripts,l=Zl(e),i=a.get(l);i||(i=n.querySelector(Js(l)),i||(e=V({src:e,async:!0},t),(t=tn.get(l))&&_u(e,t),i=n.createElement("script"),ft(i),Nt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Xy(e,t){Xn.M(e,t);var n=Xl;if(n&&e){var a=ul(n).hoistableScripts,l=Zl(e),i=a.get(l);i||(i=n.querySelector(Js(l)),i||(e=V({src:e,async:!0,type:"module"},t),(t=tn.get(l))&&_u(e,t),i=n.createElement("script"),ft(i),Nt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Ip(e,t,n,a){var l=(l=rn.current)?Ks(l):null;if(!l)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Kl(n.href),t=ul(l).hoistableStyles,a=t.get(n),a||(a={type:"style",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Kl(n.href);var i=ul(l).hoistableStyles,f=i.get(e);if(f||(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=l.querySelector(Zs(e)))?i._p||(f.instance=i,f.state.loading=5):(i=tn.get(e),i||(i={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},tn.set(e,i)),Ky(l,e,i,f.state))),t&&a===null)throw Error(c(528,""));return f}if(t&&a!==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=Zl(n),t=ul(l).hoistableScripts,a=t.get(n),a||(a={type:"script",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Kl(e){return'href="'+Zt(e)+'"'}function Zs(e){return'link[rel="stylesheet"]['+e+"]"}function Pp(e){return V({},e,{"data-precedence":e.precedence,precedence:null})}function Ky(e,t,n,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[gi]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[gi]=!0,t.onload=t.onerror=rf.bind(null,t),Nt(t,"link",n),ft(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Zl(e){return'[src="'+Zt(e)+'"]'}function Js(e){return"script[async]"+e}function Fp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Zt(n.href)+'"]');if(a)return t.instance=a,ft(a),a;var l=V({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ft(a),Nt(a,"style",l),Ar(a,n.precedence,e),t.instance=a;case"stylesheet":l=Kl(n.href);var i=e.querySelector(Zs(l));if(i)return t.state.loading|=4,t.instance=i,ft(i),i;a=Pp(n),(l=tn.get(l))&&ju(a,l),i=(e.ownerDocument||e).createElement("link"),ft(i);var f=i;return f._p=new Promise(function(m,y){f.onload=m,f.onerror=y}),Nt(i,"link",a),t.state.loading|=4,Ar(i,n.precedence,e),t.instance=i;case"script":return i=Zl(n.src),(l=e.querySelector(Js(i)))?(t.instance=l,ft(l),l):(a=n,(l=tn.get(i))&&(a=V({},n),_u(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ft(l),Nt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ar(a,n.precedence,e));return t.instance}function Ar(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,f=0;f<a.length;f++){var m=a[f];if(m.dataset.precedence===t)i=m;else if(i!==l)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function _u(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Er=null;function $p(e,t,n){if(Er===null){var a=new Map,l=Er=new Map;l.set(n,a)}else l=Er,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var i=n[l];if(!(i[cs]||i[xt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var f=i.getAttribute(t)||"";f=e+f;var m=a.get(f);m?m.push(i):a.set(f,[i])}}return a}function Cu(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Zy(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 Wp(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function ex(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tx(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function nx(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=tx(t),e.suspenseyImages.push(t)),e=Py.bind(e),t.decode().then(e,e))}function Jy(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Kl(a.href),i=t.querySelector(Zs(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Is.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ft(i);return}i=t.ownerDocument||t,a=Pp(a),(l=tn.get(l))&&ju(a,l),i=i.createElement("link"),ft(i);var f=i;f._p=new Promise(function(m,y){f.onload=m,f.onerror=y}),Nt(i,"link",a),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Is.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var zr=0;function Iy(e,t){return e.stylesheets&&e.count===0&&Mr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Mr(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&zr===0&&(zr=62500*hy());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Mr(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>zr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function ax(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Mr(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Is(){this.count--,ax(this)}function Py(){this.imgCount--,ax(this)}var kr=null;function Mr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kr=new Map,t.forEach(Fy,e),kr=null,Is.call(e))}function Fy(e,t){if(!(t.state.loading&4)){var n=kr.get(e);if(n)var a=n.get(null);else{n=new Map,kr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var f=l[i];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),a=f)}a&&n.set(null,a)}l=t.instance,f=l.getAttribute("data-precedence"),i=n.get(f)||a,i===a&&n.set(null,l),n.set(f,l),this.count++,a=Is.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),i?i.parentNode.insertBefore(l,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Jl={$$typeof:ge,Provider:null,Consumer:null,_currentValue:tt,_currentValue2:tt,_threadCount:0};function $y(e,t,n,a,l,i,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=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.transitionTypes=null,this.incompleteTransitions=new Map}function lx(e,t,n,a,l,i,f,m,y,C,R,H){return e=new $y(e,t,n,f,y,C,R,H,m),t=1,i===!0&&(t|=24),i=Et(3,null,null,t),e.current=i,i.stateNode=e,t=Go(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},Xo(i),e}function sx(e){return e?(e=vl,e):vl}function ix(e,t,n,a,l,i){l=sx(l),a.context===null?a.context=l:a.pendingContext=l,a=sa(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=ia(e,a,t),n!==null&&(Ot(n,e,t),Cs(n,e,t))}function rx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Tu(e,t){rx(e,t),(e=e.alternate)&&rx(e,t)}function ox(e){if(e.tag===13||e.tag===31){var t=Oa(e,67108864);t!==null&&Ot(t,e,67108864),Tu(e,67108864)}}function cx(e){if(e.tag===13||e.tag===31){var t=Yt();t=io(t);var n=Oa(e,t);n!==null&&Ot(n,e,t),Tu(e,t)}}var Il=!0;function Wy(e,t,n,a){var l=se.T;se.T=null;var i=oe.p;try{oe.p=2,Au(e,t,n,a)}finally{oe.p=i,se.T=l}}function ev(e,t,n,a){var l=se.T;se.T=null;var i=oe.p;try{oe.p=8,Au(e,t,n,a)}finally{oe.p=i,se.T=l}}function Au(e,t,n,a){if(Il){var l=Eu(a);if(l===null)cu(e,t,a,Or,n),dx(e,a);else if(nv(l,e,t,n,a))a.stopPropagation();else if(dx(e,a),t&4&&-1<tv.indexOf(e)){for(;l!==null;){var i=cl(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var f=Aa(i.pendingLanes);if(f!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;f;){var y=1<<31-Bt(f);m.entanglements[1]|=y,f&=~y}Cn(i),(Le&6)===0&&(br=He()+500,Vs(0))}}break;case 31:case 13:m=Oa(i,2),m!==null&&Ot(m,i,2),Nr(),Tu(i,2)}if(i=Eu(a),i===null&&cu(e,t,a,Or,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else cu(e,t,a,null,n)}}function Eu(e){return e=mo(e),zu(e)}var Or=null;function zu(e){if(Or=null,e=Ea(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=x(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 Or=e,null}function ux(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(h0()){case Jd:return 2;case Id:return 8;case fi:case m0:return 32;case Pd:return 268435456;default:return 32}default:return 32}}var ku=!1,ba=null,ya=null,va=null,Ps=new Map,Fs=new Map,Na=[],tv="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 dx(e,t){switch(e){case"focusin":case"focusout":ba=null;break;case"dragenter":case"dragleave":ya=null;break;case"mouseover":case"mouseout":va=null;break;case"pointerover":case"pointerout":Ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(t.pointerId)}}function $s(e,t,n,a,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[l]},t!==null&&(t=cl(t),t!==null&&ox(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function nv(e,t,n,a,l){switch(t){case"focusin":return ba=$s(ba,e,t,n,a,l),!0;case"dragenter":return ya=$s(ya,e,t,n,a,l),!0;case"mouseover":return va=$s(va,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return Ps.set(i,$s(Ps.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,Fs.set(i,$s(Fs.get(i)||null,e,t,n,a,l)),!0}return!1}function fx(e){var t=Ea(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,af(e.priority,function(){cx(n)});return}}else if(t===31){if(t=x(n),t!==null){e.blockedOn=t,af(e.priority,function(){cx(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 Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Eu(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);ho=a,n.target.dispatchEvent(a),ho=null}else return t=cl(n),t!==null&&ox(t),e.blockedOn=n,!1;t.shift()}return!0}function hx(e,t,n){Dr(e)&&n.delete(t)}function av(){ku=!1,ba!==null&&Dr(ba)&&(ba=null),ya!==null&&Dr(ya)&&(ya=null),va!==null&&Dr(va)&&(va=null),Ps.forEach(hx),Fs.forEach(hx)}function Rr(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,av)))}var Br=null;function mx(e){Br!==e&&(Br=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Br===e&&(Br=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(zu(a||n)===null)continue;break}var i=cl(n);i!==null&&(e.splice(t,3),t-=3,fc(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Pl(e){function t(y){return Rr(y,e)}ba!==null&&Rr(ba,e),ya!==null&&Rr(ya,e),va!==null&&Rr(va,e),Ps.forEach(t),Fs.forEach(t);for(var n=0;n<Na.length;n++){var a=Na[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Na.length&&(n=Na[0],n.blockedOn===null);)fx(n),n.blockedOn===null&&Na.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],i=n[a+1],f=l[At]||null;if(typeof i=="function")f||mx(n);else if(f){var m=null;if(i&&i.hasAttribute("formAction")){if(l=i,f=i[At]||null)m=f.formAction;else if(zu(l)!==null)continue}else m=f.action;typeof m=="function"?n[a+1]=m:(n.splice(a,3),a-=3),mx(n)}}}function px(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(f){return l=f})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Mu(e){this._internalRoot=e}Ur.prototype.render=Mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,a=Yt();ix(n,a,e,t,null,null)},Ur.prototype.unmount=Mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ix(e.current,2,null,e,null,null),Nr(),t[ol]=null}};function Ur(e){this._internalRoot=e}Ur.prototype.unstable_scheduleHydration=function(e){if(e){var t=nf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Na.length&&t!==0&&t<Na[n].priority;n++);Na.splice(n,0,e),n===0&&fx(e)}};var xx=o.version;if(xx!=="19.3.0")throw Error(c(527,xx,"19.3.0"));oe.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?N(e):null,e=e===null?null:e.stateNode,e};var lv={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:se,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lr.isDisabled&&Lr.supportsFiber)try{is=Lr.inject(lv),Rt=Lr}catch{}}return ei.createRoot=function(e,t){if(!d(e))throw Error(c(299));var n=!1,a="",l=sm,i=im,f=rm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=lx(e,1,!1,null,null,n,a,null,l,i,f,px),e[ol]=t.current,ou(e),new Mu(t)},ei.hydrateRoot=function(e,t,n){if(!d(e))throw Error(c(299));var a=!1,l="",i=sm,f=im,m=rm,y=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=lx(e,1,!0,t,n??null,a,l,y,i,f,m,px),t.context=sx(null),n=t.current,a=Yt(),a=io(a),l=sa(a),l.callback=null,ia(n,l,a),n=a,t.current.lanes=n,os(t,n),Cn(t),e[ol]=t.current,ou(e),new Ur(t)},ei.version="19.3.0",ei}var Cx;function mv(){if(Cx)return Ru.exports;Cx=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Ru.exports=hv(),Ru.exports}var pv=mv();const xv=Bd(pv);class Tx extends Error{constructor(o,u,c){super(u),this.status=o,this.data=c,this.name="ApiError"}}async function ti(s,o={}){const u=s.startsWith("/dashboard/api")?s:`/dashboard/api${s.startsWith("/")?s:`/${s}`}`,c={"Content-Type":"application/json",...o.headers},d=await fetch(u,{...o,headers:c});if(d.status===401)throw window.location.href="/login",new Tx(401,"Session expired, redirecting to login...");const h=await d.json().catch(()=>null);if(!d.ok)throw new Tx(d.status,(h==null?void 0:h.error)||(h==null?void 0:h.message)||`HTTP ${d.status}: Request failed`,h);return h}const ee={get:s=>ti(s,{method:"GET"}),post:(s,o)=>ti(s,{method:"POST",body:o?JSON.stringify(o):void 0}),patch:(s,o)=>ti(s,{method:"PATCH",body:o?JSON.stringify(o):void 0}),put:(s,o)=>ti(s,{method:"PUT",body:o?JSON.stringify(o):void 0}),delete:s=>ti(s,{method:"DELETE"}),getStats:()=>ee.get("/stats"),getSession:()=>ee.get("/bot/session"),startSession:s=>ee.post("/bot/session/start",s),reconnectSession:()=>ee.post("/bot/session/reconnect"),stopSession:()=>ee.post("/bot/session/stop"),unlinkSession:()=>ee.post("/bot/logout"),restartBot:()=>ee.post("/bot/restart"),getSettings:()=>ee.get("/settings"),updateSetting:(s,o)=>ee.patch("/settings",{key:s,value:o}),updatePrefix:s=>ee.patch("/settings",{key:"prefix",value:s}),getCommands:()=>ee.get("/commands"),updateCommand:(s,o)=>ee.patch(`/commands/${encodeURIComponent(s)}`,o),getSchedules:()=>ee.get("/schedules"),createSchedule:s=>ee.post("/schedules",s),deleteSchedule:s=>ee.delete(`/schedules/${encodeURIComponent(s)}`),retrySchedule:s=>ee.post(`/schedules/${encodeURIComponent(s)}/retry`),getGroups:()=>ee.get("/groups"),updateGroup:(s,o)=>ee.patch(`/groups/${encodeURIComponent(s)}`,o),getPersona:()=>ee.get("/ai/persona"),updatePersona:s=>ee.put("/ai/persona",{body:s}),getMemoryFiles:()=>ee.get("/ai/memory"),getMemoryFile:s=>ee.get(`/ai/memory/${encodeURIComponent(s)}`),updateMemoryFile:(s,o)=>ee.put(`/ai/memory/${encodeURIComponent(s)}`,{content:o}),deleteMemoryFile:s=>ee.delete(`/ai/memory/${encodeURIComponent(s)}`),getAiConversations:()=>ee.get("/ai/conversations"),getAiConversation:s=>ee.get(`/ai/conversations/${encodeURIComponent(s)}`),getRecipients:()=>ee.get("/recipients"),fetchAiModels:s=>ee.post("/ai/models",s||{}),changePassword:(s,o)=>ee.post("/security/password",{current:s,next:o}),getFeedbackMeta:()=>ee.get("/feedback/meta"),sendFeedback:s=>ee.post("/feedback",s),getLogs:()=>ee.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 gv=s=>s==null?void 0:s.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 bv(s,o,u=[]){if(o==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:gv(s),size:24,node:o,...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 yv=s=>{let o="",u=!1;for(const c of s){if(c==="-"||c==="_"||c<=" "){u=o.length>0;continue}o.length===0?o+=c.toLowerCase():o+=u?c.toUpperCase():c,u=!1}return o};/**
|
|
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 vv=s=>{const o=yv(s);return o.charAt(0).toUpperCase()+o.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 Sd=(...s)=>s.filter((o,u,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===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 Fa={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 qu(s){return s!=null}function Nv(s,o={}){var T,L;const u=o.attributeNames??{},c=K=>u[K]??K,d=s.size??s.width??Fa.width,h=s.size??s.height??Fa.height,p=((T=s.aliases)==null?void 0:T.filter(K=>typeof K=="string"&&K.trim()!=="").map(K=>`lucide-${K}`))??[],x=[...s.name?[`lucide-${s.name}`]:[],...p],b=((L=o.className)==null?void 0:L.split(" ").filter(Boolean))??[],E=o.includeDefaultClasses===!1?Sd(...b):Sd("lucide",...x,...b),N=o.absoluteStrokeWidth?Number(o.strokeWidth??Fa["stroke-width"])*Number(s.size??s.width??Fa.width)/Number(o.size??o.width??Fa.width):o.strokeWidth??Fa["stroke-width"];return["svg",{...Object.entries(Fa).reduce((K,[B,U])=>(K[c(B)]=U,K),{}),..."color"in o&&o.color&&{[c("stroke")]:o.color},..."size"in o&&qu(o.size)&&{[c("width")]:o.size,[c("height")]:o.size},..."width"in o&&qu(o.width)&&{[c("width")]:o.width},..."height"in o&&qu(o.height)&&{[c("height")]:o.height},[c("stroke-width")]:N,...E&&{[c("class")]:E},[c("viewBox")]:`0 0 ${d} ${h}`,...o.hasA11yProp===!1?{[c("aria-hidden")]:"true"}:{},..."attributes"in o&&o.attributes},s.node.map(K=>{const[B,U,G]=K,Q=o.nonScalingStroke?{[c("vector-effect")]:"non-scaling-stroke",...U}:U;return G?[B,Q,G]:[B,Q]})]}/**
|
|
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 wv(s,o={}){return Nv(s,{...o,attributeNames:{...o.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 Sv=s=>{for(const o in s)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},jv=Y.createContext({}),_v=()=>Y.useContext(jv),Cv=Y.forwardRef(({color:s,size:o,width:u,height:c,strokeWidth:d,absoluteStrokeWidth:h,nonScalingStroke:p,className:x="",children:b,iconNode:E=[],icon:N={node:E,aliases:[],size:24},...g},T)=>{const{size:L=24,strokeWidth:K=2,absoluteStrokeWidth:B=!1,nonScalingStroke:U=!1,color:G="currentColor",className:Q=""}=_v()??{},$=!!b||Sv(g),[F,xe,Z=[]]=wv(N,{color:s??G,width:u??o??L,height:c??o??L,strokeWidth:d??K,absoluteStrokeWidth:h??B,nonScalingStroke:p??U,className:Sd(Q,x),hasA11yProp:$,attributes:g});return Y.createElement(F,{ref:T,...xe},[...Z.map(([V,z])=>Y.createElement(V,z)),...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 he(s,o=[],u=[]){const c=typeof s=="string"?bv(s,o,u):s,d=Y.forwardRef(({className:h,...p},x)=>Y.createElement(Cv,{ref:x,icon:c,className:h,...p}));return c.name&&(d.displayName=vv(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 gg={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"}]]};gg.node;const Tv=he(gg);/**
|
|
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 bg={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};bg.node;const Av=he(bg);/**
|
|
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 yg={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"}]]};yg.node;const Ev=he(yg);/**
|
|
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 vg={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"}]]};vg.node;const Ld=he(vg);/**
|
|
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 Ng={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};Ng.node;const zv=he(Ng);/**
|
|
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 wg={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"}]]};wg.node;const jd=he(wg);/**
|
|
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 Sg={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Sg.node;const $r=he(Sg);/**
|
|
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 jg={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};jg.node;const kv=he(jg);/**
|
|
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 _g={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"]};_g.node;const Wr=he(_g);/**
|
|
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 Cg={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"]};Cg.node;const ci=he(Cg);/**
|
|
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 Tg={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"]};Tg.node;const Mv=he(Tg);/**
|
|
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 Ag={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Ag.node;const Ov=he(Ag);/**
|
|
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 Eg={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"}]]};Eg.node;const Dv=he(Eg);/**
|
|
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 zg={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"}]]};zg.node;const Rv=he(zg);/**
|
|
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 kg={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};kg.node;const Bv=he(kg);/**
|
|
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 Mg={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"}]]};Mg.node;const Hu=he(Mg);/**
|
|
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 Og={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"}]]};Og.node;const $l=he(Og);/**
|
|
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 Dg={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"}]]};Dg.node;const Xr=he(Dg);/**
|
|
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 Rg={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"}]]};Rg.node;const Uv=he(Rg);/**
|
|
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 Bg={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"]};Bg.node;const Lv=he(Bg);/**
|
|
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 Ug={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"}]]};Ug.node;const ri=he(Ug);/**
|
|
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 Lg={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"}]]};Lg.node;const Ax=he(Lg);/**
|
|
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 qg={name:"heart-handshake",size:24,node:[["path",{d:"M19.414 14.414C21 12.828 22 11.5 22 9.5a5.5 5.5 0 0 0-9.591-3.676.6.6 0 0 1-.818.001A5.5 5.5 0 0 0 2 9.5c0 2.3 1.5 4 3 5.5l5.535 5.362a2 2 0 0 0 2.879.052 2.12 2.12 0 0 0-.004-3 2.124 2.124 0 1 0 3-3 2.124 2.124 0 0 0 3.004 0 2 2 0 0 0 0-2.828l-1.881-1.882a2.41 2.41 0 0 0-3.409 0l-1.71 1.71a2 2 0 0 1-2.828 0 2 2 0 0 1 0-2.828l2.823-2.762",key:"17lmqv"}]]};qg.node;const qv=he(qg);/**
|
|
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 Hg={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"}]]};Hg.node;const Hv=he(Hg);/**
|
|
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 Gg={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"}]]};Gg.node;const _d=he(Gg);/**
|
|
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 Vg={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"}]]};Vg.node;const Gv=he(Vg);/**
|
|
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 Yg={name:"lightbulb",size:24,node:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]};Yg.node;const Vv=he(Yg);/**
|
|
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 Qg={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"}]]};Qg.node;const Yv=he(Qg);/**
|
|
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 Xg={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"}]]};Xg.node;const Qv=he(Xg);/**
|
|
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 Kg={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};Kg.node;const Xv=he(Kg);/**
|
|
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 Zg={name:"message-square-heart",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"}],["path",{d:"M7.5 9.5c0 .687.265 1.383.697 1.844l3.009 3.264a1.14 1.14 0 0 0 .407.314 1 1 0 0 0 .783-.004 1.14 1.14 0 0 0 .398-.31l3.008-3.264A2.77 2.77 0 0 0 16.5 9.5 2.5 2.5 0 0 0 12 8a2.5 2.5 0 0 0-4.5 1.5",key:"1faxuh"}]]};Zg.node;const Kv=he(Zg);/**
|
|
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 Jg={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"}]]};Jg.node;const Cd=he(Jg);/**
|
|
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 Ig={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"}]]};Ig.node;const Gu=he(Ig);/**
|
|
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 Pg={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"}]]};Pg.node;const Zv=he(Pg);/**
|
|
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 Fg={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"]};Fg.node;const Jv=he(Fg);/**
|
|
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 $g={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"}]]};$g.node;const Iv=he($g);/**
|
|
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 Wg={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"}]]};Wg.node;const Pv=he(Wg);/**
|
|
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 eb={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};eb.node;const tb=he(eb);/**
|
|
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 nb={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"}]]};nb.node;const Vu=he(nb);/**
|
|
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 ab={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"}]]};ab.node;const oi=he(ab);/**
|
|
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 lb={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"}]]};lb.node;const eo=he(lb);/**
|
|
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 sb={name:"rotate-ccw-clock",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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};sb.node;const Fv=he(sb);/**
|
|
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 ib={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"}]]};ib.node;const qr=he(ib);/**
|
|
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 rb={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"}]]};rb.node;const to=he(rb);/**
|
|
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 ob={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};ob.node;const cb=he(ob);/**
|
|
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 ub={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};ub.node;const Td=he(ub);/**
|
|
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 db={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"}]]};db.node;const $v=he(db);/**
|
|
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 fb={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"}]]};fb.node;const Wv=he(fb);/**
|
|
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 hb={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"}]]};hb.node;const qd=he(hb);/**
|
|
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 mb={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"]};mb.node;const pb=he(mb);/**
|
|
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 xb={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"}]]};xb.node;const Yu=he(xb);/**
|
|
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 gb={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"]};gb.node;const Ad=he(gb);/**
|
|
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 bb={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};bb.node;const Ed=he(bb);/**
|
|
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 yb={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};yb.node;const e2=he(yb);/**
|
|
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 vb={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"}]]};vb.node;const t2=he(vb);/**
|
|
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 Nb={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"}]]};Nb.node;const n2=he(Nb);/**
|
|
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 wb={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};wb.node;const ts=he(wb);/**
|
|
385
|
+
* @license lucide-react v1.46.0 - ISC
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the ISC license.
|
|
388
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
389
|
+
*/const Sb={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"]};Sb.node;const jb=he(Sb);/**
|
|
390
|
+
* @license lucide-react v1.46.0 - ISC
|
|
391
|
+
*
|
|
392
|
+
* This source code is licensed under the ISC license.
|
|
393
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
+
*/const _b={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"]};_b.node;const Kr=he(_b);/**
|
|
395
|
+
* @license lucide-react v1.46.0 - ISC
|
|
396
|
+
*
|
|
397
|
+
* This source code is licensed under the ISC license.
|
|
398
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
399
|
+
*/const Cb={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"}]]};Cb.node;const Qu=he(Cb);/**
|
|
400
|
+
* @license lucide-react v1.46.0 - ISC
|
|
401
|
+
*
|
|
402
|
+
* This source code is licensed under the ISC license.
|
|
403
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
+
*/const Tb={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"}]]};Tb.node;const Xu=he(Tb);/**
|
|
405
|
+
* @license lucide-react v1.46.0 - ISC
|
|
406
|
+
*
|
|
407
|
+
* This source code is licensed under the ISC license.
|
|
408
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
409
|
+
*/const Ab={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"}]]};Ab.node;const Wl=he(Ab);/**
|
|
410
|
+
* @license lucide-react v1.46.0 - ISC
|
|
411
|
+
*
|
|
412
|
+
* This source code is licensed under the ISC license.
|
|
413
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
414
|
+
*/const Eb={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"}]]};Eb.node;const a2=he(Eb);/**
|
|
415
|
+
* @license lucide-react v1.46.0 - ISC
|
|
416
|
+
*
|
|
417
|
+
* This source code is licensed under the ISC license.
|
|
418
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
419
|
+
*/const zb={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};zb.node;const ui=he(zb);/**
|
|
420
|
+
* @license lucide-react v1.46.0 - ISC
|
|
421
|
+
*
|
|
422
|
+
* This source code is licensed under the ISC license.
|
|
423
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
424
|
+
*/const kb={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"}]]};kb.node;const l2=he(kb),Ku={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:"ذاكرة البوت الدائمة: الذاكرة العامة مشتركة بين كل المحادثات، وكل محادثة ليها ملف خاص بيها. البوت بيقرأ سطور المعلومات وأي نص حر بتكتبه.",manageMemory:"إدارة ملفات الذاكرة",memoryGlobalScope:"الذاكرة العامة",memoryGlobalScopeHint:"بتتحقن في كل المحادثات",memoryChatScopeHint:"بتتحقن في المحادثة دي بس",memoryEntriesCount:"{n} معلومة محفوظة",memoryProseHint:"كل اللي في الملف بيوصل للبوت: سطور `-` هي معلومات منفصلة يقدر يضيفها أو ينساها، وأي نص حر مكتوب هنا بيتقري زي ما هو بالظبط.",memoryEditorPlaceholder:"اكتب هنا أي حاجة عايز البوت يفتكرها دايمًا…",aiInspector:"معاينة محادثات الذكاء الاصطناعي",aiInspectorDesc:"نظرة للقراءة فقط على السياق المخزّن لكل محادثة: الردود، الوسائط، واستخدام الأدوات.",openInspector:"فتح المعاينة",noConversations:"مفيش محادثات محفوظة لسه.",convTurns:"{n} جزء",backToList:"رجوع للقائمة",convTruncated:"العرض مختصر لآخر 200 جزء بس.",convMedia:"ملف وسائط",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:"الرقم المرتبط",tabFeedback:"الملاحظات والدعم",feedbackTitle:"أرسل ملاحظاتك إلى المطوّر",feedbackDesc:"مشكلة، اقتراح، أو سؤال — تُسلَّم رسالتك مباشرةً إلى مطوّر ليفيكس. لا يوجد وسيط ولا نظام تذاكر.",feedbackTopicLabel:"موضوع الرسالة",feedbackTopicBug:"هناك خلل",feedbackTopicIdea:"فكرة أو طلب",feedbackTopicQuestion:"سؤال",feedbackTopicPraise:"يعمل بشكل جيد",feedbackTopicOther:"شيء آخر",feedbackMessageLabel:"رسالتك",feedbackMessagePlaceholder:"ماذا حدث، وماذا كنت تتوقع، وماذا كنت تفعل في ذلك الوقت. التفاصيل تساعد — يقرأها شخص حقيقي.",feedbackCharsNeeded:"حرفاً إضافياً على الأقل",feedbackRatingLabel:"كيف يعمل ليفيكس معك؟ (اختياري)",feedbackContactLabel:"كيف نتواصل معك؟ (اختياري)",feedbackContactPlaceholder:"بريد إلكتروني أو معرّف واتساب/تيليجرام — فقط إن أردت رداً",feedbackSendBtn:"إرسال الملاحظات",feedbackSending:"جاري الإرسال...",feedbackSent:"تم الإرسال. شكراً لك!",feedbackSentDesc:"وصلت رسالتك إلى مطوّر ليفيكس. إن تركت وسيلة للتواصل، توقّع رداً.",feedbackSendAnother:"إرسال رسالة أخرى",feedbackWhatIsSent:"ما يُرسَل مع رسالتك",feedbackWhatIsSentDesc:"نص رسالتك، والموضوع، والتقييم ووسيلة التواصل إن أضفتهما، بالإضافة إلى إصدار ليفيكس والمنصة التي يعمل عليها. لا تُرسَل أي رسالة واتساب أو محادثة أو جهة اتصال أو مفتاح، ولا يُرسَل شيء إلا عند الضغط على إرسال.",feedbackRuntimeLabel:"يُرفَق مع الرسالة",feedbackGithubHint:"للأخطاء التي تريد تتبّعها علناً مع السجلات، افتح Issue على GitHub.",feedbackOpenGithub:"فتح Issue على GitHub"},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",memoryDesc:"The bot's durable memory. Global memory is shared by every chat; each chat also has its own file. The bot reads saved entries and any free-form text you write.",manageMemory:"Manage Memory Files",memoryGlobalScope:"Global memory",memoryGlobalScopeHint:"Injected into every chat",memoryChatScopeHint:"Injected into this chat only",memoryEntriesCount:"{n} saved entries",memoryProseHint:"Everything in this file reaches the bot: lines starting with '-' are separate entries it can add or forget, and free-form text is included verbatim.",memoryEditorPlaceholder:"Write anything you want the bot to remember for good…",aiInspector:"AI Conversation Inspector",aiInspectorDesc:"Read-only view of each chat's stored conversation context: replies, media references and tool usage.",openInspector:"Open Inspector",noConversations:"No stored conversations yet.",convTurns:"{n} parts",backToList:"Back to list",convTruncated:"Showing only the latest 200 parts.",convMedia:"media file",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",tabFeedback:"Feedback & Support",feedbackTitle:"Send feedback to the developer",feedbackDesc:"A bug, an idea, or a question — it is delivered straight to the person who builds Levix. No middle layer, no ticket queue.",feedbackTopicLabel:"What is this about?",feedbackTopicBug:"Something is broken",feedbackTopicIdea:"An idea or request",feedbackTopicQuestion:"A question",feedbackTopicPraise:"It works well",feedbackTopicOther:"Something else",feedbackMessageLabel:"Your message",feedbackMessagePlaceholder:"What happened, what you expected, and what you were doing at the time. Detail helps — it is read by a person.",feedbackCharsNeeded:"more characters",feedbackRatingLabel:"How is Levix working out? (optional)",feedbackContactLabel:"How to reach you (optional)",feedbackContactPlaceholder:"Email, or a WhatsApp/Telegram handle — only if you want an answer",feedbackSendBtn:"Send feedback",feedbackSending:"Sending...",feedbackSent:"Sent. Thank you!",feedbackSentDesc:"It reached the developer of Levix. If you left a way to reach you, expect a reply.",feedbackSendAnother:"Send something else",feedbackWhatIsSent:"What goes with your message",feedbackWhatIsSentDesc:"Your text, the topic, and the rating and contact if you added them, plus the Levix version and the platform it runs on. No WhatsApp message, chat, contact or key is ever attached, and nothing is sent until you press Send.",feedbackRuntimeLabel:"Attached to the message",feedbackGithubHint:"For reproducible bugs you want tracked in public with logs, open a GitHub issue.",feedbackOpenGithub:"Open a GitHub issue"}},Mb=Y.createContext(null),s2=({children:s})=>{const[o,u]=Y.useState(()=>{const p=localStorage.getItem("levix_lang");return p==="ar"||p==="en"?p:navigator.language.startsWith("ar")?"ar":"en"}),c=o==="ar"?"rtl":"ltr";Y.useEffect(()=>{localStorage.setItem("levix_lang",o),document.documentElement.lang=o,document.documentElement.dir=c},[o,c]);const d=p=>{u(p)},h=Y.useMemo(()=>(p,x)=>(Ku[o]||Ku.en)[p]??Ku.en[p]??x??String(p),[o]);return r.jsx(Mb.Provider,{value:{language:o,direction:c,setLanguage:d,t:h},children:s})},an=()=>{const s=Y.useContext(Mb);if(!s)throw new Error("useI18n must be used within an I18nProvider");return s},i2=({onToggleMobileMenu:s,title:o,status:u})=>{const{language:c,setLanguage:d,t:h}=an(),[p,x]=si.useState(!1),b=si.useRef(null);si.useEffect(()=>{if(!p)return;const T=K=>{b.current&&!b.current.contains(K.target)&&x(!1)},L=K=>{K.key==="Escape"&&x(!1)};return document.addEventListener("mousedown",T),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",L)}},[p]);const[E,N]=si.useState(()=>{const T=localStorage.getItem("levix_theme");return T?(document.documentElement.setAttribute("data-theme",T),T):document.documentElement.getAttribute("data-theme")||"dark"}),g=()=>{const T=E==="dark"?"light":"dark";N(T),document.documentElement.setAttribute("data-theme",T),localStorage.setItem("levix_theme",T)};return r.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:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("button",{type:"button",onClick:s,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:r.jsx(Xv,{size:20})}),r.jsx("h1",{className:"text-lg md:text-xl font-bold tracking-tight text-text-main truncate",title:o,children:o})]}),r.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[r.jsxs("div",{className:"relative",ref:b,children:[r.jsx("button",{type:"button",onClick:()=>x(T=>!T),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:r.jsx(ri,{size:18,className:"text-brand-cyan"})}),p&&r.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:[r.jsx("div",{className:"px-2.5 py-1.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider",children:h("chooseLanguage","Choose Language")}),r.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{d("ar"),x(!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:[r.jsx("span",{children:"العربية"}),c==="ar"&&r.jsx($r,{size:16,className:"text-brand-cyan"})]}),r.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{d("en"),x(!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:[r.jsx("span",{children:"English"}),c==="en"&&r.jsx($r,{size:16,className:"text-brand-cyan"})]})]})]}),r.jsx("button",{type:"button",onClick:g,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"?r.jsx(t2,{size:18}):r.jsx(Zv,{size:18})}),r.jsx("form",{action:"/logout",method:"POST",className:"m-0",children:r.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:r.jsx(Qv,{size:18,className:"rtl:-scale-x-100 transition-transform"})})})]})]})};function Ob(s){var o,u,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(o=0;o<d;o++)s[o]&&(u=Ob(s[o]))&&(c&&(c+=" "),c+=u)}else for(u in s)s[u]&&(c&&(c+=" "),c+=u);return c}function r2(){for(var s,o,u=0,c="",d=arguments.length;u<d;u++)(s=arguments[u])&&(o=Ob(s))&&(c&&(c+=" "),c+=o);return c}const o2=(s,o)=>{const u=new Array(s.length+o.length);for(let c=0;c<s.length;c++)u[c]=s[c];for(let c=0;c<o.length;c++)u[s.length+c]=o[c];return u},c2=(s,o)=>({classGroupId:s,validator:o}),Db=(s=new Map,o=null,u)=>({nextPart:s,validators:o,classGroupId:u}),no="-",Ex=[],u2="arbitrary..",d2=s=>{const o=h2(s),{conflictingClassGroups:u,conflictingClassGroupModifiers:c}=s;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return f2(p);const x=p.split(no),b=x[0]===""&&x.length>1?1:0;return Rb(x,b,o)},getConflictingClassGroupIds:(p,x)=>{if(x){const b=c[p],E=u[p];return b?E?o2(E,b):b:E||Ex}return u[p]||Ex}}},Rb=(s,o,u)=>{if(s.length-o===0)return u.classGroupId;const d=s[o],h=u.nextPart.get(d);if(h){const E=Rb(s,o+1,h);if(E)return E}const p=u.validators;if(p===null)return;const x=o===0?s.join(no):s.slice(o).join(no),b=p.length;for(let E=0;E<b;E++){const N=p[E];if(N.validator(x))return N.classGroupId}},f2=s=>s.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=s.slice(1,-1),u=o.indexOf(":"),c=o.slice(0,u);return c?u2+c:void 0})(),h2=s=>{const{theme:o,classGroups:u}=s;return m2(u,o)},m2=(s,o)=>{const u=Db();for(const c in s){const d=s[c];Hd(d,u,c,o)}return u},Hd=(s,o,u,c)=>{const d=s.length;for(let h=0;h<d;h++){const p=s[h];p2(p,o,u,c)}},p2=(s,o,u,c)=>{if(typeof s=="string"){x2(s,o,u);return}if(typeof s=="function"){g2(s,o,u,c);return}b2(s,o,u,c)},x2=(s,o,u)=>{const c=s===""?o:Bb(o,s);c.classGroupId=u},g2=(s,o,u,c)=>{if(y2(s)){Hd(s(c),o,u,c);return}o.validators===null&&(o.validators=[]),o.validators.push(c2(u,s))},b2=(s,o,u,c)=>{const d=Object.entries(s),h=d.length;for(let p=0;p<h;p++){const[x,b]=d[p];Hd(b,Bb(o,x),u,c)}},Bb=(s,o)=>{let u=s;const c=o.split(no),d=c.length;for(let h=0;h<d;h++){const p=c[h];let x=u.nextPart.get(p);x||(x=Db(),u.nextPart.set(p,x)),u=x}return u},y2=s=>"isThemeGetter"in s&&s.isThemeGetter===!0,v2=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,u=Object.create(null),c=Object.create(null);const d=(h,p)=>{u[h]=p,o++,o>s&&(o=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)}}},zd="!",zx=":",N2=[],kx=(s,o,u,c,d)=>({modifiers:s,hasImportantModifier:o,baseClassName:u,maybePostfixModifierPosition:c,isExternal:d}),w2=s=>{const{prefix:o,experimentalParseClassName:u}=s;let c=d=>{const h=[];let p=0,x=0,b=0,E;const N=d.length;for(let B=0;B<N;B++){const U=d[B];if(p===0&&x===0){if(U===zx){h.push(d.slice(b,B)),b=B+1;continue}if(U==="/"){E=B;continue}}U==="["?p++:U==="]"?p--:U==="("?x++:U===")"&&x--}const g=h.length===0?d:d.slice(b);let T=g,L=!1;g.endsWith(zd)?(T=g.slice(0,-1),L=!0):g.startsWith(zd)&&(T=g.slice(1),L=!0);const K=E&&E>b?E-b:void 0;return kx(h,L,T,K)};if(o){const d=o+zx,h=c;c=p=>p.startsWith(d)?h(p.slice(d.length)):kx(N2,!1,p,void 0,!0)}if(u){const d=c;c=h=>u({className:h,parseClassName:d})}return c},S2=s=>{const o=new Map;return s.orderSensitiveModifiers.forEach((u,c)=>{o.set(u,1e6+c)}),u=>{const c=[];let d=[];for(let h=0;h<u.length;h++){const p=u[h],x=p[0]==="[",b=o.has(p);x||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}},j2=s=>({cache:v2(s.cacheSize),parseClassName:w2(s),sortModifiers:S2(s),postfixLookupClassGroupIds:_2(s),...d2(s)}),_2=s=>{const o=Object.create(null),u=s.postfixLookupClassGroups;if(u)for(let c=0;c<u.length;c++)o[u[c]]=!0;return o},C2=/\s+/,T2=(s,o)=>{const{parseClassName:u,getClassGroupId:c,getConflictingClassGroupIds:d,sortModifiers:h,postfixLookupClassGroupIds:p}=o,x=[],b=s.trim().split(C2);let E="";for(let N=b.length-1;N>=0;N-=1){const g=b[N],{isExternal:T,modifiers:L,hasImportantModifier:K,baseClassName:B,maybePostfixModifierPosition:U}=u(g);if(T){E=g+(E.length>0?" "+E:E);continue}let G=!!U,Q;if(G){const V=B.substring(0,U);Q=c(V);const z=Q&&p[Q]?c(B):void 0;z&&z!==Q&&(Q=z,G=!1)}else Q=c(B);if(!Q){if(!G){E=g+(E.length>0?" "+E:E);continue}if(Q=c(B),!Q){E=g+(E.length>0?" "+E:E);continue}G=!1}const $=L.length===0?"":L.length===1?L[0]:h(L).join(":"),F=K?$+zd:$,xe=F+Q;if(x.indexOf(xe)>-1)continue;x.push(xe);const Z=d(Q,G);for(let V=0;V<Z.length;++V){const z=Z[V];x.push(F+z)}E=g+(E.length>0?" "+E:E)}return E},A2=(...s)=>{let o=0,u,c,d="";for(;o<s.length;)(u=s[o++])&&(c=Ub(u))&&(d&&(d+=" "),d+=c);return d},Ub=s=>{if(typeof s=="string")return s;let o,u="";for(let c=0;c<s.length;c++)s[c]&&(o=Ub(s[c]))&&(u&&(u+=" "),u+=o);return u},E2=(s,...o)=>{let u,c,d,h;const p=b=>{const E=o.reduce((N,g)=>g(N),s());return u=j2(E),c=u.cache.get,d=u.cache.set,h=x,x(b)},x=b=>{const E=c(b);if(E)return E;const N=T2(b,u);return d(b,N),N};return h=p,(...b)=>h(A2(...b))},z2=[],dt=s=>{const o=u=>u[s]||z2;return o.isThemeGetter=!0,o.themeKey=s,o},Lb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,k2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,M2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O2=/\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$/,D2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,R2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sa=s=>k2.test(s),Ae=s=>!!s&&!Number.isNaN(Number(s)),Tn=s=>!!s&&Number.isInteger(Number(s)),Zu=s=>s.endsWith("%")&&Ae(s.slice(0,-1)),Kn=s=>M2.test(s),Hb=()=>!0,U2=s=>O2.test(s)&&!D2.test(s),Gd=()=>!1,L2=s=>R2.test(s),q2=s=>B2.test(s),H2=s=>!ue(s)&&!de(s),G2=s=>s.startsWith("@container")&&(s[10]==="/"&&s[11]!==void 0||s[11]==="s"&&s[16]!==void 0&&s.startsWith("-size/",10)||s[11]==="n"&&s[18]!==void 0&&s.startsWith("-normal/",10)),V2=s=>Ca(s,Yb,Gd),ue=s=>Lb.test(s),$a=s=>Ca(s,Qb,U2),Mx=s=>Ca(s,P2,Ae),Y2=s=>Ca(s,Kb,Hb),Q2=s=>Ca(s,Xb,Gd),Ox=s=>Ca(s,Gb,Gd),X2=s=>Ca(s,Vb,q2),Hr=s=>Ca(s,Zb,L2),de=s=>qb.test(s),ni=s=>el(s,Qb),K2=s=>el(s,Xb),Dx=s=>el(s,Gb),Z2=s=>el(s,Yb),J2=s=>el(s,Vb),Gr=s=>el(s,Zb,!0),I2=s=>el(s,Kb,!0),Ca=(s,o,u)=>{const c=Lb.exec(s);return c?c[1]?o(c[1]):u(c[2]):!1},el=(s,o,u=!1)=>{const c=qb.exec(s);return c?c[1]?o(c[1]):u:!1},Gb=s=>s==="position"||s==="percentage",Vb=s=>s==="image"||s==="url",Yb=s=>s==="length"||s==="size"||s==="bg-size",Qb=s=>s==="length",P2=s=>s==="number",Xb=s=>s==="family-name",Kb=s=>s==="number"||s==="weight",Zb=s=>s==="shadow",F2=()=>{const s=dt("color"),o=dt("font"),u=dt("text"),c=dt("font-weight"),d=dt("tracking"),h=dt("leading"),p=dt("breakpoint"),x=dt("container"),b=dt("spacing"),E=dt("radius"),N=dt("shadow"),g=dt("inset-shadow"),T=dt("text-shadow"),L=dt("drop-shadow"),K=dt("blur"),B=dt("perspective"),U=dt("aspect"),G=dt("ease"),Q=dt("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],xe=()=>[...F(),de,ue],Z=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],z=()=>[de,ue,b],J=()=>[Sa,"full","auto",...z()],le=()=>[Tn,"none","subgrid",de,ue],ae=()=>["auto",{span:["full",Tn,de,ue]},Tn,de,ue],W=()=>[Tn,"auto",de,ue],ie=()=>["auto","min","max","fr",de,ue],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ge=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...z()],I=()=>[Sa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],M=()=>[x,Sa,"screen","full","dvw","lvw","svw","min","max","fit",...z()],me=()=>[Sa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],X=()=>[s,de,ue],qe=()=>[...F(),Dx,Ox,{position:[de,ue]}],et=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",Z2,V2,{size:[de,ue]}],w=()=>[Zu,ni,$a],v=()=>["","none","full",E,de,ue],P=()=>["",Ae,ni,$a],te=()=>["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=()=>[Ae,Zu,Dx,Ox],Se=()=>["","none",K,de,ue],se=()=>["none",Ae,de,ue],oe=()=>["none",Ae,de,ue],tt=()=>[Ae,de,ue],ln=()=>[Sa,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kn],breakpoint:[Kn],color:[Hb],container:[Kn],"drop-shadow":[Kn],ease:["in","out","in-out"],font:[H2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kn],shadow:[Kn],spacing:["px",Ae],text:[Kn],"text-shadow":[Kn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sa,ue,de,U]}],container:["container"],"container-type":[{"@container":["","normal","size",de,ue]}],"container-named":[G2],columns:[{columns:[Ae,"auto",ue,de,x]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:xe()}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{"inset-s":J(),start:J()}],end:[{"inset-e":J(),end:J()}],"inset-bs":[{"inset-bs":J()}],"inset-be":[{"inset-be":J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[Tn,"auto",de,ue]}],basis:[{basis:[Sa,"full","auto",x,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,Sa,"auto","initial","none",ue]}],grow:[{grow:["",Ae,de,ue]}],shrink:[{shrink:["",Ae,de,ue]}],order:[{order:[Tn,"first","last","none",de,ue]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ge(),"normal"]}],"justify-self":[{"justify-self":["auto",...ge()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ge(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ge(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ge(),"baseline"]}],"place-self":[{"place-self":["auto",...ge()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],"inline-size":[{inline:["auto",...M()]}],"min-inline-size":[{"min-inline":["auto",...M()]}],"max-inline-size":[{"max-inline":["none",...M()]}],"block-size":[{block:["auto",...me()]}],"min-block-size":[{"min-block":["auto",...me()]}],"max-block-size":[{"max-block":["none",...me()]}],w:[{w:[x,"screen",...I()]}],"min-w":[{"min-w":[x,"screen","none",...I()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[p]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh","none",...I()]}],"font-size":[{text:["base",u,ni,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,I2,Y2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zu,ue]}],"font-family":[{font:[K2,Q2,o]}],"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":[Ae,"none",de,Mx]}],leading:[{leading:["none",h,...z()]}],"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:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",de,$a]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[Ae,"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:z()}],"tab-size":[{tab:[Tn,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:qe()}],"bg-repeat":[{bg:et()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tn,de,ue],radial:["",de,ue],conic:["",Tn,de,ue]},J2,X2]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:w()}],"gradient-via-pos":[{via:w()}],"gradient-to-pos":[{to:w()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:v()}],"rounded-s":[{"rounded-s":v()}],"rounded-e":[{"rounded-e":v()}],"rounded-t":[{"rounded-t":v()}],"rounded-r":[{"rounded-r":v()}],"rounded-b":[{"rounded-b":v()}],"rounded-l":[{"rounded-l":v()}],"rounded-ss":[{"rounded-ss":v()}],"rounded-se":[{"rounded-se":v()}],"rounded-ee":[{"rounded-ee":v()}],"rounded-es":[{"rounded-es":v()}],"rounded-tl":[{"rounded-tl":v()}],"rounded-tr":[{"rounded-tr":v()}],"rounded-br":[{"rounded-br":v()}],"rounded-bl":[{"rounded-bl":v()}],"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:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,de,ue]}],"outline-w":[{outline:["",Ae,ni,$a]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","inner","none",N,Gr,Hr]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",g,Gr,Hr]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[Ae,$a]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",T,Gr,Hr]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[Ae,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":[Ae]}],"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":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"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":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"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":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"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":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"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":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"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":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"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":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"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":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"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":F()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"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":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:qe()}],"mask-repeat":[{mask:et()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ue]}],filter:[{filter:["","none",de,ue]}],blur:[{blur:Se()}],brightness:[{brightness:[Ae,de,ue]}],contrast:[{contrast:[Ae,de,ue]}],"drop-shadow":[{"drop-shadow":["","none",L,Gr,Hr]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",Ae,de,ue]}],"hue-rotate":[{"hue-rotate":[Ae,de,ue]}],invert:[{invert:["",Ae,de,ue]}],saturate:[{saturate:[Ae,de,ue]}],sepia:[{sepia:["",Ae,de,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ue]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,de,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,de,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,de,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,de,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ae,de,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,de,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,de,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,de,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",de,ue]}],ease:[{ease:["linear","initial",G,de,ue]}],delay:[{delay:[Ae,de,ue]}],animate:[{animate:["none",Q,de,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,de,ue]}],"perspective-origin":[{"perspective-origin":xe()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[de,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:xe()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ln()}],"translate-x":[{"translate-x":ln()}],"translate-y":[{"translate-y":ln()}],"translate-z":[{"translate-z":ln()}],"translate-none":["translate-none"],zoom:[{zoom:[Tn,de,ue]}],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"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":X()}],"scrollbar-track-color":[{"scrollbar-track":X()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de,ue]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[Ae,ni,$a,Mx]}],stroke:[{stroke:["none",...X()]}],"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"]}},$2=E2(F2);function Xt(...s){return $2(r2(s))}const W2=({currentView:s,onSelectView:o,isOpenMobile:u,onCloseMobile:c})=>{const{t:d}=an(),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:Gv},{id:"connection",label:d("connection"),icon:oi},{labelCategory:d("control")},{id:"commands",label:d("commands"),icon:ts},{id:"ai",label:d("ai"),icon:Ld},{id:"groups",label:d("groups"),icon:Wl},{id:"schedules",label:d("schedules"),icon:jd},{labelCategory:d("settings")},{id:"settings",label:d("settings"),icon:$v},{id:"logs",label:d("logs"),icon:Xr}];return r.jsxs(r.Fragment,{children:[u&&r.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"}),r.jsxs("aside",{className:Xt("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:[r.jsxs("div",{className:"p-4 flex items-center justify-between border-b border-line",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.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:r.jsx(l2,{size:20})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"font-extrabold text-base text-text-main leading-tight tracking-tight truncate",children:h.name}),r.jsx("div",{className:"text-xs text-muted leading-none truncate mt-0.5",children:h.tagline})]})]}),r.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:r.jsx(ui,{size:18})})]}),r.jsx("nav",{className:"flex-1 overflow-y-auto p-3 space-y-1",children:p.map(x=>{if(x.labelCategory)return r.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] font-bold uppercase tracking-wider text-faint",children:x.labelCategory},`cat-${x.labelCategory}`);if(!x.icon)return null;const b=x.icon,E=s===x.id;return r.jsxs("button",{type:"button",onClick:()=>{x.id&&(o(x.id),c())},className:Xt("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:[r.jsx(b,{size:20,className:"shrink-0"}),r.jsx("span",{className:"truncate",children:x.label})]},x.id)})}),r.jsxs("div",{className:"p-4 border-t border-line text-xs text-faint flex flex-col gap-2.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted",children:[r.jsx("span",{className:"font-mono",children:h.version?`v${h.version}`:""}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(qd,{size:14,className:"text-brand-cyan"})," Local-first"]})]}),r.jsxs("div",{className:"text-[11px] text-muted truncate",children:["© ",h.copyrightYear||2026," ",r.jsx("a",{href:h.developerSite||"#",target:"_blank",rel:"noopener noreferrer",className:"text-brand-cyan hover:underline",children:h.developer})," ","(",r.jsx("a",{href:h.studioSite||"#",target:"_blank",rel:"noopener noreferrer",className:"text-brand-cyan hover:underline",children:h.studio}),")"]})]})]})]})},Jb=Y.createContext(null),e5=({children:s})=>{const[o,u]=Y.useState([]),c=Y.useCallback(h=>{u(p=>p.filter(x=>x.id!==h))},[]),d=Y.useCallback((h,p="info",x=4e3)=>{const b=Math.random().toString(36).slice(2,9);u(E=>[...E,{id:b,message:h,type:p,duration:x}]),setTimeout(()=>c(b),x)},[c]);return r.jsxs(Jb.Provider,{value:{toast:d},children:[s,r.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:o.map(h=>r.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"&&r.jsx(ci,{size:18,className:"text-ok shrink-0"}),h.type==="error"&&r.jsx(Mv,{size:18,className:"text-danger shrink-0"}),h.type==="warning"&&r.jsx(Kr,{size:18,className:"text-warn shrink-0"}),h.type==="info"&&r.jsx(Hv,{size:18,className:"text-info shrink-0"}),r.jsx("span",{className:"flex-1 font-medium",children:h.message}),r.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:r.jsx(ui,{size:14})})]},h.id))})]})},Zn=()=>{const s=Y.useContext(Jb);if(!s)throw new Error("useToast must be used within a ToastProvider");return s},zn=Object.create(null);zn.open="0";zn.close="1";zn.ping="2";zn.pong="3";zn.message="4";zn.upgrade="5";zn.noop="6";const Zr=Object.create(null);Object.keys(zn).forEach(s=>{Zr[zn[s]]=s});const kd={type:"error",data:"parser error"},Ib=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Pb=typeof ArrayBuffer=="function",Fb=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,Vd=({type:s,data:o},u,c)=>Ib&&o instanceof Blob?u?c(o):Rx(o,c):Pb&&(o instanceof ArrayBuffer||Fb(o))?u?c(o):Rx(new Blob([o]),c):c(zn[s]+(o||"")),Rx=(s,o)=>{const u=new FileReader;return u.onload=function(){const c=u.result.split(",")[1];o("b"+(c||""))},u.readAsDataURL(s)};function Bx(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let Ju;function t5(s,o){if(Ib&&s.data instanceof Blob)return s.data.arrayBuffer().then(Bx).then(o);if(Pb&&(s.data instanceof ArrayBuffer||Fb(s.data)))return o(Bx(s.data));Vd(s,!1,u=>{Ju||(Ju=new TextEncoder),o(Ju.encode(u))})}const Ux="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ii=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Ux.length;s++)ii[Ux.charCodeAt(s)]=s;const n5=s=>{let o=s.length*.75,u=s.length,c,d=0,h,p,x,b;s[s.length-1]==="="&&(o--,s[s.length-2]==="="&&o--);const E=new ArrayBuffer(o),N=new Uint8Array(E);for(c=0;c<u;c+=4)h=ii[s.charCodeAt(c)],p=ii[s.charCodeAt(c+1)],x=ii[s.charCodeAt(c+2)],b=ii[s.charCodeAt(c+3)],N[d++]=h<<2|p>>4,N[d++]=(p&15)<<4|x>>2,N[d++]=(x&3)<<6|b&63;return E},a5=typeof ArrayBuffer=="function",Yd=(s,o)=>{if(typeof s!="string")return{type:"message",data:$b(s,o)};const u=s.charAt(0);return u==="b"?{type:"message",data:l5(s.substring(1),o)}:Zr[u]?s.length>1?{type:Zr[u],data:s.substring(1)}:{type:Zr[u]}:kd},l5=(s,o)=>{if(a5){const u=n5(s);return $b(u,o)}else return{base64:!0,data:s}},$b=(s,o)=>{switch(o){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}},Wb="",s5=(s,o)=>{const u=s.length,c=new Array(u);let d=0;s.forEach((h,p)=>{Vd(h,!1,x=>{c[p]=x,++d===u&&o(c.join(Wb))})})},i5=(s,o)=>{const u=s.split(Wb),c=[];for(let d=0;d<u.length;d++){const h=Yd(u[d],o);if(c.push(h),h.type==="error")break}return c};function r5(){return new TransformStream({transform(s,o){t5(s,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))}s.data&&typeof s.data!="string"&&(d[0]|=128),o.enqueue(d),o.enqueue(u)})}})}let Iu;function Vr(s){return s.reduce((o,u)=>o+u.length,0)}function Yr(s,o){if(s[0].length===o)return s.shift();const u=new Uint8Array(o);let c=0;for(let d=0;d<o;d++)u[d]=s[0][c++],c===s[0].length&&(s.shift(),c=0);return s.length&&c<s[0].length&&(s[0]=s[0].slice(c)),u}function o5(s,o){Iu||(Iu=new TextDecoder);const u=[];let c=0,d=-1,h=!1;return new TransformStream({transform(p,x){for(u.push(p);;){if(c===0){if(Vr(u)<1)break;const b=Yr(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(Vr(u)<2)break;const b=Yr(u,2);d=new DataView(b.buffer,b.byteOffset,b.length).getUint16(0),c=3}else if(c===2){if(Vr(u)<8)break;const b=Yr(u,8),E=new DataView(b.buffer,b.byteOffset,b.length),N=E.getUint32(0);if(N>Math.pow(2,21)-1){x.enqueue(kd);break}d=N*Math.pow(2,32)+E.getUint32(4),c=3}else{if(Vr(u)<d)break;const b=Yr(u,d);x.enqueue(Yd(h?b:Iu.decode(b),o)),c=0}if(d===0||d>s){x.enqueue(kd);break}}}})}const e0=4;function ct(s){if(s)return c5(s)}function c5(s){for(var o in ct.prototype)s[o]=ct.prototype[o];return s}ct.prototype.on=ct.prototype.addEventListener=function(s,o){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(o),this};ct.prototype.once=function(s,o){function u(){this.off(s,u),o.apply(this,arguments)}return u.fn=o,this.on(s,u),this};ct.prototype.off=ct.prototype.removeListener=ct.prototype.removeAllListeners=ct.prototype.removeEventListener=function(s,o){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var u=this._callbacks["$"+s];if(!u)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var c,d=0;d<u.length;d++)if(c=u[d],c===o||c.fn===o){u.splice(d,1);break}return u.length===0&&delete this._callbacks["$"+s],this};ct.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var o=new Array(arguments.length-1),u=this._callbacks["$"+s],c=1;c<arguments.length;c++)o[c-1]=arguments[c];if(u){u=u.slice(0);for(var c=0,d=u.length;c<d;++c)u[c].apply(this,o)}return this};ct.prototype.emitReserved=ct.prototype.emit;ct.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};ct.prototype.hasListeners=function(s){return!!this.listeners(s).length};const ao=typeof Promise=="function"&&typeof Promise.resolve=="function"?o=>Promise.resolve().then(o):(o,u)=>u(o,0),nn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),u5="arraybuffer";function t0(s,...o){return o.reduce((u,c)=>(s.hasOwnProperty(c)&&(u[c]=s[c]),u),{})}const d5=nn.setTimeout,f5=nn.clearTimeout;function lo(s,o){o.useNativeTimers?(s.setTimeoutFn=d5.bind(nn),s.clearTimeoutFn=f5.bind(nn)):(s.setTimeoutFn=nn.setTimeout.bind(nn),s.clearTimeoutFn=nn.clearTimeout.bind(nn))}const h5=1.33;function m5(s){return typeof s=="string"?p5(s):Math.ceil((s.byteLength||s.size)*h5)}function p5(s){let o=0,u=0;for(let c=0,d=s.length;c<d;c++)o=s.charCodeAt(c),o<128?u+=1:o<2048?u+=2:o<55296||o>=57344?u+=3:(c++,u+=4);return u}function n0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function x5(s){let o="";for(let u in s)s.hasOwnProperty(u)&&(o.length&&(o+="&"),o+=encodeURIComponent(u)+"="+encodeURIComponent(s[u]));return o}function g5(s){let o={},u=s.split("&");for(let c=0,d=u.length;c<d;c++){let h=u[c].split("=");o[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return o}class b5 extends Error{constructor(o,u,c){super(o),this.description=u,this.context=c,this.type="TransportError"}}class Qd extends ct{constructor(o){super(),this.writable=!1,lo(this,o),this.opts=o,this.query=o.query,this.socket=o.socket,this.supportsBinary=!o.forceBase64}onError(o,u,c){return super.emitReserved("error",new b5(o,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(o){this.readyState==="open"&&this.write(o)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(o){const u=Yd(o,this.socket.binaryType);this.onPacket(u)}onPacket(o){super.emitReserved("packet",o)}onClose(o){this.readyState="closed",super.emitReserved("close",o)}pause(o){}createUri(o,u={}){return o+"://"+this._hostname()+this._port()+this.opts.path+this._query(u)}_hostname(){const o=this.opts.hostname;return o.indexOf(":")===-1?o:"["+o+"]"}_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(o){const u=x5(o);return u.length?"?"+u:""}}class y5 extends Qd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(o){this.readyState="pausing";const u=()=>{this.readyState="paused",o()};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(o){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)};i5(o,this.socket.binaryType).forEach(u),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const o=()=>{this.write([{type:"close"}])};this.readyState==="open"?o():this.once("open",o)}write(o){this.writable=!1,s5(o,u=>{this.doWrite(u,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const o=this.opts.secure?"https":"http",u=this.query||{};return this.opts.timestampRequests!==!1&&(u[this.opts.timestampParam]=n0()),!this.supportsBinary&&!u.sid&&(u.b64=1),this.createUri(o,u)}}let a0=!1;try{a0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const v5=a0;function N5(){}class w5 extends y5{constructor(o){if(super(o),typeof location<"u"){const u=location.protocol==="https:";let c=location.port;c||(c=u?"443":"80"),this.xd=typeof location<"u"&&o.hostname!==location.hostname||c!==o.port}}doWrite(o,u){const c=this.request({method:"POST",data:o});c.on("success",u),c.on("error",(d,h)=>{this.onError("xhr post error",d,h)})}doPoll(){const o=this.request();o.on("data",this.onData.bind(this)),o.on("error",(u,c)=>{this.onError("xhr poll error",u,c)}),this.pollXhr=o}}class En extends ct{constructor(o,u,c){super(),this.createRequest=o,lo(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 o;const u=t0(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{}(o=this._opts.cookieJar)===null||o===void 0||o.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=En.requestsCount++,En.requests[this._index]=this)}_onError(o){this.emitReserved("error",o,this._xhr),this._cleanup(!0)}_cleanup(o){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=N5,o)try{this._xhr.abort()}catch{}typeof document<"u"&&delete En.requests[this._index],this._xhr=null}}_onLoad(){const o=this._xhr.responseText;o!==null&&(this.emitReserved("data",o),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}En.requestsCount=0;En.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Lx);else if(typeof addEventListener=="function"){const s="onpagehide"in nn?"pagehide":"unload";addEventListener(s,Lx,!1)}}function Lx(){for(let s in En.requests)En.requests.hasOwnProperty(s)&&En.requests[s].abort()}const S5=(function(){const s=l0({xdomain:!1});return s&&s.responseType!==null})();class j5 extends w5{constructor(o){super(o);const u=o&&o.forceBase64;this.supportsBinary=S5&&!u}request(o={}){return Object.assign(o,{xd:this.xd},this.opts),new En(l0,this.uri(),o)}}function l0(s){const o=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!o||v5))return new XMLHttpRequest}catch{}if(!o)try{return new nn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const s0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class _5 extends Qd{get name(){return"websocket"}doOpen(){const o=this.uri(),u=this.opts.protocols,c=s0?{}:t0(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(o,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=o=>this.onClose({description:"websocket connection closed",context:o}),this.ws.onmessage=o=>this.onData(o.data),this.ws.onerror=o=>this.onError("websocket error",o)}write(o){this.writable=!1;for(let u=0;u<o.length;u++){const c=o[u],d=u===o.length-1;Vd(c,this.supportsBinary,h=>{try{this.doWrite(c,h)}catch{}d&&ao(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const o=this.opts.secure?"wss":"ws",u=this.query||{};return this.opts.timestampRequests&&(u[this.opts.timestampParam]=n0()),this.supportsBinary||(u.b64=1),this.createUri(o,u)}}const Pu=nn.WebSocket||nn.MozWebSocket;class C5 extends _5{createSocket(o,u,c){return s0?new Pu(o,u,c):u?new Pu(o,u):new Pu(o)}doWrite(o,u){this.ws.send(u)}}class T5 extends Qd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(o){return this.emitReserved("error",o)}this._transport.closed.then(()=>{this.onClose()}).catch(o=>{this.onError("webtransport error",o)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(o=>{const u=o5(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=o.readable.pipeThrough(u).getReader(),d=r5();d.readable.pipeTo(o.writable),this._writer=d.writable.getWriter();const h=()=>{c.read().then(({done:x,value:b})=>{x||(this.onPacket(b),h())}).catch(x=>{})};h();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(o){this.writable=!1;for(let u=0;u<o.length;u++){const c=o[u],d=u===o.length-1;this._writer.write(c).then(()=>{d&&ao(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var o;(o=this._transport)===null||o===void 0||o.close()}}const A5={websocket:C5,webtransport:T5,polling:j5},E5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,z5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Md(s){if(s.length>8e3)throw"URI too long";const o=s,u=s.indexOf("["),c=s.indexOf("]");u!=-1&&c!=-1&&(s=s.substring(0,u)+s.substring(u,c).replace(/:/g,";")+s.substring(c,s.length));let d=E5.exec(s||""),h={},p=14;for(;p--;)h[z5[p]]=d[p]||"";return u!=-1&&c!=-1&&(h.source=o,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=k5(h,h.path),h.queryKey=M5(h,h.query),h}function k5(s,o){const u=/\/{2,9}/g,c=o.replace(u,"/").split("/");return(o.slice(0,1)=="/"||o.length===0)&&c.splice(0,1),o.slice(-1)=="/"&&c.splice(c.length-1,1),c}function M5(s,o){const u={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,h){d&&(u[d]=h)}),u}const Od=typeof addEventListener=="function"&&typeof removeEventListener=="function",Jr=[];Od&&addEventListener("offline",()=>{Jr.forEach(s=>s())},!1);class _a extends ct{constructor(o,u){if(super(),this.binaryType=u5,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,o&&typeof o=="object"&&(u=o,o=null),o){const c=Md(o);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=Md(u.host).host);lo(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=g5(this.opts.query)),Od&&(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"})},Jr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(o){const u=Object.assign({},this.opts.query);u.EIO=e0,u.transport=o,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[o]);return new this._transportsByName[o](c)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const o=this.opts.rememberUpgrade&&_a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const u=this.createTransport(o);u.open(),this.setTransport(u)}setTransport(o){this.transport&&this.transport.removeAllListeners(),this.transport=o,o.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",_a.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",o),this.emitReserved("heartbeat"),o.type){case"open":this.onHandshake(JSON.parse(o.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=o.data,this._onError(u);break;case"message":this.emitReserved("data",o.data),this.emitReserved("message",o.data);break}}onHandshake(o){this.emitReserved("handshake",o),this.id=o.sid,this.transport.query.sid=o.sid,this._pingInterval=o.pingInterval,this._pingTimeout=o.pingTimeout,this._maxPayload=o.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const o=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+o,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},o),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 o=this._getWritablePackets();this.transport.send(o),this._prevBufferLen=o.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+=m5(d)),c>0&&u>this._maxPayload)return this.writeBuffer.slice(0,c);u+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const o=Date.now()>this._pingTimeoutTime;return o&&(this._pingTimeoutTime=0,ao(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),o}write(o,u,c){return this._sendPacket("message",o,u,c),this}send(o,u,c){return this._sendPacket("message",o,u,c),this}_sendPacket(o,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:o,data:u,options:c};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),d&&this.once("flush",d),this.flush()}close(){const o=()=>{this._onClose("forced close"),this.transport.close()},u=()=>{this.off("upgrade",u),this.off("upgradeError",u),o()},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():o()}):this.upgrading?c():o()),this}_onError(o){if(_a.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",o),this._onClose("transport error",o)}_onClose(o,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(),Od&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const c=Jr.indexOf(this._offlineEventListener);c!==-1&&Jr.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",o,u),this.writeBuffer=[],this._prevBufferLen=0}}}_a.protocol=e0;class O5 extends _a{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let o=0;o<this._upgrades.length;o++)this._probe(this._upgrades[o])}_probe(o){let u=this.createTransport(o),c=!1;_a.priorWebsocketSuccess=!1;const d=()=>{c||(u.send([{type:"ping",data:"probe"}]),u.once("packet",g=>{if(!c)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",u),!u)return;_a.priorWebsocketSuccess=u.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(N(),this.setTransport(u),u.send([{type:"upgrade"}]),this.emitReserved("upgrade",u),u=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=u.name,this.emitReserved("upgradeError",T)}}))};function h(){c||(c=!0,N(),u.close(),u=null)}const p=g=>{const T=new Error("probe error: "+g);T.transport=u.name,h(),this.emitReserved("upgradeError",T)};function x(){p("transport closed")}function b(){p("socket closed")}function E(g){u&&g.name!==u.name&&h()}const N=()=>{u.removeListener("open",d),u.removeListener("error",p),u.removeListener("close",x),this.off("close",b),this.off("upgrading",E)};u.once("open",d),u.once("error",p),u.once("close",x),this.once("close",b),this.once("upgrading",E),this._upgrades.indexOf("webtransport")!==-1&&o!=="webtransport"?this.setTimeoutFn(()=>{c||u.open()},200):u.open()}onHandshake(o){this._upgrades=this._filterUpgrades(o.upgrades),super.onHandshake(o)}_filterUpgrades(o){const u=[];for(let c=0;c<o.length;c++)~this.transports.indexOf(o[c])&&u.push(o[c]);return u}}let D5=class extends O5{constructor(o,u={}){const c=typeof o=="object",d=c?{...o}:{...u};(!d.transports||d.transports&&typeof d.transports[0]=="string")&&(d.transports=(d.transports||["polling","websocket","webtransport"]).map(h=>A5[h]).filter(h=>!!h)),super(c?d:o,d)}};function R5(s,o="",u){let c=s;u=u||typeof location<"u"&&location,s==null&&(s=u.protocol+"//"+u.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=u.protocol+s:s=u.host+s),/^(https?|wss?):\/\//.test(s)||(typeof u<"u"?s=u.protocol+"//"+s:s="https://"+s),c=Md(s)),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+o,c.href=c.protocol+"://"+h+(u&&u.port===c.port?"":":"+c.port),c}const B5=typeof ArrayBuffer=="function",U5=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,i0=Object.prototype.toString,L5=typeof Blob=="function"||typeof Blob<"u"&&i0.call(Blob)==="[object BlobConstructor]",q5=typeof File=="function"||typeof File<"u"&&i0.call(File)==="[object FileConstructor]";function Xd(s){return B5&&(s instanceof ArrayBuffer||U5(s))||L5&&s instanceof Blob||q5&&s instanceof File}function Ir(s,o){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let u=0,c=s.length;u<c;u++)if(Ir(s[u]))return!0;return!1}if(Xd(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Ir(s.toJSON(),!0);for(const u in s)if(Object.prototype.hasOwnProperty.call(s,u)&&Ir(s[u]))return!0;return!1}function H5(s){const o=[],u=s.data,c=s;return c.data=Pr(u,o),c.attachments=o.length,{packet:c,buffers:o}}function Pr(s,o,u){if(!s)return s;if(Xd(s)){const c={_placeholder:!0,num:o.length};return o.push(s),c}else if(Array.isArray(s)){const c=new Array(s.length);for(let d=0;d<s.length;d++)c[d]=Pr(s[d],o);return c}else if(typeof s=="object"&&!(s instanceof Date)){if(s.toJSON&&typeof s.toJSON=="function"&&!u)return Pr(s.toJSON(),o,!0);const c={};for(const d in s)Object.prototype.hasOwnProperty.call(s,d)&&(c[d]=Pr(s[d],o));return c}return s}function G5(s,o){return s.data=Dd(s.data,o),delete s.attachments,s}function Dd(s,o){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<o.length)return o[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let u=0;u<s.length;u++)s[u]=Dd(s[u],o);else if(typeof s=="object")for(const u in s)Object.prototype.hasOwnProperty.call(s,u)&&(s[u]=Dd(s[u],o));return s}const V5=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var De;(function(s){s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK"})(De||(De={}));class Y5{constructor(o){this.replacer=o}encode(o){return(o.type===De.EVENT||o.type===De.ACK)&&Ir(o)?this.encodeAsBinary({type:o.type===De.EVENT?De.BINARY_EVENT:De.BINARY_ACK,nsp:o.nsp,data:o.data,id:o.id}):[this.encodeAsString(o)]}encodeAsString(o){let u=""+o.type;return(o.type===De.BINARY_EVENT||o.type===De.BINARY_ACK)&&(u+=o.attachments+"-"),o.nsp&&o.nsp!=="/"&&(u+=o.nsp+","),o.id!=null&&(u+=o.id),o.data!=null&&(u+=JSON.stringify(o.data,this.replacer)),u}encodeAsBinary(o){const u=H5(o),c=this.encodeAsString(u.packet),d=u.buffers;return d.unshift(c),d}}class Kd extends ct{constructor(o){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof o=="function"?{reviver:o}:o)}add(o){let u;if(typeof o=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");u=this.decodeString(o);const c=u.type===De.BINARY_EVENT;c||u.type===De.BINARY_ACK?(u.type=c?De.EVENT:De.ACK,this.reconstructor=new Q5(u)):super.emitReserved("decoded",u)}else if(Xd(o)||o.base64)if(this.reconstructor)u=this.reconstructor.takeBinaryData(o),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: "+o)}decodeString(o){let u=0;const c={type:Number(o.charAt(0))};if(De[c.type]===void 0)throw new Error("unknown packet type "+c.type);if(c.type===De.BINARY_EVENT||c.type===De.BINARY_ACK){const h=u+1;for(;o.charAt(++u)!=="-"&&u!=o.length;);const p=o.substring(h,u);if(p!=Number(p)||o.charAt(u)!=="-")throw new Error("Illegal attachments");const x=Number(p);if(!X5(x)||x<1)throw new Error("Illegal attachments");if(x>this.opts.maxAttachments)throw new Error("too many attachments");c.attachments=x}if(o.charAt(u+1)==="/"){const h=u+1;for(;++u&&!(o.charAt(u)===","||u===o.length););c.nsp=o.substring(h,u)}else c.nsp="/";const d=o.charAt(u+1);if(d!==""&&Number(d)==d){const h=u+1;for(;++u;){const p=o.charAt(u);if(p==null||Number(p)!=p){--u;break}if(u===o.length)break}c.id=Number(o.substring(h,u+1))}if(o.charAt(++u)){const h=this.tryParse(o.substr(u));if(Kd.isPayloadValid(c.type,h))c.data=h;else throw new Error("invalid payload")}return c}tryParse(o){try{return JSON.parse(o,this.opts.reviver)}catch{return!1}}static isPayloadValid(o,u){switch(o){case De.CONNECT:return qx(u);case De.DISCONNECT:return u===void 0;case De.CONNECT_ERROR:return typeof u=="string"||qx(u);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(u)&&(typeof u[0]=="number"||typeof u[0]=="string"&&V5.indexOf(u[0])===-1);case De.ACK:case De.BINARY_ACK:return Array.isArray(u)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Q5{constructor(o){this.packet=o,this.buffers=[],this.reconPack=o}takeBinaryData(o){if(this.buffers.push(o),this.buffers.length===this.reconPack.attachments){const u=G5(this.reconPack,this.buffers);return this.finishedReconstruction(),u}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const X5=Number.isInteger||function(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s};function qx(s){return Object.prototype.toString.call(s)==="[object Object]"}const K5=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Kd,Encoder:Y5,get PacketType(){return De}},Symbol.toStringTag,{value:"Module"}));function pn(s,o,u){return s.on(o,u),function(){s.off(o,u)}}const Z5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class r0 extends ct{constructor(o,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=o,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 o=this.io;this.subs=[pn(o,"open",this.onopen.bind(this)),pn(o,"packet",this.onpacket.bind(this)),pn(o,"error",this.onerror.bind(this)),pn(o,"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(...o){return o.unshift("message"),this.emit.apply(this,o),this}emit(o,...u){var c,d,h;if(Z5.hasOwnProperty(o))throw new Error('"'+o.toString()+'" is a reserved event name');if(u.unshift(o),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(u),this;const p={type:De.EVENT,data:u};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof u[u.length-1]=="function"){const N=this.ids++,g=u.pop();this._registerAckCallback(N,g),p.id=N}const x=(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&&!x||(b?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(o,u){var c;const d=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(d===void 0){this.acks[o]=u;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[o];for(let x=0;x<this.sendBuffer.length;x++)this.sendBuffer[x].id===o&&this.sendBuffer.splice(x,1);u.call(this,new Error("operation has timed out"))},d),p=(...x)=>{this.io.clearTimeoutFn(h),u.apply(this,x)};p.withError=!0,this.acks[o]=p}emitWithAck(o,...u){return new Promise((c,d)=>{const h=(p,x)=>p?d(p):c(x);h.withError=!0,u.push(h),this.emit(o,...u)})}_addToQueue(o){let u;typeof o[o.length-1]=="function"&&(u=o.pop());const c={id:this._queueSeq++,tryCount:0,pending:!1,args:o,flags:Object.assign({fromQueue:!0},this.flags)};o.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(o=!1){if(!this.connected||this._queue.length===0)return;const u=this._queue[0];u.pending&&!o||(u.pending=!0,u.tryCount++,this.flags=u.flags,this.emit.apply(this,u.args))}packet(o){o.nsp=this.nsp,this.io._packet(o)}onopen(){typeof this.auth=="function"?this.auth(o=>{this._sendConnectPacket(o)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(o){this.packet({type:De.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},o):o})}onerror(o){this.connected||this.emitReserved("connect_error",o)}onclose(o,u){this.connected=!1,delete this.id,this.emitReserved("disconnect",o,u),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(o=>{if(!this.sendBuffer.some(c=>String(c.id)===o)){const c=this.acks[o];delete this.acks[o],c.withError&&c.call(this,new Error("socket has been disconnected"))}})}onpacket(o){if(o.nsp===this.nsp)switch(o.type){case De.CONNECT:o.data&&o.data.sid?this.onconnect(o.data.sid,o.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 De.EVENT:case De.BINARY_EVENT:this.onevent(o);break;case De.ACK:case De.BINARY_ACK:this.onack(o);break;case De.DISCONNECT:this.ondisconnect();break;case De.CONNECT_ERROR:this.destroy();const c=new Error(o.data.message);c.data=o.data.data,this.emitReserved("connect_error",c);break}}onevent(o){const u=o.data||[];o.id!=null&&u.push(this.ack(o.id)),this.connected?this.emitEvent(u):this.receiveBuffer.push(Object.freeze(u))}emitEvent(o){if(this._anyListeners&&this._anyListeners.length){const u=this._anyListeners.slice();for(const c of u)c.apply(this,o)}super.emit.apply(this,o),this._pid&&o.length&&typeof o[o.length-1]=="string"&&(this._lastOffset=o[o.length-1])}ack(o){const u=this;let c=!1;return function(...d){c||(c=!0,u.packet({type:De.ACK,id:o,data:d}))}}onack(o){const u=this.acks[o.id];typeof u=="function"&&(delete this.acks[o.id],u.withError&&o.data.unshift(null),u.apply(this,o.data))}onconnect(o,u){this.id=o,this.recovered=u&&this._pid===u,this._pid=u,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(o=>this.emitEvent(o)),this.receiveBuffer=[],this.sendBuffer.forEach(o=>{this.notifyOutgoingListeners(o),this.packet(o)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(o=>o()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:De.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(o){return this.flags.compress=o,this}get volatile(){return this.flags.volatile=!0,this}timeout(o){return this.flags.timeout=o,this}onAny(o){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(o),this}prependAny(o){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(o),this}offAny(o){if(!this._anyListeners)return this;if(o){const u=this._anyListeners;for(let c=0;c<u.length;c++)if(o===u[c])return u.splice(c,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(o){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(o),this}prependAnyOutgoing(o){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(o),this}offAnyOutgoing(o){if(!this._anyOutgoingListeners)return this;if(o){const u=this._anyOutgoingListeners;for(let c=0;c<u.length;c++)if(o===u[c])return u.splice(c,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(o){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const u=this._anyOutgoingListeners.slice();for(const c of u)c.apply(this,o.data)}}}function ns(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}ns.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),u=Math.floor(o*this.jitter*s);s=(Math.floor(o*10)&1)==0?s-u:s+u}return Math.min(s,this.max)|0};ns.prototype.reset=function(){this.attempts=0};ns.prototype.setMin=function(s){this.ms=s};ns.prototype.setMax=function(s){this.max=s};ns.prototype.setJitter=function(s){this.jitter=s};class Rd extends ct{constructor(o,u){var c;super(),this.nsps={},this.subs=[],o&&typeof o=="object"&&(u=o,o=void 0),u=u||{},u.path=u.path||"/socket.io",this.opts=u,lo(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 ns({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(u.timeout==null?2e4:u.timeout),this._readyState="closed",this.uri=o;const d=u.parser||K5;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=u.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(o){return arguments.length?(this._reconnection=!!o,o||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(o){return o===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=o,this)}reconnectionDelay(o){var u;return o===void 0?this._reconnectionDelay:(this._reconnectionDelay=o,(u=this.backoff)===null||u===void 0||u.setMin(o),this)}randomizationFactor(o){var u;return o===void 0?this._randomizationFactor:(this._randomizationFactor=o,(u=this.backoff)===null||u===void 0||u.setJitter(o),this)}reconnectionDelayMax(o){var u;return o===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=o,(u=this.backoff)===null||u===void 0||u.setMax(o),this)}timeout(o){return arguments.length?(this._timeout=o,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(o){if(~this._readyState.indexOf("open"))return this;this.engine=new D5(this.uri,this.opts);const u=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const d=pn(u,"open",function(){c.onopen(),o&&o()}),h=x=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",x),o?o(x):this.maybeReconnectOnOpen()},p=pn(u,"error",h);if(this._timeout!==!1){const x=this._timeout,b=this.setTimeoutFn(()=>{d(),h(new Error("timeout")),u.close()},x);this.opts.autoUnref&&b.unref(),this.subs.push(()=>{this.clearTimeoutFn(b)})}return this.subs.push(d),this.subs.push(p),this}connect(o){return this.open(o)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const o=this.engine;this.subs.push(pn(o,"ping",this.onping.bind(this)),pn(o,"data",this.ondata.bind(this)),pn(o,"error",this.onerror.bind(this)),pn(o,"close",this.onclose.bind(this)),pn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(o){try{this.decoder.add(o)}catch(u){this.onclose("parse error",u)}}ondecoded(o){ao(()=>{this.emitReserved("packet",o)},this.setTimeoutFn)}onerror(o){this.emitReserved("error",o)}socket(o,u){let c=this.nsps[o];return c?this._autoConnect&&!c.active&&c.connect():(c=new r0(this,o,u),this.nsps[o]=c),c}_destroy(o){const u=Object.keys(this.nsps);for(const c of u)if(this.nsps[c].active)return;this._close()}_packet(o){const u=this.encoder.encode(o);for(let c=0;c<u.length;c++)this.engine.write(u[c],o.options)}cleanup(){this.subs.forEach(o=>o()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(o,u){var c;this.cleanup(),(c=this.engine)===null||c===void 0||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",o,u),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const o=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(()=>{o.skipReconnect||(this.emitReserved("reconnect_attempt",o.backoff.attempts),!o.skipReconnect&&o.open(d=>{d?(o._reconnecting=!1,o.reconnect(),this.emitReserved("reconnect_error",d)):o.onreconnect()}))},u);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){const o=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",o)}}const ai={};function Fr(s,o){typeof s=="object"&&(o=s,s=void 0),o=o||{};const u=R5(s,o.path||"/socket.io"),c=u.source,d=u.id,h=u.path,p=ai[d]&&h in ai[d].nsps,x=o.forceNew||o["force new connection"]||o.multiplex===!1||p;let b;return x?b=new Rd(c,o):(ai[d]||(ai[d]=new Rd(c,o)),b=ai[d]),u.query&&!o.query&&(o.query=u.queryKey),b.socket(u.path,o)}Object.assign(Fr,{Manager:Rd,Socket:r0,io:Fr,connect:Fr});let Fu=null;function Hx(){return Fu||(Fu=Fr(window.location.origin,{path:"/socket.io",transports:["websocket","polling"],reconnectionAttempts:10,reconnectionDelay:2e3})),Fu}function J5(s){const[o,u]=Y.useState(!1),[c,d]=Y.useState(null);return Y.useEffect(()=>{const h=Hx(),p=()=>u(!0),x=()=>u(!1),b=U=>{d(G=>({...G,...U,state:(U==null?void 0:U.state)||(G==null?void 0:G.state)||"idle"})),s==null||s("session",U)},E=U=>{d(G=>({...G,state:(U==null?void 0:U.state)||(G==null?void 0:G.state)||"idle",status:(U==null?void 0:U.status)||(G==null?void 0:G.status)})),s==null||s("status_update",U)},N=U=>{d(G=>({...G,...U})),s==null||s("status",U)},g=U=>{d(G=>({...G,state:"waiting_for_qr",qr:U})),s==null||s("qr",U)},T=U=>{const G=typeof U=="object"&&U&&"code"in U?String(U.code):String(U||"");d(Q=>({...Q,state:"waiting_for_qr",pairingCode:G})),s==null||s("pairing_code",G)},L=()=>{d(U=>U?{...U,qr:null}:null),s==null||s("qr_cleared",{})},K=()=>{d(U=>U?{...U,pairingCode:null}:null),s==null||s("pairing_code_cleared",{})},B=(U,...G)=>{s==null||s(U,G[0])};return h.on("connect",p),h.on("disconnect",x),h.on("session",b),h.on("status_update",E),h.on("status",N),h.on("qr",g),h.on("pairing_code",T),h.on("pairing-code",T),h.on("qr_cleared",L),h.on("pairing_code_cleared",K),h.onAny(B),u(h.connected),()=>{h.off("connect",p),h.off("disconnect",x),h.off("session",b),h.off("status_update",E),h.off("status",N),h.off("qr",g),h.off("pairing_code",T),h.off("pairing-code",T),h.off("qr_cleared",L),h.off("pairing_code_cleared",K),h.offAny(B)}},[s]),{isConnected:o,sessionStatus:c,socket:Hx()}}const es=({isOpen:s,onClose:o,title:u,children:c,footer:d,maxWidth:h})=>(Y.useEffect(()=>{const p=x=>{x.key==="Escape"&&o()};return s&&(document.addEventListener("keydown",p),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",p),document.body.style.overflow="auto"}},[s,o]),s?r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 overflow-y-auto",children:[r.jsx("button",{type:"button",className:"fixed inset-0 bg-black/65 backdrop-blur-sm border-0 p-0 cursor-default",onClick:o,"aria-label":"Close modal backdrop"}),r.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:[r.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-line",children:[r.jsx("h3",{className:"text-base md:text-lg font-bold text-text-main",children:u}),r.jsx("button",{type:"button",onClick:o,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:r.jsx(ui,{size:18})})]}),r.jsx("div",{className:"p-5 overflow-y-auto max-h-[75vh]",children:c}),d&&r.jsx("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-line bg-panel-raised/50",children:d})]})]}):null),Wa=({checked:s,onChange:o,disabled:u=!1,id:c,label:d,description:h})=>{const p=c||`toggle-${Math.random().toString(36).slice(2,8)}`;return r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[(d||h)&&r.jsxs("div",{className:"min-w-0 flex-1",children:[d&&r.jsx("label",{htmlFor:p,className:"font-semibold text-sm cursor-pointer block text-text-main",children:d}),h&&r.jsx("p",{className:"text-xs text-muted mt-0.5",children:h})]}),r.jsx("button",{type:"button",role:"switch","aria-checked":s,id:p,disabled:u,onClick:()=>o(!s),className:Xt("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",s?"bg-brand-blue":"bg-panel-hover border border-line"),children:r.jsx("span",{className:Xt("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow-md ring-0 transition duration-200 ease-in-out",s?"translate-x-5 rtl:-translate-x-5":"translate-x-0")})})]})},I5=()=>{var ss,on,il,rl,di;const{t:s,language:o}=an(),{toast:u}=Zn(),[c,d]=Y.useState({}),[h,p]=Y.useState({}),[x,b]=Y.useState(!0),[E,N]=Y.useState({}),[g,T]=Y.useState(!1),[L,K]=Y.useState(!1),[B,U]=Y.useState(!1),[G,Q]=Y.useState(""),[$,F]=Y.useState([]),[xe,Z]=Y.useState(null),[V,z]=Y.useState(""),[J,le]=Y.useState(!1),[ae,W]=Y.useState(!1),[ie,re]=Y.useState([]),[ge,A]=Y.useState(null),[I,M]=Y.useState(null),[me,X]=Y.useState(!1),qe=[{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"}],et=async()=>{try{const D=await ee.getSettings();if(D!=null&&D.settings){const ve={},Ze={};D.settings.forEach(Fe=>{ve[Fe.key]=Fe.value,Fe.type==="secret"&&(Ze[Fe.key]=!!Fe.configured)}),d(ve),p(Ze)}}catch(D){u(D.message,"error")}finally{b(!1)}};Y.useEffect(()=>{et()},[]);const Ce=async(D,ve,Ze=!1)=>{d(Fe=>({...Fe,[D]:ve}));try{const Fe=await ee.updateSetting(D,ve);if(Ze||u(s("savedSuccessfully"),"success"),D.endsWith("_api_key")&&(d(Re=>({...Re,[D]:""})),p(Re=>({...Re,[D]:!!ve}))),Fe!=null&&Fe.settings&&Array.isArray(Fe.settings)){const Re={},In={};Fe.settings.forEach(He=>{He.type==="secret"?(In[He.key]=!!He.configured,Re[He.key]=""):Re[He.key]=He.value}),d(He=>({...He,...Re})),p(He=>({...He,...In}))}}catch(Fe){u(Fe.message,"error")}},w=c.ai_provider||"gemini",v=qe.find(D=>{var ve,Ze;return D.provider!==w?!1:!!(D.id==="gemini"||D.id==="anthropic"||D.id==="groq"&&((ve=c.openai_base_url)!=null&&ve.includes("groq.com"))||D.id==="ollama"&&((Ze=c.openai_base_url)!=null&&Ze.includes("11434"))||D.id==="openai"&&(!c.openai_base_url||c.openai_base_url.includes("api.openai.com")))})||qe[0],P=async D=>{const ve={...c,ai_provider:D.provider};D.baseUrlSetting&&(ve[D.baseUrlSetting]=D.defaultBaseUrl),D.defaultModel&&(ve[D.modelSetting]=D.defaultModel),d(ve);try{await ee.updateSetting("ai_provider",D.provider),D.baseUrlSetting&&await ee.updateSetting(D.baseUrlSetting,D.defaultBaseUrl),D.defaultModel&&await ee.updateSetting(D.modelSetting,D.defaultModel),u(o==="ar"?`تم التبديل إلى ${D.name}`:`Switched provider to ${D.name}`,"success")}catch(Ze){u(Ze.message,"error")}},te=async(D=!1)=>{T(!0);const ve=String(c[v.keySetting]||"").trim(),Ze=!!h[v.keySetting];try{const Fe={provider:v.provider,refresh:D};ve&&(Fe.apiKey=ve),v.baseUrlSetting&&c[v.baseUrlSetting]&&(Fe.baseUrl=c[v.baseUrlSetting]);const Re=await ee.fetchAiModels(Fe);Re&&(Re.success||Re.fallback)?(N(In=>{var He;return{...In,[v.id]:{live:!!Re.live,requiresApiKey:!!Re.requiresApiKey,fallback:!!Re.fallback,models:Re.models||[],cached:!!Re.cached,error:Re.success||(He=Re.error)==null?void 0:He.message}}}),Re.live&&Re.success?u(o==="ar"?`تم التحقق بنجاح وجلب ${Re.models.length} نموذجاً متاحاً لحسابك`:`Discovered ${Re.models.length} live models available for your account`,"success"):Re.requiresApiKey?D&&u(o==="ar"?"يرجى إدخال مفتاح API أولاً لاكتشاف النماذج المتاحة لحسابك":"Enter an API key to discover account models","info"):!Re.success&&Re.error&&u(Re.error.message||"Failed to discover models","error")):Re&&!Re.success&&Re.error&&(N(In=>{var He;return{...In,[v.id]:{live:!1,requiresApiKey:!(Ze||ve),fallback:!0,models:Re.models||[],error:(He=Re.error)==null?void 0:He.message}}}),u(Re.error.message||"Failed to discover models","error"))}catch(Fe){u(Fe.message||"Failed to fetch models","error")}finally{T(!1)}};Y.useEffect(()=>{x||te(!1)},[v.id,h[v.keySetting],x]);const ye=((ss=E[v.id])==null?void 0:ss.models)||[],fe=!!((on=E[v.id])!=null&&on.live),Se=!!(((il=E[v.id])==null?void 0:il.requiresApiKey)??!h[v.keySetting]),se=c[v.modelSetting]||v.defaultModel,oe=ye.find(D=>D.id.toLowerCase()===se.toLowerCase())||{displayName:se,provider:v.provider,capabilities:{textInput:!0,textOutput:!0,vision:!1,audioInput:!1,stt:!1,videoInput:!1,pdfInput:!1},capabilitySource:"unknown"},tt=!!oe.capabilities.vision,ln=!!oe.capabilities.stt,sn=oe.capabilitySource==="provider"||oe.capabilitySource==="seed",Dt=c.ai_auto_detect_capabilities!==!1,Pe=sn&&Dt&&!tt,ke=sn&&Dt&&!ln;Y.useEffect(()=>{x||(Pe&&c.ai_vision_enabled&&Ce("ai_vision_enabled",!1,!0),ke&&c.ai_stt_enabled&&Ce("ai_stt_enabled",!1,!0))},[se,Pe,ke,x]);const Kt=async()=>{try{const D=await ee.getPersona(),ve=D==null?void 0:D.persona;Q(typeof ve=="string"?ve:(ve==null?void 0:ve.body)||""),U(!0)}catch(D){u(D.message,"error")}},Ta=async()=>{try{await ee.updatePersona(G),u(o==="ar"?"تم تحديث برومبت الشخصية بنجاح!":"Persona updated successfully!","success"),U(!1)}catch(D){u(D.message,"error")}},rn=async()=>{try{const D=await ee.getMemoryFiles(),ve=((D==null?void 0:D.scopes)||[]).map(Ze=>({scope:Ze.scope,label:Ze.label,entries:Ze.entries??0}));F(ve.some(Ze=>Ze.scope==="global")?ve:[{scope:"global",label:"Global memory",entries:0},...ve])}catch(D){F([{scope:"global",label:"Global memory",entries:0}]),u(D.message,"error")}},al=async D=>{Z(D),z(""),le(!0);try{const ve=await ee.getMemoryFile(D);z((ve==null?void 0:ve.content)||"")}catch(ve){u(ve.message,"error")}finally{le(!1)}},ll=async()=>{Z("global"),le(!0),await rn();try{const D=await ee.getMemoryFile("global");z((D==null?void 0:D.content)||"")}catch(D){u(D.message,"error")}finally{le(!1)}},Jn=async()=>{if(xe)try{await ee.updateMemoryFile(xe,V),u(o==="ar"?"تم حفظ ملف الذاكرة بنجاح!":"Memory file updated!","success"),rn(),Z(null)}catch(D){u(D.message,"error")}},as=async()=>{W(!0),A(null),M(null),X(!0);try{const D=await ee.getAiConversations();re((D==null?void 0:D.conversations)||[])}catch(D){u(D.message,"error")}finally{X(!1)}},sl=async D=>{A(D),M(null),X(!0);try{const ve=await ee.getAiConversation(D);M(ve||null)}catch(ve){u(ve.message,"error")}finally{X(!1)}},ls=D=>D?new Date(D).toLocaleString(o==="ar"?"ar-EG":"en-GB",{dateStyle:"medium",timeStyle:"short"}):"—";return x?r.jsxs("div",{className:"flex items-center justify-center p-12 text-muted",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin mr-2"}),r.jsx("span",{className:"text-sm font-semibold",children:s("starting")})]}):r.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[r.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:[r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[r.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:r.jsx(Ld,{size:22,className:"sm:w-6 sm:h-6"})}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("h2",{className:"text-base sm:text-xl font-extrabold text-text-main truncate",children:s("aiTitle")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted truncate",children:s("aiSubtitle")})]})]}),r.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:[r.jsx("span",{className:"text-xs font-bold text-muted hidden sm:inline",children:c.ai_agent?o==="ar"?"مفعل":"Enabled":o==="ar"?"معطل":"Disabled"}),r.jsx(Wa,{checked:!!c.ai_agent,onChange:D=>Ce("ai_agent",D)})]})]}),r.jsx("div",{className:"flex items-center gap-2 pt-1 border-t border-line/40",children:r.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:[r.jsx("span",{className:"pulse-dot"}),r.jsx("span",{children:c.ai_agent?s("aiAgentEnabled"):o==="ar"?"مساعد الذكاء الاصطناعي معطل":"AI Assistant Disabled"})]})})]}),r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-line",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Ad,{size:18,className:"text-brand-cyan shrink-0"}),r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:s("aiProvider")})]}),r.jsxs("div",{className:"flex items-center gap-2 self-start sm:self-auto",children:[r.jsx("span",{className:"text-xs text-muted font-medium",children:o==="ar"?"المزود النشط:":"Active:"}),r.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:[v.name," • ",r.jsx("span",{className:"font-mono",children:se})]})]})]}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-2.5 sm:gap-3",children:qe.map(D=>{const ve=v.id===D.id;return r.jsxs("button",{type:"button",onClick:()=>P(D),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 ${ve?"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:[r.jsxs("div",{className:"flex items-center justify-between w-full",children:[r.jsx("span",{className:"font-bold text-xs sm:text-sm text-text-main",children:D.name}),ve?r.jsx("span",{className:"w-5 h-5 rounded-full bg-brand-blue text-white flex items-center justify-center shrink-0",children:r.jsx($r,{size:12,strokeWidth:3})}):r.jsx("span",{className:"w-2 h-2 rounded-full bg-line"})]}),r.jsx("span",{className:"text-[10px] sm:text-[11px] font-mono text-muted truncate block",children:D.defaultModel})]},D.id)})}),Se&&r.jsxs("div",{className:"p-3.5 rounded-xl bg-amber-500/10 border border-amber-500/25 flex items-start gap-3",children:[r.jsx(Kr,{size:18,className:"text-amber-500 shrink-0 mt-0.5"}),r.jsxs("div",{className:"text-xs text-text-main",children:[r.jsx("p",{className:"font-bold",children:s("connectKeyFirstPrompt")}),r.jsx("p",{className:"text-muted mt-0.5",children:o==="ar"?"النماذج المعروضة أدناه هي نماذج مقترحة من الدليل المحلي وليست مؤكدة لحسابك حتى يتم ربط المفتاح.":"Models shown below are catalog recommendations and are not verified for your account until a key is configured."})]})]}),((rl=E[v.id])==null?void 0:rl.error)&&r.jsxs("div",{className:"p-3 rounded-xl bg-danger/10 border border-danger/25 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs text-danger font-semibold",children:[r.jsx(Wr,{size:16,className:"shrink-0"}),r.jsx("span",{children:(di=E[v.id])==null?void 0:di.error})]}),r.jsx("button",{type:"button",onClick:()=>te(!0),className:"text-xs font-bold underline hover:opacity-80 shrink-0",children:s("refreshModels")})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 pt-4 border-t border-line",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("label",{htmlFor:"input-api-key",className:"block text-xs font-bold text-muted",children:s("apiKey")}),h[v.keySetting]&&r.jsxs("span",{className:"text-[10px] text-ok font-semibold flex items-center gap-1",children:[r.jsx(ci,{size:11}),o==="ar"?"محفوظ":"Saved"]})]}),r.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[v.keySetting]||"",onChange:D=>d({...c,[v.keySetting]:D.target.value}),onBlur:D=>Ce(v.keySetting,D.target.value),placeholder:h[v.keySetting]?"••••••••••••":o==="ar"?"أدخل المفتاح":"Enter API key"})]}),v.baseUrlSetting&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{htmlFor:"input-base-url",className:"block text-xs font-bold text-muted",children:s("baseUrl")}),r.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[v.baseUrlSetting]||"",onChange:D=>{v.baseUrlSetting&&d({...c,[v.baseUrlSetting]:D.target.value})},onBlur:D=>{v.baseUrlSetting&&Ce(v.baseUrlSetting,D.target.value)},placeholder:v.defaultBaseUrl})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("label",{htmlFor:"input-model-name",className:"block text-xs font-bold text-muted",children:s("modelName")}),fe?r.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-bold bg-ok/15 text-ok border border-ok/30",children:s("sourceLive")}):r.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:s("sourceSeed")})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",onClick:()=>K(!L),className:"text-[11px] text-brand-cyan hover:underline font-semibold",children:L?o==="ar"?"القائمة":"List":o==="ar"?"مخصص":"Custom"}),r.jsxs("button",{type:"button",onClick:()=>te(!0),disabled:g,className:"inline-flex items-center gap-1 text-[11px] text-brand-blue hover:text-brand-blue/80 font-bold",title:s("refreshModels"),children:[r.jsx(eo,{size:11,className:g?"animate-spin":""}),r.jsx("span",{children:s(g?"refreshing":"refreshModels")})]})]})]}),L?r.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[v.modelSetting]||"",onChange:D=>d({...c,[v.modelSetting]:D.target.value}),onBlur:D=>Ce(v.modelSetting,D.target.value),placeholder:v.defaultModel}):r.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:D=>{Ce(v.modelSetting,D.target.value)},children:[r.jsx("optgroup",{label:s(fe?"modelsAvailableLive":"modelsRecommendedSeed"),children:ye.map(D=>r.jsxs("option",{value:D.id,children:[D.displayName&&D.displayName!==D.id?`${D.displayName} (${D.id})`:D.id,D.recommended?" ★":""]},D.id))}),!ye.some(D=>D.id.toLowerCase()===se.toLowerCase())&&r.jsxs("option",{value:se,children:[se," (current)"]})]})]})]}),r.jsxs("div",{className:"p-3.5 rounded-xl border border-line bg-panel-raised/60 flex flex-col gap-2.5",children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[r.jsxs("span",{className:"font-bold text-text-main flex items-center gap-1.5",children:[r.jsx(Ad,{size:14,className:"text-brand-cyan shrink-0"}),o==="ar"?"القدرات:":"Capabilities:"," ",r.jsx("span",{className:"font-mono text-brand-cyan",children:oe.displayName||se})]}),r.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full border ${oe.capabilitySource==="provider"?"bg-ok/15 text-ok border-ok/30":oe.capabilitySource==="seed"?"bg-brand-blue/15 text-brand-blue border-brand-blue/30":"bg-muted/15 text-muted border-line"}`,children:oe.capabilitySource==="provider"?s("sourceLive"):oe.capabilitySource==="seed"?s("sourceSeed"):s("sourceUnknown")})]}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2 text-xs",children:[{icon:$l,label:s("capVision"),on:tt},{icon:Gu,label:s("capStt"),on:ln},{icon:a2,label:s("capAudio"),on:!!oe.capabilities.audioInput},{icon:Xr,label:s("capText"),on:!!(oe.capabilities.textInput&&oe.capabilities.textOutput)},{icon:Xr,label:s("capPdf"),on:!!oe.capabilities.pdfInput},{icon:$l,label:s("capVideo"),on:!!oe.capabilities.videoInput}].map(({icon:D,label:ve,on:Ze})=>r.jsxs("div",{className:`p-2 rounded-lg border flex items-center justify-between ${sn&&Ze?"bg-ok/10 border-ok/25 text-ok":"bg-panel border-line text-muted"}`,children:[r.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[r.jsx(D,{size:14}),r.jsx("span",{children:ve})]}),r.jsx("span",{className:"text-[10px] font-bold",children:sn?s(Ze?"supported":"unsupported"):"—"})]},ve))})]})]}),r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-4",children:[r.jsx("h3",{className:"text-base font-bold text-text-main",children:s("capabilities")}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[r.jsxs("div",{className:"relative rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[r.jsx("div",{className:"absolute top-3.5 end-3.5",children:r.jsx(Wa,{checked:Pe?!1:!!c.ai_vision_enabled,disabled:Pe,onChange:D=>{Pe||Ce("ai_vision_enabled",D)}})}),r.jsxs("div",{className:"pe-12",children:[r.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[r.jsx($l,{size:17,className:Pe?"text-muted shrink-0":"text-brand-cyan shrink-0"}),r.jsx("span",{className:"font-bold text-sm",children:s("aiVision")})]}),r.jsx("p",{className:"text-xs text-muted leading-relaxed",children:s("aiVisionDesc")}),Pe&&r.jsxs("p",{className:"text-[11px] text-amber-500 font-semibold mt-2 flex items-center gap-1",children:[r.jsx(Kr,{size:13,className:"shrink-0"}),r.jsx("span",{children:s("visionUnsupportedNotice")})]})]})]}),r.jsxs("div",{className:"relative rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[r.jsx("div",{className:"absolute top-3.5 end-3.5",children:r.jsx(Wa,{checked:ke?!1:!!(c.ai_stt_enabled??!0),disabled:ke,onChange:D=>{ke||Ce("ai_stt_enabled",D)}})}),r.jsxs("div",{className:"pe-12",children:[r.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[r.jsx(Gu,{size:17,className:ke?"text-muted shrink-0":"text-purple-400 shrink-0"}),r.jsx("span",{className:"font-bold text-sm",children:s("aiSttEnabled")})]}),r.jsx("p",{className:"text-xs text-muted leading-relaxed",children:s("aiSttEnabledDesc")}),ke&&r.jsxs("p",{className:"text-[11px] text-amber-500 font-semibold mt-2 flex items-center gap-1",children:[r.jsx(Kr,{size:13,className:"shrink-0"}),r.jsx("span",{children:s("sttUnsupportedNotice")})]})]})]}),r.jsxs("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[r.jsx(Gu,{size:17,className:"text-purple-400 shrink-0"}),r.jsx("span",{className:"font-bold text-sm",children:s("aiStt")})]}),r.jsx("p",{className:"text-xs text-muted leading-relaxed",children:s("sttDesc")})]}),r.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:ke,onChange:D=>{ke||Ce("ai_stt_provider",D.target.value)},children:[r.jsx("option",{value:"auto",children:s("sttAuto")}),r.jsx("option",{value:"gemini",children:s("sttGemini")}),r.jsx("option",{value:"openai",children:s("sttOpenAI")})]})]}),r.jsxs("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 text-text-main mb-1",children:[r.jsx(ri,{size:17,className:"text-ok shrink-0"}),r.jsx("span",{className:"font-bold text-sm",children:s("botLanguage")})]}),r.jsx("p",{className:"text-xs text-muted leading-relaxed",children:s("botLanguageDesc")})]}),r.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:D=>Ce("bot_language",D.target.value),children:[r.jsx("option",{value:"auto",children:s("langAuto")}),r.jsx("option",{value:"ar",children:s("langAr")}),r.jsx("option",{value:"en",children:s("langEn")})]})]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-5",children:[r.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:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2.5 text-text-main mb-2",children:[r.jsx(Xr,{size:20,className:"text-brand-blue shrink-0"}),r.jsx("h3",{className:"text-base font-bold",children:s("personaPrompt")})]}),r.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:s("personaDesc")})]}),r.jsx("button",{type:"button",onClick:Kt,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:r.jsx("span",{children:s("editPersona")})})]}),r.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:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2.5 text-text-main mb-2",children:[r.jsx(Rv,{size:20,className:"text-brand-cyan shrink-0"}),r.jsx("h3",{className:"text-base font-bold",children:s("memoryFiles")})]}),r.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:s("memoryDesc")})]}),r.jsx("button",{type:"button",onClick:ll,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:r.jsx("span",{children:s("manageMemory")})})]}),r.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:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2.5 text-text-main mb-2",children:[r.jsx(Fv,{size:20,className:"text-brand-blue shrink-0"}),r.jsx("h3",{className:"text-base font-bold",children:s("aiInspector")})]}),r.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:s("aiInspectorDesc")})]}),r.jsx("button",{type:"button",onClick:as,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:r.jsx("span",{children:s("openInspector")})})]})]}),r.jsx(es,{isOpen:B,onClose:()=>U(!1),title:s("personaPrompt"),maxWidth:"750px",footer:r.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[r.jsx("button",{type:"button",onClick:()=>U(!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:s("cancel")}),r.jsxs("button",{type:"button",onClick:Ta,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:[r.jsx(to,{size:16}),r.jsx("span",{children:s("save")})]})]}),children:r.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:D=>Q(D.target.value)})}),r.jsx(es,{isOpen:!!xe,onClose:()=>Z(null),title:s("memoryFiles"),maxWidth:"900px",footer:r.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[r.jsx("button",{type:"button",onClick:()=>Z(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:s("cancel")}),r.jsxs("button",{type:"button",onClick:Jn,disabled:J,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 disabled:opacity-50",children:[r.jsx(to,{size:16}),r.jsx("span",{children:s("save")})]})]}),children:r.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[r.jsx("div",{className:"md:w-60 shrink-0 flex flex-col gap-1.5 md:max-h-[420px] overflow-y-auto",children:$.map(D=>{const ve=D.scope==="global",Ze=xe===D.scope;return r.jsxs("button",{type:"button",onClick:()=>al(D.scope),className:`text-start p-2.5 rounded-xl border transition-colors ${Ze?"bg-brand-blue/15 border-brand-blue/60":"bg-panel-raised border-line hover:bg-panel-hover"}`,children:[r.jsxs("span",{className:"flex items-center gap-2 font-bold text-xs text-text-main min-w-0",children:[ve?r.jsx(ri,{size:14,className:"text-brand-cyan shrink-0"}):r.jsx(Cd,{size:14,className:"text-brand-blue shrink-0"}),r.jsx("span",{className:"truncate",children:ve?s("memoryGlobalScope"):D.scope})]}),r.jsxs("span",{className:"block text-[10px] text-muted mt-1",children:[s(ve?"memoryGlobalScopeHint":"memoryChatScopeHint")," · ",s("memoryEntriesCount").replace("{n}",String(D.entries))]})]},D.scope)})}),r.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-2",children:[r.jsx("p",{className:"text-[11px] text-muted leading-relaxed",children:s("memoryProseHint")}),J?r.jsxs("div",{className:"flex items-center justify-center min-h-[340px] text-muted",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin mr-2"}),r.jsx("span",{className:"text-sm font-semibold",children:s("starting")})]}):r.jsx("textarea",{className:"w-full min-h-[340px] flex-1 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:V,onChange:D=>z(D.target.value),placeholder:s("memoryEditorPlaceholder")})]})]})}),r.jsx(es,{isOpen:ae,onClose:()=>W(!1),title:s("aiInspector"),maxWidth:"750px",footer:r.jsx("div",{className:"flex items-center justify-end gap-2.5 w-full",children:r.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:s("cancel")})}),children:me?r.jsxs("div",{className:"flex items-center justify-center min-h-[280px] text-muted",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin mr-2"}),r.jsx("span",{className:"text-sm font-semibold",children:s("starting")})]}):ge?r.jsxs("div",{className:"flex flex-col gap-2.5",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsxs("button",{type:"button",onClick:()=>A(null),className:"text-xs font-bold text-brand-cyan hover:underline",children:["← ",s("backToList")]}),r.jsx("span",{className:"text-[10px] text-muted font-mono truncate",children:ge})]}),(I==null?void 0:I.truncated)&&r.jsx("p",{className:"text-[11px] text-amber-500 font-semibold",children:s("convTruncated")}),r.jsxs("div",{className:"flex flex-col gap-1.5 max-h-[420px] overflow-y-auto",children:[(I==null?void 0:I.messages.length)===0&&r.jsx("p",{className:"text-xs text-muted text-center py-6",children:s("noConversations")}),I==null?void 0:I.messages.map((D,ve)=>r.jsxs("div",{className:`p-2.5 rounded-xl border text-xs ${D.kind==="tool"||D.kind==="toolResult"?"bg-panel border-line text-muted font-mono":D.role==="model"?"bg-brand-blue/10 border-brand-blue/25 text-text-main":"bg-panel-raised border-line text-text-main"}`,children:[D.kind==="text"&&r.jsx("p",{className:"whitespace-pre-wrap break-words leading-relaxed",children:D.text}),D.kind==="media"&&r.jsxs("span",{children:["📎 ",D.mimeType||s("convMedia")]}),D.kind==="tool"&&r.jsxs("span",{children:["⚙️ ",D.name]}),D.kind==="toolResult"&&r.jsxs("span",{children:["↩️ ",D.name]})]},ve))]})]}):r.jsxs("div",{className:"flex flex-col gap-1.5",children:[ie.length===0&&r.jsx("p",{className:"text-xs text-muted text-center py-8",children:s("noConversations")}),ie.map(D=>r.jsxs("button",{type:"button",onClick:()=>sl(D.chatId),className:"text-start p-3 rounded-xl border border-line bg-panel-raised hover:bg-panel-hover transition-colors",children:[r.jsxs("span",{className:"flex items-center gap-2 font-bold text-xs text-text-main",children:[r.jsx(Cd,{size:14,className:"text-brand-blue shrink-0"}),r.jsx("span",{className:"truncate font-mono",children:D.chatId})]}),r.jsxs("span",{className:"block text-[10px] text-muted mt-1",children:[s("convTurns").replace("{n}",String(D.turns))," · ",ls(D.updatedAt)]})]},D.chatId))]})})]})},P5=()=>{const{t:s,language:o}=an(),{toast:u}=Zn(),[c,d]=Y.useState([]),[h,p]=Y.useState("!"),[x,b]=Y.useState(!1),[E,N]=Y.useState("!"),[g,T]=Y.useState(""),[L,K]=Y.useState(!0),[B,U]=Y.useState(null),[G,Q]=Y.useState([]),[$,F]=Y.useState(""),[xe,Z]=Y.useState(!1),V=async()=>{try{const A=await ee.getCommands();A!=null&&A.commands&&d(A.commands),A!=null&&A.prefix&&(p(A.prefix),N(A.prefix))}catch(A){u(A.message,"error")}finally{K(!1)}};Y.useEffect(()=>{V()},[]);const z=async()=>{const A=E.trim();if(!A||A.length>3){u(s("prefixValidation"),"error");return}try{await ee.updatePrefix(A),p(A),b(!1),u(`${s("prefixUpdated")} (${A})`,"success")}catch(I){u(I.message,"error")}},J=async(A,I)=>{d(M=>M.map(me=>me.name===A.name?{...me,enabled:I,overridden:!0}:me));try{await ee.updateCommand(A.name,{enabled:I}),u(o==="ar"?`تم ${I?"تفعيل":"تعطيل"} الأمر '${A.name}'`:`Command '${A.name}' ${I?"enabled":"disabled"}`,"success")}catch(M){u(M.message,"error"),V()}},le=async(A,I)=>{d(M=>M.map(me=>me.name===A.name?{...me,permission:I,overridden:!0}:me));try{await ee.updateCommand(A.name,{permission:I}),u(o==="ar"?`تم تحديث رتبة '${A.name}'`:`Permission for '${A.name}' updated`,"success")}catch(M){u(M.message,"error"),V()}},ae=A=>{U(A),Q(Array.isArray(A.aliases)?[...A.aliases]:[]),F("")},W=()=>{const A=$.trim().replace(/^[!/#.?$]+/,"").toLowerCase();if(A){if(G.includes(A)){u(o==="ar"?"هذا الاسم المستعار مضاف بالفعل":"Alias already added","warning");return}Q([...G,A]),F("")}},ie=A=>{Q(G.filter(I=>I!==A))},re=async()=>{if(B){Z(!0);try{await ee.updateCommand(B.name,{aliases:G}),d(A=>A.map(I=>I.name===B.name?{...I,aliases:G}:I)),u(s("savedSuccessfully"),"success"),U(null)}catch(A){u(A.message,"error")}finally{Z(!1)}}},ge=c.filter(A=>A.name.toLowerCase().includes(g.toLowerCase())||A.description.toLowerCase().includes(g.toLowerCase())||A.aliases.some(I=>I.toLowerCase().includes(g.toLowerCase())));return r.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[r.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:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[r.jsx("h2",{className:"text-lg md:text-xl font-bold text-text-main",children:s("commands")}),r.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-xl border border-line bg-panel-raised",children:[r.jsxs("span",{className:"text-xs text-muted font-semibold",children:[s("activePrefix"),":"]}),x?r.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[r.jsx("input",{type:"text",maxLength:3,value:E,onChange:A=>N(A.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:A=>{A.key==="Enter"&&z(),A.key==="Escape"&&b(!1)}}),r.jsx("button",{type:"button",onClick:z,className:"px-2 h-7 rounded-lg bg-brand-blue text-white font-bold text-xs hover:bg-brand-blue/90 transition-colors",children:s("save")}),r.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:s("cancel")})]}):r.jsx("button",{type:"button",onClick:()=>{N(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:o==="ar"?"اضغط لتعديل البادئة":"Click to change prefix",children:h})]})]}),r.jsx("p",{className:"text-xs md:text-sm text-muted mt-1",children:o==="ar"?"إدارة رتب الأوامر والأسماء المستعارة وتفعيلها أو تعطيلها مباشرة":"Manage role permissions, edit aliases, or enable/disable bot commands live"})]}),r.jsxs("div",{className:"relative w-full md:w-72 shrink-0",children:[r.jsx(cb,{size:18,className:"absolute start-3.5 top-3 text-muted"}),r.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:s("searchPlaceholder"),value:g,onChange:A=>T(A.target.value)})]})]}),r.jsx("div",{className:"rounded-2xl border border-line bg-panel overflow-hidden shadow-sm overflow-x-auto",children:r.jsxs("table",{className:"w-full min-w-[760px] text-start border-collapse text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"bg-panel-raised border-b border-line text-xs font-bold text-muted uppercase tracking-wider",children:[r.jsx("th",{className:"px-4 py-3.5 text-start",children:s("thCommand")}),r.jsx("th",{className:"px-4 py-3.5 text-start",children:s("thAliases")}),r.jsx("th",{className:"px-4 py-3.5 text-start",children:s("thDescription")}),r.jsx("th",{className:"px-4 py-3.5 text-start",children:s("thScope")}),r.jsx("th",{className:"px-4 py-3.5 text-start",children:s("thRequiredRole")}),r.jsx("th",{className:"px-4 py-3.5 text-center",children:s("thStatus")})]})}),r.jsx("tbody",{className:"divide-y divide-line/40",children:L?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-12 text-muted",children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-xs",children:s("loading")})]})})}):ge.map(A=>{var I;return r.jsxs("tr",{className:"hover:bg-panel-hover/50 transition-colors",children:[r.jsx("td",{className:"px-4 py-3.5 font-mono font-bold text-brand-cyan",children:r.jsxs("bdi",{children:[h,A.name]})}),r.jsx("td",{className:"px-4 py-3.5",children:r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[(I=A.aliases)!=null&&I.length?A.aliases.map(M=>r.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:r.jsxs("bdi",{children:[h,M]})},M)):r.jsx("span",{className:"text-xs text-muted/60",children:"—"}),r.jsx("button",{type:"button",onClick:()=>ae(A),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:s("editAliases"),children:r.jsx(Jv,{size:12})})]})}),r.jsx("td",{className:"px-4 py-3.5 max-w-xs text-text-main text-xs md:text-sm",children:A.description}),r.jsx("td",{className:"px-4 py-3.5",children:r.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:A.chat==="all"?o==="ar"?"الكل":"All":A.chat==="group"?o==="ar"?"المجموعات":"Group":o==="ar"?"خاص":"Private"})}),r.jsx("td",{className:"px-4 py-3.5",children:r.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:A.permission,onChange:M=>le(A,M.target.value),children:[r.jsx("option",{value:"MEMBERS",children:o==="ar"?"الجميع (الأعضاء)":"Members (Everyone)"}),r.jsx("option",{value:"ADMIN_ONLY",children:o==="ar"?"مشرفو المجموعة":"Group Admins"}),r.jsx("option",{value:"OWNER_ONLY",children:o==="ar"?"مالك البوت فقط":"Bot Owner Only"})]})}),r.jsx("td",{className:"px-4 py-3.5 text-center",children:r.jsx(Wa,{checked:A.enabled,onChange:M=>J(A,M)})})]},A.name)})})]})}),r.jsx(es,{isOpen:!!B,onClose:()=>U(null),title:`${s("aliasesFor")} ${h}${(B==null?void 0:B.name)||""}`,footer:r.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[r.jsx("button",{type:"button",onClick:()=>U(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:s("cancel")}),r.jsx("button",{type:"button",onClick:re,disabled:xe,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:s(xe?"saving":"save")})]}),children:r.jsxs("div",{className:"flex flex-col gap-4 py-1",children:[r.jsx("p",{className:"text-xs sm:text-sm text-muted",children:o==="ar"?"الأسماء المستعارة تتيح استدعاء هذا الأمر بأسماء بديلة (مثل: p بدلاً من ping).":"Aliases allow invoking this command using alternative names."}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-bold text-muted block",children:s("thAliases")}),r.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(A=>r.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:[r.jsxs("span",{children:[h,A]}),r.jsx("button",{type:"button",onClick:()=>ie(A),className:"text-muted hover:text-danger p-0.5 rounded transition-colors",children:r.jsx(ui,{size:13})})]},A)):r.jsx("span",{className:"text-xs text-muted/60 px-1",children:s("noAliases")})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{htmlFor:"new-alias-input",className:"text-xs font-bold text-muted block",children:s("addAlias")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(n2,{size:16,className:"absolute start-3 top-3 text-muted"}),r.jsx("input",{id:"new-alias-input",type:"text",value:$,onChange:A=>F(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),W())},placeholder:s("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"})]}),r.jsxs("button",{type:"button",onClick:W,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:[r.jsx(tb,{size:16}),r.jsx("span",{children:s("add")})]})]})]})]})})]})};var Fl={},$u,Gx;function F5(){return Gx||(Gx=1,$u=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),$u}var Wu={},ja={},Vx;function tl(){if(Vx)return ja;Vx=1;let s;const o=[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 ja.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},ja.getSymbolTotalCodewords=function(c){return o[c]},ja.getBCHDigit=function(u){let c=0;for(;u!==0;)c++,u>>>=1;return c},ja.setToSJISFunction=function(c){if(typeof c!="function")throw new Error('"toSJISFunc" is not a valid function.');s=c},ja.isKanjiModeEnabled=function(){return typeof s<"u"},ja.toSJIS=function(c){return s(c)},ja}var ed={},Yx;function Zd(){return Yx||(Yx=1,(function(s){s.L={bit:1},s.M={bit:0},s.Q={bit:3},s.H={bit:2};function o(u){if(typeof u!="string")throw new Error("Param is not a string");switch(u.toLowerCase()){case"l":case"low":return s.L;case"m":case"medium":return s.M;case"q":case"quartile":return s.Q;case"h":case"high":return s.H;default:throw new Error("Unknown EC Level: "+u)}}s.isValid=function(c){return c&&typeof c.bit<"u"&&c.bit>=0&&c.bit<4},s.from=function(c,d){if(s.isValid(c))return c;try{return o(c)}catch{return d}}})(ed)),ed}var td,Qx;function $5(){if(Qx)return td;Qx=1;function s(){this.buffer=[],this.length=0}return s.prototype={get:function(o){const u=Math.floor(o/8);return(this.buffer[u]>>>7-o%8&1)===1},put:function(o,u){for(let c=0;c<u;c++)this.putBit((o>>>u-c-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const u=Math.floor(this.length/8);this.buffer.length<=u&&this.buffer.push(0),o&&(this.buffer[u]|=128>>>this.length%8),this.length++}},td=s,td}var nd,Xx;function W5(){if(Xx)return nd;Xx=1;function s(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return s.prototype.set=function(o,u,c,d){const h=o*this.size+u;this.data[h]=c,d&&(this.reservedBit[h]=!0)},s.prototype.get=function(o,u){return this.data[o*this.size+u]},s.prototype.xor=function(o,u,c){this.data[o*this.size+u]^=c},s.prototype.isReserved=function(o,u){return this.reservedBit[o*this.size+u]},nd=s,nd}var ad={},Kx;function eN(){return Kx||(Kx=1,(function(s){const o=tl().getSymbolSize;s.getRowColCoords=function(c){if(c===1)return[];const d=Math.floor(c/7)+2,h=o(c),p=h===145?26:Math.ceil((h-13)/(2*d-2))*2,x=[h-7];for(let b=1;b<d-1;b++)x[b]=x[b-1]-p;return x.push(6),x.reverse()},s.getPositions=function(c){const d=[],h=s.getRowColCoords(c),p=h.length;for(let x=0;x<p;x++)for(let b=0;b<p;b++)x===0&&b===0||x===0&&b===p-1||x===p-1&&b===0||d.push([h[x],h[b]]);return d}})(ad)),ad}var ld={},Zx;function tN(){if(Zx)return ld;Zx=1;const s=tl().getSymbolSize,o=7;return ld.getPositions=function(c){const d=s(c);return[[0,0],[d-o,0],[0,d-o]]},ld}var sd={},Jx;function nN(){return Jx||(Jx=1,(function(s){s.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};s.isValid=function(d){return d!=null&&d!==""&&!isNaN(d)&&d>=0&&d<=7},s.from=function(d){return s.isValid(d)?parseInt(d,10):void 0},s.getPenaltyN1=function(d){const h=d.size;let p=0,x=0,b=0,E=null,N=null;for(let g=0;g<h;g++){x=b=0,E=N=null;for(let T=0;T<h;T++){let L=d.get(g,T);L===E?x++:(x>=5&&(p+=o.N1+(x-5)),E=L,x=1),L=d.get(T,g),L===N?b++:(b>=5&&(p+=o.N1+(b-5)),N=L,b=1)}x>=5&&(p+=o.N1+(x-5)),b>=5&&(p+=o.N1+(b-5))}return p},s.getPenaltyN2=function(d){const h=d.size;let p=0;for(let x=0;x<h-1;x++)for(let b=0;b<h-1;b++){const E=d.get(x,b)+d.get(x,b+1)+d.get(x+1,b)+d.get(x+1,b+1);(E===4||E===0)&&p++}return p*o.N2},s.getPenaltyN3=function(d){const h=d.size;let p=0,x=0,b=0;for(let E=0;E<h;E++){x=b=0;for(let N=0;N<h;N++)x=x<<1&2047|d.get(E,N),N>=10&&(x===1488||x===93)&&p++,b=b<<1&2047|d.get(N,E),N>=10&&(b===1488||b===93)&&p++}return p*o.N3},s.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)*o.N4};function u(c,d,h){switch(c){case s.Patterns.PATTERN000:return(d+h)%2===0;case s.Patterns.PATTERN001:return d%2===0;case s.Patterns.PATTERN010:return h%3===0;case s.Patterns.PATTERN011:return(d+h)%3===0;case s.Patterns.PATTERN100:return(Math.floor(d/2)+Math.floor(h/3))%2===0;case s.Patterns.PATTERN101:return d*h%2+d*h%3===0;case s.Patterns.PATTERN110:return(d*h%2+d*h%3)%2===0;case s.Patterns.PATTERN111:return(d*h%3+(d+h)%2)%2===0;default:throw new Error("bad maskPattern:"+c)}}s.applyMask=function(d,h){const p=h.size;for(let x=0;x<p;x++)for(let b=0;b<p;b++)h.isReserved(b,x)||h.xor(b,x,u(d,b,x))},s.getBestMask=function(d,h){const p=Object.keys(s.Patterns).length;let x=0,b=1/0;for(let E=0;E<p;E++){h(E),s.applyMask(E,d);const N=s.getPenaltyN1(d)+s.getPenaltyN2(d)+s.getPenaltyN3(d)+s.getPenaltyN4(d);s.applyMask(E,d),N<b&&(b=N,x=E)}return x}})(sd)),sd}var Qr={},Ix;function o0(){if(Ix)return Qr;Ix=1;const s=Zd(),o=[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 Qr.getBlocksCount=function(d,h){switch(h){case s.L:return o[(d-1)*4+0];case s.M:return o[(d-1)*4+1];case s.Q:return o[(d-1)*4+2];case s.H:return o[(d-1)*4+3];default:return}},Qr.getTotalCodewordsCount=function(d,h){switch(h){case s.L:return u[(d-1)*4+0];case s.M:return u[(d-1)*4+1];case s.Q:return u[(d-1)*4+2];case s.H:return u[(d-1)*4+3];default:return}},Qr}var id={},li={},Px;function aN(){if(Px)return li;Px=1;const s=new Uint8Array(512),o=new Uint8Array(256);return(function(){let c=1;for(let d=0;d<255;d++)s[d]=c,o[c]=d,c<<=1,c&256&&(c^=285);for(let d=255;d<512;d++)s[d]=s[d-255]})(),li.log=function(c){if(c<1)throw new Error("log("+c+")");return o[c]},li.exp=function(c){return s[c]},li.mul=function(c,d){return c===0||d===0?0:s[o[c]+o[d]]},li}var Fx;function lN(){return Fx||(Fx=1,(function(s){const o=aN();s.mul=function(c,d){const h=new Uint8Array(c.length+d.length-1);for(let p=0;p<c.length;p++)for(let x=0;x<d.length;x++)h[p+x]^=o.mul(c[p],d[x]);return h},s.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]^=o.mul(d[b],p);let x=0;for(;x<h.length&&h[x]===0;)x++;h=h.slice(x)}return h},s.generateECPolynomial=function(c){let d=new Uint8Array([1]);for(let h=0;h<c;h++)d=s.mul(d,new Uint8Array([1,o.exp(h)]));return d}})(id)),id}var rd,$x;function sN(){if($x)return rd;$x=1;const s=lN();function o(u){this.genPoly=void 0,this.degree=u,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(c){this.degree=c,this.genPoly=s.generateECPolynomial(this.degree)},o.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=s.mod(d,this.genPoly),p=this.degree-h.length;if(p>0){const x=new Uint8Array(this.degree);return x.set(h,p),x}return h},rd=o,rd}var od={},cd={},ud={},Wx;function c0(){return Wx||(Wx=1,ud.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),ud}var An={},eg;function u0(){if(eg)return An;eg=1;const s="[0-9]+",o="[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
|
|
425
|
+
]))+`;An.KANJI=new RegExp(u,"g"),An.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),An.BYTE=new RegExp(c,"g"),An.NUMERIC=new RegExp(s,"g"),An.ALPHANUMERIC=new RegExp(o,"g");const d=new RegExp("^"+u+"$"),h=new RegExp("^"+s+"$"),p=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return An.testKanji=function(b){return d.test(b)},An.testNumeric=function(b){return h.test(b)},An.testAlphanumeric=function(b){return p.test(b)},An}var tg;function nl(){return tg||(tg=1,(function(s){const o=c0(),u=u0();s.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},s.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},s.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},s.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},s.MIXED={bit:-1},s.getCharCountIndicator=function(h,p){if(!h.ccBits)throw new Error("Invalid mode: "+h);if(!o.isValid(p))throw new Error("Invalid version: "+p);return p>=1&&p<10?h.ccBits[0]:p<27?h.ccBits[1]:h.ccBits[2]},s.getBestModeForData=function(h){return u.testNumeric(h)?s.NUMERIC:u.testAlphanumeric(h)?s.ALPHANUMERIC:u.testKanji(h)?s.KANJI:s.BYTE},s.toString=function(h){if(h&&h.id)return h.id;throw new Error("Invalid mode")},s.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 s.NUMERIC;case"alphanumeric":return s.ALPHANUMERIC;case"kanji":return s.KANJI;case"byte":return s.BYTE;default:throw new Error("Unknown mode: "+d)}}s.from=function(h,p){if(s.isValid(h))return h;try{return c(h)}catch{return p}}})(cd)),cd}var ng;function iN(){return ng||(ng=1,(function(s){const o=tl(),u=o0(),c=Zd(),d=nl(),h=c0(),p=7973,x=o.getBCHDigit(p);function b(T,L,K){for(let B=1;B<=40;B++)if(L<=s.getCapacity(B,K,T))return B}function E(T,L){return d.getCharCountIndicator(T,L)+4}function N(T,L){let K=0;return T.forEach(function(B){const U=E(B.mode,L);K+=U+B.getBitsLength()}),K}function g(T,L){for(let K=1;K<=40;K++)if(N(T,K)<=s.getCapacity(K,L,d.MIXED))return K}s.from=function(L,K){return h.isValid(L)?parseInt(L,10):K},s.getCapacity=function(L,K,B){if(!h.isValid(L))throw new Error("Invalid QR Code version");typeof B>"u"&&(B=d.BYTE);const U=o.getSymbolTotalCodewords(L),G=u.getTotalCodewordsCount(L,K),Q=(U-G)*8;if(B===d.MIXED)return Q;const $=Q-E(B,L);switch(B){case d.NUMERIC:return Math.floor($/10*3);case d.ALPHANUMERIC:return Math.floor($/11*2);case d.KANJI:return Math.floor($/13);case d.BYTE:default:return Math.floor($/8)}},s.getBestVersionForData=function(L,K){let B;const U=c.from(K,c.M);if(Array.isArray(L)){if(L.length>1)return g(L,U);if(L.length===0)return 1;B=L[0]}else B=L;return b(B.mode,B.getLength(),U)},s.getEncodedBits=function(L){if(!h.isValid(L)||L<7)throw new Error("Invalid QR Code version");let K=L<<12;for(;o.getBCHDigit(K)-x>=0;)K^=p<<o.getBCHDigit(K)-x;return L<<12|K}})(od)),od}var dd={},ag;function rN(){if(ag)return dd;ag=1;const s=tl(),o=1335,u=21522,c=s.getBCHDigit(o);return dd.getEncodedBits=function(h,p){const x=h.bit<<3|p;let b=x<<10;for(;s.getBCHDigit(b)-c>=0;)b^=o<<s.getBCHDigit(b)-c;return(x<<10|b)^u},dd}var fd={},hd,lg;function oN(){if(lg)return hd;lg=1;const s=nl();function o(u){this.mode=s.NUMERIC,this.data=u.toString()}return o.getBitsLength=function(c){return 10*Math.floor(c/3)+(c%3?c%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.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 x=this.data.length-d;x>0&&(h=this.data.substr(d),p=parseInt(h,10),c.put(p,x*3+1))},hd=o,hd}var md,sg;function cN(){if(sg)return md;sg=1;const s=nl(),o=["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=s.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=o.indexOf(this.data[h])*45;p+=o.indexOf(this.data[h+1]),d.put(p,11)}this.data.length%2&&d.put(o.indexOf(this.data[h]),6)},md=u,md}var pd,ig;function uN(){if(ig)return pd;ig=1;const s=nl();function o(u){this.mode=s.BYTE,typeof u=="string"?this.data=new TextEncoder().encode(u):this.data=new Uint8Array(u)}return o.getBitsLength=function(c){return c*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(u){for(let c=0,d=this.data.length;c<d;c++)u.put(this.data[c],8)},pd=o,pd}var xd,rg;function dN(){if(rg)return xd;rg=1;const s=nl(),o=tl();function u(c){this.mode=s.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=o.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]+`
|
|
426
|
+
Make sure your charset is UTF-8`);h=(h>>>8&255)*192+(h&255),c.put(h,13)}},xd=u,xd}var gd={exports:{}},og;function fN(){return og||(og=1,(function(s){var o={single_source_shortest_paths:function(u,c,d){var h={},p={};p[c]=0;var x=o.PriorityQueue.make();x.push(c,0);for(var b,E,N,g,T,L,K,B,U;!x.empty();){b=x.pop(),E=b.value,g=b.cost,T=u[E]||{};for(N in T)T.hasOwnProperty(N)&&(L=T[N],K=g+L,B=p[N],U=typeof p[N]>"u",(U||B>K)&&(p[N]=K,x.push(N,K),h[N]=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=o.single_source_shortest_paths(u,c,d);return o.extract_shortest_path_from_predecessor_list(h,d)},PriorityQueue:{make:function(u){var c=o.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}}};s.exports=o})(gd)),gd.exports}var cg;function hN(){return cg||(cg=1,(function(s){const o=nl(),u=oN(),c=cN(),d=uN(),h=dN(),p=u0(),x=tl(),b=fN();function E(G){return unescape(encodeURIComponent(G)).length}function N(G,Q,$){const F=[];let xe;for(;(xe=G.exec($))!==null;)F.push({data:xe[0],index:xe.index,mode:Q,length:xe[0].length});return F}function g(G){const Q=N(p.NUMERIC,o.NUMERIC,G),$=N(p.ALPHANUMERIC,o.ALPHANUMERIC,G);let F,xe;return x.isKanjiModeEnabled()?(F=N(p.BYTE,o.BYTE,G),xe=N(p.KANJI,o.KANJI,G)):(F=N(p.BYTE_KANJI,o.BYTE,G),xe=[]),Q.concat($,F,xe).sort(function(V,z){return V.index-z.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function T(G,Q){switch(Q){case o.NUMERIC:return u.getBitsLength(G);case o.ALPHANUMERIC:return c.getBitsLength(G);case o.KANJI:return h.getBitsLength(G);case o.BYTE:return d.getBitsLength(G)}}function L(G){return G.reduce(function(Q,$){const F=Q.length-1>=0?Q[Q.length-1]:null;return F&&F.mode===$.mode?(Q[Q.length-1].data+=$.data,Q):(Q.push($),Q)},[])}function K(G){const Q=[];for(let $=0;$<G.length;$++){const F=G[$];switch(F.mode){case o.NUMERIC:Q.push([F,{data:F.data,mode:o.ALPHANUMERIC,length:F.length},{data:F.data,mode:o.BYTE,length:F.length}]);break;case o.ALPHANUMERIC:Q.push([F,{data:F.data,mode:o.BYTE,length:F.length}]);break;case o.KANJI:Q.push([F,{data:F.data,mode:o.BYTE,length:E(F.data)}]);break;case o.BYTE:Q.push([{data:F.data,mode:o.BYTE,length:E(F.data)}])}}return Q}function B(G,Q){const $={},F={start:{}};let xe=["start"];for(let Z=0;Z<G.length;Z++){const V=G[Z],z=[];for(let J=0;J<V.length;J++){const le=V[J],ae=""+Z+J;z.push(ae),$[ae]={node:le,lastCount:0},F[ae]={};for(let W=0;W<xe.length;W++){const ie=xe[W];$[ie]&&$[ie].node.mode===le.mode?(F[ie][ae]=T($[ie].lastCount+le.length,le.mode)-T($[ie].lastCount,le.mode),$[ie].lastCount+=le.length):($[ie]&&($[ie].lastCount=le.length),F[ie][ae]=T(le.length,le.mode)+4+o.getCharCountIndicator(le.mode,Q))}}xe=z}for(let Z=0;Z<xe.length;Z++)F[xe[Z]].end=0;return{map:F,table:$}}function U(G,Q){let $;const F=o.getBestModeForData(G);if($=o.from(Q,F),$!==o.BYTE&&$.bit<F.bit)throw new Error('"'+G+'" cannot be encoded with mode '+o.toString($)+`.
|
|
427
|
+
Suggested mode is: `+o.toString(F));switch($===o.KANJI&&!x.isKanjiModeEnabled()&&($=o.BYTE),$){case o.NUMERIC:return new u(G);case o.ALPHANUMERIC:return new c(G);case o.KANJI:return new h(G);case o.BYTE:return new d(G)}}s.fromArray=function(Q){return Q.reduce(function($,F){return typeof F=="string"?$.push(U(F,null)):F.data&&$.push(U(F.data,F.mode)),$},[])},s.fromString=function(Q,$){const F=g(Q,x.isKanjiModeEnabled()),xe=K(F),Z=B(xe,$),V=b.find_path(Z.map,"start","end"),z=[];for(let J=1;J<V.length-1;J++)z.push(Z.table[V[J]].node);return s.fromArray(L(z))},s.rawSplit=function(Q){return s.fromArray(g(Q,x.isKanjiModeEnabled()))}})(fd)),fd}var ug;function mN(){if(ug)return Wu;ug=1;const s=tl(),o=Zd(),u=$5(),c=W5(),d=eN(),h=tN(),p=nN(),x=o0(),b=sN(),E=iN(),N=rN(),g=nl(),T=hN();function L(Z,V){const z=Z.size,J=h.getPositions(V);for(let le=0;le<J.length;le++){const ae=J[le][0],W=J[le][1];for(let ie=-1;ie<=7;ie++)if(!(ae+ie<=-1||z<=ae+ie))for(let re=-1;re<=7;re++)W+re<=-1||z<=W+re||(ie>=0&&ie<=6&&(re===0||re===6)||re>=0&&re<=6&&(ie===0||ie===6)||ie>=2&&ie<=4&&re>=2&&re<=4?Z.set(ae+ie,W+re,!0,!0):Z.set(ae+ie,W+re,!1,!0))}}function K(Z){const V=Z.size;for(let z=8;z<V-8;z++){const J=z%2===0;Z.set(z,6,J,!0),Z.set(6,z,J,!0)}}function B(Z,V){const z=d.getPositions(V);for(let J=0;J<z.length;J++){const le=z[J][0],ae=z[J][1];for(let W=-2;W<=2;W++)for(let ie=-2;ie<=2;ie++)W===-2||W===2||ie===-2||ie===2||W===0&&ie===0?Z.set(le+W,ae+ie,!0,!0):Z.set(le+W,ae+ie,!1,!0)}}function U(Z,V){const z=Z.size,J=E.getEncodedBits(V);let le,ae,W;for(let ie=0;ie<18;ie++)le=Math.floor(ie/3),ae=ie%3+z-8-3,W=(J>>ie&1)===1,Z.set(le,ae,W,!0),Z.set(ae,le,W,!0)}function G(Z,V,z){const J=Z.size,le=N.getEncodedBits(V,z);let ae,W;for(ae=0;ae<15;ae++)W=(le>>ae&1)===1,ae<6?Z.set(ae,8,W,!0):ae<8?Z.set(ae+1,8,W,!0):Z.set(J-15+ae,8,W,!0),ae<8?Z.set(8,J-ae-1,W,!0):ae<9?Z.set(8,15-ae-1+1,W,!0):Z.set(8,15-ae-1,W,!0);Z.set(J-8,8,1,!0)}function Q(Z,V){const z=Z.size;let J=-1,le=z-1,ae=7,W=0;for(let ie=z-1;ie>0;ie-=2)for(ie===6&&ie--;;){for(let re=0;re<2;re++)if(!Z.isReserved(le,ie-re)){let ge=!1;W<V.length&&(ge=(V[W]>>>ae&1)===1),Z.set(le,ie-re,ge),ae--,ae===-1&&(W++,ae=7)}if(le+=J,le<0||z<=le){le-=J,J=-J;break}}}function $(Z,V,z){const J=new u;z.forEach(function(re){J.put(re.mode.bit,4),J.put(re.getLength(),g.getCharCountIndicator(re.mode,Z)),re.write(J)});const le=s.getSymbolTotalCodewords(Z),ae=x.getTotalCodewordsCount(Z,V),W=(le-ae)*8;for(J.getLengthInBits()+4<=W&&J.put(0,4);J.getLengthInBits()%8!==0;)J.putBit(0);const ie=(W-J.getLengthInBits())/8;for(let re=0;re<ie;re++)J.put(re%2?17:236,8);return F(J,Z,V)}function F(Z,V,z){const J=s.getSymbolTotalCodewords(V),le=x.getTotalCodewordsCount(V,z),ae=J-le,W=x.getBlocksCount(V,z),ie=J%W,re=W-ie,ge=Math.floor(J/W),A=Math.floor(ae/W),I=A+1,M=ge-A,me=new b(M);let X=0;const qe=new Array(W),et=new Array(W);let Ce=0;const w=new Uint8Array(Z.buffer);for(let fe=0;fe<W;fe++){const Se=fe<re?A:I;qe[fe]=w.slice(X,X+Se),et[fe]=me.encode(qe[fe]),X+=Se,Ce=Math.max(Ce,Se)}const v=new Uint8Array(J);let P=0,te,ye;for(te=0;te<Ce;te++)for(ye=0;ye<W;ye++)te<qe[ye].length&&(v[P++]=qe[ye][te]);for(te=0;te<M;te++)for(ye=0;ye<W;ye++)v[P++]=et[ye][te];return v}function xe(Z,V,z,J){let le;if(Array.isArray(Z))le=T.fromArray(Z);else if(typeof Z=="string"){let ge=V;if(!ge){const A=T.rawSplit(Z);ge=E.getBestVersionForData(A,z)}le=T.fromString(Z,ge||40)}else throw new Error("Invalid data");const ae=E.getBestVersionForData(le,z);if(!ae)throw new Error("The amount of data is too big to be stored in a QR Code");if(!V)V=ae;else if(V<ae)throw new Error(`
|
|
428
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
429
|
+
Minimum version required to store current data is: `+ae+`.
|
|
430
|
+
`);const W=$(V,z,le),ie=s.getSymbolSize(V),re=new c(ie);return L(re,V),K(re),B(re,V),G(re,z,0),V>=7&&U(re,V),Q(re,W),isNaN(J)&&(J=p.getBestMask(re,G.bind(null,re,z))),p.applyMask(J,re),G(re,z,J),{modules:re,version:V,errorCorrectionLevel:z,maskPattern:J,segments:le}}return Wu.create=function(V,z){if(typeof V>"u"||V==="")throw new Error("No input text");let J=o.M,le,ae;return typeof z<"u"&&(J=o.from(z.errorCorrectionLevel,o.M),le=E.from(z.version),ae=p.from(z.maskPattern),z.toSJISFunc&&s.setToSJISFunction(z.toSJISFunc)),xe(V,le,J,ae)},Wu}var bd={},yd={},dg;function d0(){return dg||(dg=1,(function(s){function o(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("")}}s.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:o(c.color.dark||"#000000ff"),light:o(c.color.light||"#ffffffff")},type:c.type,rendererOpts:c.rendererOpts||{}}},s.getScale=function(c,d){return d.width&&d.width>=c+d.margin*2?d.width/(c+d.margin*2):d.scale},s.getImageWidth=function(c,d){const h=s.getScale(c,d);return Math.floor((c+d.margin*2)*h)},s.qrToImageData=function(c,d,h){const p=d.modules.size,x=d.modules.data,b=s.getScale(p,h),E=Math.floor((p+h.margin*2)*b),N=h.margin*b,g=[h.color.light,h.color.dark];for(let T=0;T<E;T++)for(let L=0;L<E;L++){let K=(T*E+L)*4,B=h.color.light;if(T>=N&&L>=N&&T<E-N&&L<E-N){const U=Math.floor((T-N)/b),G=Math.floor((L-N)/b);B=g[x[U*p+G]?1:0]}c[K++]=B.r,c[K++]=B.g,c[K++]=B.b,c[K]=B.a}}})(yd)),yd}var fg;function pN(){return fg||(fg=1,(function(s){const o=d0();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")}}s.render=function(h,p,x){let b=x,E=p;typeof b>"u"&&(!p||!p.getContext)&&(b=p,p=void 0),p||(E=c()),b=o.getOptions(b);const N=o.getImageWidth(h.modules.size,b),g=E.getContext("2d"),T=g.createImageData(N,N);return o.qrToImageData(T.data,h,b),u(g,E,N),g.putImageData(T,0,0),E},s.renderToDataURL=function(h,p,x){let b=x;typeof b>"u"&&(!p||!p.getContext)&&(b=p,p=void 0),b||(b={});const E=s.render(h,p,b),N=b.type||"image/png",g=b.rendererOpts||{};return E.toDataURL(N,g.quality)}})(bd)),bd}var vd={},hg;function xN(){if(hg)return vd;hg=1;const s=d0();function o(d,h){const p=d.a/255,x=h+'="'+d.hex+'"';return p<1?x+" "+h+'-opacity="'+p.toFixed(2).slice(1)+'"':x}function u(d,h,p){let x=d+h;return typeof p<"u"&&(x+=" "+p),x}function c(d,h,p){let x="",b=0,E=!1,N=0;for(let g=0;g<d.length;g++){const T=Math.floor(g%h),L=Math.floor(g/h);!T&&!E&&(E=!0),d[g]?(N++,g>0&&T>0&&d[g-1]||(x+=E?u("M",T+p,.5+L+p):u("m",b,0),b=0,E=!1),T+1<h&&d[g+1]||(x+=u("h",N),N=0)):b++}return x}return vd.render=function(h,p,x){const b=s.getOptions(p),E=h.modules.size,N=h.modules.data,g=E+b.margin*2,T=b.color.light.a?"<path "+o(b.color.light,"fill")+' d="M0 0h'+g+"v"+g+'H0z"/>':"",L="<path "+o(b.color.dark,"stroke")+' d="'+c(N,E,b.margin)+'"/>',K='viewBox="0 0 '+g+" "+g+'"',U='<svg xmlns="http://www.w3.org/2000/svg" '+(b.width?'width="'+b.width+'" height="'+b.width+'" ':"")+K+' shape-rendering="crispEdges">'+T+L+`</svg>
|
|
431
|
+
`;return typeof x=="function"&&x(null,U),U},vd}var mg;function gN(){if(mg)return Fl;mg=1;const s=F5(),o=mN(),u=pN(),c=xN();function d(h,p,x,b,E){const N=[].slice.call(arguments,1),g=N.length,T=typeof N[g-1]=="function";if(!T&&!s())throw new Error("Callback required as last argument");if(T){if(g<2)throw new Error("Too few arguments provided");g===2?(E=x,x=p,p=b=void 0):g===3&&(p.getContext&&typeof E>"u"?(E=b,b=void 0):(E=b,b=x,x=p,p=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(x=p,p=b=void 0):g===2&&!p.getContext&&(b=x,x=p,p=void 0),new Promise(function(L,K){try{const B=o.create(x,b);L(h(B,p,b))}catch(B){K(B)}})}try{const L=o.create(x,b);E(null,h(L,p,b))}catch(L){E(L)}}return Fl.create=o.create,Fl.toCanvas=d.bind(null,u.render),Fl.toDataURL=d.bind(null,u.renderToDataURL),Fl.toString=d.bind(null,function(h,p,x){return c.render(h,x)}),Fl}var f0=gN();const Nd=Bd(f0);function bN(){return typeof window<"u"&&!!window.LevixHost}const yN=({status:s,onRefresh:o,onStatusUpdate:u})=>{var et;const{t:c,language:d}=an(),{toast:h}=Zn(),[p,x]=Y.useState(!1),[b,E]=Y.useState(!1),[N,g]=Y.useState(null),[T,L]=Y.useState("pairing"),[K,B]=Y.useState(""),[U,G]=Y.useState(!1),Q=(s==null?void 0:s.state)||"idle",$=Q==="connected",F=Q==="waiting_for_qr",xe=Q==="starting"||Q==="linking",Z=Q==="reconnecting",V=Q==="paused",z=Q==="logged_out",J=!!(s!=null&&s.linked)&&!z,le=!J,ae=!!(s!=null&&s.canUnlink),W=(s==null?void 0:s.isOnline)!==!1,ie=V||Q==="disconnected"||Q==="retry_exhausted"?d==="ar"?"استئناف الجلسة":"Resume session":d==="ar"?"الاتصال":"Connect";Y.useEffect(()=>{if(s!=null&&s.qr){const Ce=f0.toDataURL||(Nd==null?void 0:Nd.toDataURL);typeof Ce=="function"&&Ce(s.qr,{width:280,margin:2,color:{dark:"#0b1629",light:"#ffffff"}}).then(w=>g(w)).catch(()=>g(null))}else g(null)},[s==null?void 0:s.qr]),Y.useEffect(()=>{if(F&&!(s!=null&&s.qr)&&!(s!=null&&s.pairingCode)){const Ce=setInterval(()=>{o==null||o()},1500);return()=>clearInterval(Ce)}},[F,s==null?void 0:s.qr,s==null?void 0:s.pairingCode,o]);const re=async(Ce,w)=>{E(!0);try{const v=await Ce();v&&typeof v=="object"&&"session"in v&&(u==null||u(v.session)),h(w,"success"),await(o==null?void 0:o())}catch(v){h(v instanceof Error?v.message:String(v),"error")}finally{E(!1)}},ge=async Ce=>{Ce&&Ce.preventDefault();const w=K.replace(/\D/g,"");if(!w){h(d==="ar"?"يرجى إدخال رقم الهاتف مع كود الدولة أولاً.":"Please enter your phone number with country code.","error");return}if(w.startsWith("0")){h(d==="ar"?"يرجى حذف الصفر في البداية وكتابة كود الدولة (مثلاً: 2010... وليس 010...)":"Drop the leading 0 and include the country code (e.g. 2010... not 010...).","error");return}await re(()=>ee.startSession({method:"pairing",phone:w}),d==="ar"?"جاري طلب كود الربط من واتساب...":"Requesting pairing code...")},A=async()=>{await re(()=>ee.startSession({method:"qr"}),d==="ar"?"جاري بدء الاتصال برمز QR...":"Starting QR code connection...")},I=async()=>{await re(ee.stopSession,d==="ar"?"تم الإلغاء، أدخل رقم هاتفك":"Cancelled, enter your phone number"),L("pairing")},M=()=>{s!=null&&s.pairingCode&&(navigator.clipboard.writeText(s.pairingCode.replace(/\s+/g,"")),G(!0),h(d==="ar"?"تم نسخ كود الربط!":"Pairing code copied!","success"),setTimeout(()=>G(!1),2500))},me=async()=>{x(!1),await re(ee.unlinkSession,d==="ar"?"تم إلغاء ربط الجلسة بنجاح":"Session unlinked successfully.")},X=(et=s==null?void 0:s.user)!=null&&et.id?s.user.id.split("@")[0].split(":")[0]:null,qe=bN();return r.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[r.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:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-line",children:[r.jsxs("div",{className:"flex items-center gap-3.5",children:[r.jsx("div",{className:`w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 border ${$?"bg-ok/15 text-ok border-ok/30 shadow-sm shadow-ok/20":F?"bg-warn/15 text-warn border-warn/30 shadow-sm shadow-warn/20":xe||Z?"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:r.jsx(oi,{size:24})}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg sm:text-xl font-extrabold text-text-main",children:c("connection")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:$?c("sessionActive"):V?c("paused"):J?d==="ar"?"جلسة محفوظة — يمكن استئنافها":"Saved session — ready to resume":c("sessionOffline")})]})]}),r.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto",children:r.jsxs("span",{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full text-xs font-bold border ${$?"bg-ok/15 text-ok border-ok/30":F?"bg-warn/15 text-warn border-warn/30":xe||Z?"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:[r.jsx("span",{className:"pulse-dot"}),r.jsx("span",{children:c(Q,Q)})]})})]}),s!=null&&s.retryInSeconds?r.jsxs("div",{className:"rounded-xl border border-warn/30 bg-warn/10 p-3.5 flex items-center gap-3 text-warn",children:[r.jsx(Wr,{size:20,className:"shrink-0"}),r.jsxs("div",{className:"text-xs sm:text-sm",children:[r.jsx("span",{className:"font-bold",children:d==="ar"?"إعادة الاتصال قريباً":"Reconnecting soon"})," ","•"," ",r.jsx("span",{children:d==="ar"?`المحاولة التالية خلال ${s.retryInSeconds} ثانية`:`Next attempt in ${s.retryInSeconds}s`})]})]}):null,$&&X&&r.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:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-ok/20 text-ok flex items-center justify-center shrink-0",children:r.jsx(ci,{size:20})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs text-muted font-medium",children:c("connectedNumber")}),r.jsxs("div",{className:"text-sm sm:text-base font-mono font-bold text-text-main",dir:"ltr",children:["+",X]})]})]}),r.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"})]}),r.jsxs("div",{children:[$&&r.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5 sm:gap-3",children:[r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(Ed,{size:16}),r.jsx("span",{children:c("stop")})]}),r.jsxs("div",{className:"flex items-center gap-2.5 w-full sm:w-auto",children:[r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(eo,{size:15}),r.jsx("span",{children:c("reconnect")})]}),r.jsxs("button",{type:"button",onClick:()=>x(!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:[r.jsx(Qu,{size:15}),r.jsx("span",{children:c("unlink")})]}),!qe&&r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(qr,{size:15}),r.jsx("span",{children:c("restart")})]})]})]}),(xe||F||Z)&&r.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:[r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(Ed,{size:16}),r.jsx("span",{children:d==="ar"?"إلغاء المحاولة":"Cancel Attempt"})]}),!qe&&r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(qr,{size:15}),r.jsx("span",{children:c("restart")})]})]}),!$&&!xe&&!F&&!Z&&J&&r.jsxs("div",{className:"flex flex-col gap-3 w-full max-w-xl",children:[V&&r.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:W?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."}),r.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5",children:[r.jsxs("button",{type:"button",onClick:()=>re(ee.startSession,ie),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:[r.jsx(oi,{size:16}),r.jsx("span",{children:ie})]}),ae&&r.jsxs("button",{type:"button",onClick:()=>x(!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:[r.jsx(Qu,{size:15}),r.jsx("span",{children:c("unlink")})]}),!qe&&r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(qr,{size:15}),r.jsx("span",{children:c("restart")})]})]})]}),!$&&!xe&&!F&&!Z&&le&&r.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[r.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:[r.jsxs("button",{type:"button",onClick:()=>L("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 ${T==="pairing"?"bg-brand-blue text-white shadow-sm shadow-brand-blue/30":"text-muted hover:text-text-main"}`,children:[r.jsx(Yu,{size:16}),r.jsx("span",{children:d==="ar"?"كود الربط الرقمي (الهاتف)":"Pairing Code (Phone)"})]}),r.jsxs("button",{type:"button",onClick:()=>L("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 ${T==="qr"?"bg-brand-blue text-white shadow-sm shadow-brand-blue/30":"text-muted hover:text-text-main"}`,children:[r.jsx(Vu,{size:16}),r.jsx("span",{children:d==="ar"?"مسح رمز QR":"QR Code Scan"})]})]}),T==="pairing"&&r.jsxs("form",{onSubmit:ge,className:"flex flex-col gap-3 max-w-xl w-full",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(Iv,{size:17,className:"absolute top-1/2 -translate-y-1/2 start-3.5 text-muted pointer-events-none"}),r.jsx("input",{type:"tel",value:K,onChange:Ce=>B(Ce.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"})]}),r.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:[r.jsx(_d,{size:16}),r.jsx("span",{children:d==="ar"?"الحصول على كود الربط":"Get Pairing Code"})]})]}),r.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."})]}),T==="qr"&&r.jsxs("div",{className:"flex flex-col gap-2 max-w-xl",children:[r.jsxs("button",{type:"button",onClick:A,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:[r.jsx(Vu,{size:18}),r.jsx("span",{children:d==="ar"?"بدء الربط عبر رمز QR":"Start QR Linking"})]}),r.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."})]}),r.jsxs("div",{className:"flex items-center gap-2.5 pt-1",children:[ae&&r.jsxs("button",{type:"button",onClick:()=>x(!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:[r.jsx(Qu,{size:15}),r.jsx("span",{children:c("unlink")})]}),!qe&&r.jsxs("button",{type:"button",onClick:()=>re(ee.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:[r.jsx(qr,{size:15}),r.jsx("span",{children:c("restart")})]})]})]})]})]}),xe&&r.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:[r.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:r.jsx(eo,{size:24,className:"animate-spin"})}),r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main mb-1.5",children:Q==="linking"?d==="ar"?"جاري إتمام الربط مع الهاتف...":"Finishing link handshake...":d==="ar"?"جاري بدء تشغيل الجلسة...":"Initializing WhatsApp session..."}),r.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."})]}),F&&r.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:s!=null&&s.pairingCode?r.jsxs("div",{className:"flex flex-col items-center w-full animate-in fade-in zoom-in-95 duration-300",children:[r.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:r.jsx(Yu,{size:26})}),r.jsx("h3",{className:"text-lg sm:text-xl font-bold text-text-main mb-1.5",children:d==="ar"?"كود الربط الرقمي مع واتساب":"WhatsApp Pairing Code"}),r.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."}),r.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:[r.jsx("div",{className:"text-xs font-bold text-brand-cyan uppercase tracking-wider",children:d==="ar"?"كود الربط المكون من 8 خانات":"8-Digit Pairing Code"}),r.jsx("div",{className:"text-3xl sm:text-4xl font-mono font-extrabold tracking-widest text-brand-cyan select-all",dir:"ltr",children:s.pairingCode.length===8?`${s.pairingCode.slice(0,4)} - ${s.pairingCode.slice(4)}`:s.pairingCode}),r.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:[U?r.jsx($r,{size:18}):r.jsx(Dv,{size:18}),r.jsx("span",{children:U?d==="ar"?"تم النسخ بنجاح!":"Copied!":d==="ar"?"نسخ كود الربط":"Copy Code"})]})]}),r.jsxs("div",{className:"mt-6 p-4 rounded-xl border border-line bg-panel-raised text-start w-full max-w-md",children:[r.jsx("div",{className:"text-xs font-bold text-text-main mb-3",children:d==="ar"?"خطوات الإدخال في واتساب:":"Steps to enter in WhatsApp:"}),r.jsxs("ol",{className:"text-xs text-muted space-y-2 list-decimal list-inside leading-relaxed",children:[r.jsx("li",{children:d==="ar"?"افتح تطبيق واتساب على هاتفك.":"Open WhatsApp on your phone."}),r.jsx("li",{children:d==="ar"?"اذهب إلى الإعدادات > الأجهزة المرتبطة > ربط جهاز.":"Go to Settings > Linked Devices > Link a Device."}),r.jsx("li",{children:r.jsx("strong",{className:"text-text-main",children:d==="ar"?"اضغط على «الربط باستخدام رقم الهاتف بدلاً من ذلك» أسفل الشاشة.":"Tap 'Link with phone number instead' at bottom of screen."})}),r.jsx("li",{children:d==="ar"?"اكتب هذا الكود وسيتم ربط البوت مباشرة!":"Enter the code above to connect immediately!"})]})]})]}):N?r.jsxs("div",{className:"flex flex-col items-center w-full",children:[r.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:r.jsx(Vu,{size:26})}),r.jsx("h3",{className:"text-lg font-bold text-text-main mb-1.5",children:c("waiting_for_qr")}),r.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."}),r.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:r.jsx("img",{src:N,alt:"WhatsApp QR Code",className:"w-56 h-56 sm:w-64 sm:h-64 block rounded-lg"})}),r.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:[r.jsx("p",{className:"text-xs text-muted text-center",children:d==="ar"?"هل تستخدم التطبيق من نفس الهاتف ولا تستطيع مسح الرمز؟":"Using the app on the same phone and can't scan?"}),r.jsxs("button",{type:"button",onClick:I,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:[r.jsx(Yu,{size:17}),r.jsx("span",{children:d==="ar"?"الربط برقم الهاتف (كود الربط الرقمي) بدلاً من QR":"Link with Phone Pairing Code Instead"})]})]})]}):r.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-muted",children:[r.jsx("div",{className:"w-9 h-9 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-xs sm:text-sm font-semibold animate-pulse",children:d==="ar"?"جاري تجهيز بيانات الربط من واتساب...":"Preparing pairing details from WhatsApp..."})]})}),r.jsx(es,{isOpen:p,onClose:()=>x(!1),title:c("unlink"),footer:r.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[r.jsx("button",{type:"button",onClick:()=>x(!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")}),r.jsx("button",{type:"button",onClick:me,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:r.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."})})]})},vN=()=>{const{t:s,language:o}=an(),{toast:u}=Zn(),[c,d]=Y.useState([]),[h,p]=Y.useState(!0),x=N=>{var L,K;const g=N.jid||N.id||"",T=typeof N.antilink=="boolean"?N.antilink:!!(N.antilinkEnabled??((L=N.antilink)==null?void 0:L.enabled));return{...N,jid:g,subject:N.subject||"",memberCount:N.memberCount??N.participants??0,antilink:T,antilinkEnabled:T,welcomeEnabled:!!(N.welcomeEnabled??((K=N.welcome_system)==null?void 0:K.enabled)),mediaRestriction:N.mediaRestriction||"none"}},b=async()=>{try{const N=await ee.getGroups();N!=null&&N.groups&&d(N.groups.map(x))}catch(N){u(N.message,"error")}finally{p(!1)}};Y.useEffect(()=>{b()},[]);const E=async(N,g)=>{d(T=>T.map(L=>L.jid===N?{...L,...g}:L));try{await ee.updateGroup(N,g),u(s("savedSuccessfully"),"success")}catch(T){u(T.message,"error"),b()}};return r.jsxs("div",{className:"flex flex-col gap-6",children:[r.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:r.jsxs("div",{className:"flex items-center gap-3.5",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-blue/10 text-brand-blue flex items-center justify-center shrink-0",children:r.jsx(Wl,{size:24})}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("h2",{className:"text-lg md:text-xl font-bold text-text-main",children:s("groups")}),r.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," ",o==="ar"?"مجموعة":"groups"]})]}),r.jsx("p",{className:"text-xs md:text-sm text-muted mt-1",children:o==="ar"?"إدارة مجموعات واتساب، الحماية من الروابط، تقييد الوسائط، ورسائل الترحيب التلقائية":"WhatsApp group moderation, anti-link defense, media filtering, and automated greetings"})]})]})}),r.jsx("div",{className:"rounded-2xl border border-line bg-panel overflow-hidden shadow-sm overflow-x-auto",children:r.jsxs("table",{className:"w-full min-w-[640px] text-start border-collapse text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"bg-panel-raised border-b border-line text-xs font-bold text-muted uppercase tracking-wider",children:[r.jsx("th",{className:"px-5 py-4 text-start",children:s("thGroupName")}),r.jsx("th",{className:"px-5 py-4 text-start",children:s("thGroupJid")}),r.jsx("th",{className:"px-5 py-4 text-start",children:s("thMembers")}),r.jsx("th",{className:"px-5 py-4 text-center",children:s("thAntiLink")}),r.jsx("th",{className:"px-5 py-4 text-start",children:s("thMedia")}),r.jsx("th",{className:"px-5 py-4 text-center",children:s("thWelcome")})]})}),r.jsx("tbody",{className:"divide-y divide-line/40",children:h?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-16 text-muted",children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-blue border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-xs",children:s("loading")})]})})}):c.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-16 px-4",children:r.jsxs("div",{className:"max-w-md mx-auto flex flex-col items-center gap-3",children:[r.jsx("div",{className:"w-14 h-14 rounded-2xl bg-panel-raised flex items-center justify-center text-muted",children:r.jsx(Wv,{size:28})}),r.jsx("h4",{className:"text-base font-bold text-text-main",children:o==="ar"?"لا توجد مجموعات حتى الآن":"No active groups found"}),r.jsx("p",{className:"text-xs text-muted leading-relaxed",children:o==="ar"?"بمجرد إضافة البوت إلى مجموعات واتساب، ستظهر تلقائياً هنا مع خيارات الإشراف والحماية.":"Once the bot is added to WhatsApp groups, they will automatically appear here with full moderation and anti-link controls."})]})})}):c.map(N=>{var g;return r.jsxs("tr",{className:"hover:bg-panel-hover/50 transition-colors",children:[r.jsx("td",{className:"px-5 py-4 font-bold text-text-main",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.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:(N.subject||"G").charAt(0).toUpperCase()}),r.jsx("span",{className:"line-clamp-1",children:N.subject||(o==="ar"?"مجموعة بدون اسم":"Unnamed group")})]})}),r.jsx("td",{className:"px-5 py-4 font-mono text-xs text-muted",children:r.jsx("bdi",{className:"px-2 py-1 rounded bg-bg-soft border border-line select-all",children:((g=N.jid)==null?void 0:g.split("@")[0])||N.jid})}),r.jsx("td",{className:"px-5 py-4",children:r.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:N.memberCount||"—"})}),r.jsx("td",{className:"px-5 py-4 text-center",children:r.jsx(Wa,{checked:!!N.antilink,onChange:T=>E(N.jid,{antilink:T})})}),r.jsx("td",{className:"px-5 py-4",children:r.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:N.mediaRestriction||"none",onChange:T=>E(N.jid,{mediaRestriction:T.target.value}),children:[r.jsx("option",{value:"none",children:o==="ar"?"بلا قيود (الكل)":"No Restrictions"}),r.jsx("option",{value:"block_all",children:o==="ar"?"حظر كافة الوسائط":"Block All Media"})]})}),r.jsx("td",{className:"px-5 py-4 text-center",children:r.jsx(Wa,{checked:!!N.welcomeEnabled,onChange:T=>E(N.jid,{welcomeEnabled:T})})})]},N.jid)})})]})})]})},NN=({socket:s})=>{const{t:o,language:u}=an(),[c,d]=Y.useState([]),[h,p]=Y.useState("all"),[x,b]=Y.useState(!0),E=Y.useRef(null);Y.useEffect(()=>{ee.getLogs().then(g=>{g!=null&&g.logs&&d(g.logs)}).catch(()=>{})},[]),Y.useEffect(()=>{if(!s)return;const g=T=>{d(L=>[...L.slice(-400),T])};return s.on("log",g),()=>{s.off("log",g)}},[s]),Y.useEffect(()=>{x&&E.current&&E.current.scrollIntoView({behavior:"smooth"})},[c,x]);const N=c.filter(g=>h==="all"?!0:g.level===h);return r.jsxs("div",{className:"flex flex-col gap-5",children:[r.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:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:r.jsx(ts,{size:20})}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx("h2",{className:"text-base md:text-lg font-bold text-text-main",children:o("liveServerLogs")}),r.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:N.length})]}),r.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"})]})]}),r.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap sm:flex-nowrap",children:[r.jsxs("div",{className:"relative flex items-center",children:[r.jsx(Lv,{size:15,className:"absolute start-3 text-muted pointer-events-none"}),r.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:g=>p(g.target.value),children:[r.jsx("option",{value:"all",children:o("allLogs")}),r.jsx("option",{value:"info",children:"INFO"}),r.jsx("option",{value:"warn",children:"WARN"}),r.jsx("option",{value:"error",children:"ERROR"})]})]}),r.jsxs("button",{type:"button",onClick:()=>b(!x),className:`inline-flex items-center gap-1.5 px-3 h-10 rounded-xl border text-xs font-semibold transition-colors ${x?"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:[r.jsx(Av,{size:14,className:x?"animate-bounce":""}),r.jsx("span",{children:x?"Auto-scroll ON":"Auto-scroll OFF"})]}),r.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:[r.jsx(jb,{size:14}),r.jsx("span",{children:o("clearLogs")})]})]})]}),r.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:[N.length===0?r.jsxs("div",{className:"m-auto text-center py-16 text-muted text-xs flex flex-col items-center gap-2",children:[r.jsx(ts,{size:24,className:"opacity-40"}),r.jsx("span",{children:o("noLogs")})]}):N.map((g,T)=>{const L=g.level==="error"?"text-red-400 bg-red-500/10 border-red-500/20":g.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 r.jsxs("div",{className:"flex items-baseline gap-2.5 py-0.5 hover:bg-white/[0.03] px-1 rounded transition-colors",children:[r.jsx("span",{className:"text-slate-500 shrink-0 select-none text-[11px]",children:g.time||new Date().toLocaleTimeString()}),r.jsx("span",{className:`inline-flex items-center px-1.5 py-0.2 rounded border font-mono font-bold text-[10px] shrink-0 ${L}`,children:(g.level||"info").toUpperCase()}),r.jsx("span",{className:"text-slate-200 break-all font-mono",children:g.msg})]},T)}),r.jsx("div",{ref:E})]})]})},wN=({status:s,onNavigate:o})=>{var K;const{t:u,language:c}=an(),{toast:d}=Zn(),[h,p]=Y.useState(null),[x,b]=Y.useState(!0);Y.useEffect(()=>{let B=!0;return ee.getStats().then(U=>{B&&(U!=null&&U.stats)&&p(U.stats)}).catch(U=>{d(U.message,"error")}).finally(()=>{B&&b(!1)}),()=>{B=!1}},[d]);const E=B=>{const U=Math.floor(B/86400),G=Math.floor(B%86400/3600),Q=Math.floor(B%3600/60);return U?`${U}d ${G}h`:G?`${G}h ${Q}m`:`${Q}m`},N=(s==null?void 0:s.state)==="connected",g=async()=>{try{await ee.startSession(),d(u("starting"),"info")}catch(B){d(B.message,"error")}},T=async()=>{try{await ee.stopSession(),d(u("stop"),"info")}catch(B){d(B.message,"error")}},L=[{id:"connection",title:u("connection"),desc:N?u("connected"):u(s==null?void 0:s.state,"disconnected"),icon:oi,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:Ld,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:ts,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:pb,color:"text-ok bg-ok/10 border-ok/20"}];return r.jsxs("div",{className:"flex flex-col gap-6",children:[r.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:[r.jsxs("div",{className:"flex items-center gap-4 min-w-0 flex-1",children:[r.jsx("div",{className:`w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 border ${N?"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:r.jsx(Tv,{size:24})}),r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap",children:[r.jsx("h2",{className:"text-lg sm:text-xl font-extrabold text-text-main tracking-tight truncate",children:N?u("connected"):u(s==null?void 0:s.state,"disconnected")}),r.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-bold border ${N?"bg-ok/10 text-ok border-ok/30":"bg-warn/10 text-warn border-warn/30"}`,children:[r.jsx("span",{className:"pulse-dot"}),N?"ONLINE":"OFFLINE"]})]}),r.jsx("p",{className:"text-xs sm:text-sm text-muted truncate mt-1",children:N?(K=s==null?void 0:s.user)!=null&&K.id?r.jsx("bdi",{dir:"ltr",children:`+${s.user.id.split("@")[0]}`}):u("activeListening"):u("pausedOrLinking")})]})]}),r.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap shrink-0",children:[N?r.jsxs("button",{type:"button",onClick:T,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:[r.jsx(Ed,{size:16}),r.jsx("span",{children:u("stop")})]}):r.jsxs("button",{type:"button",onClick:g,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:[r.jsx(Pv,{size:16}),r.jsx("span",{children:u("start")})]}),r.jsxs("button",{type:"button",onClick:()=>o("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:[r.jsx(oi,{size:16,className:"text-brand-cyan"}),r.jsx("span",{children:u("connection")})]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-5",children:[r.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:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("totalGroups")}),r.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:r.jsx(Wl,{size:18})})]}),r.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:x?"—":(h==null?void 0:h.totalGroups)??0})]}),r.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:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("commandCount")}),r.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:r.jsx(ts,{size:18})})]}),r.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:x?"—":(h==null?void 0:h.commandCount)??0})]}),r.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:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("uptime")}),r.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:r.jsx(Ov,{size:18})})]}),r.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:x?"—":E((h==null?void 0:h.uptime)||0)})]}),r.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:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("span",{className:"text-[11px] sm:text-xs font-bold text-muted uppercase tracking-wider truncate",children:u("activeSchedules")}),r.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:r.jsx(Cd,{size:18})})]}),r.jsx("div",{className:"text-2xl sm:text-3xl font-extrabold text-text-main font-mono tracking-tight",children:x?"—":(h==null?void 0:h.activeSchedules)??0})]})]}),r.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4",children:L.map(B=>{const U=B.icon;return r.jsxs("button",{type:"button",onClick:()=>o(B.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:[r.jsxs("div",{className:"flex items-center justify-between w-full",children:[r.jsx("div",{className:`w-9 h-9 sm:w-10 sm:h-10 rounded-xl flex items-center justify-center shrink-0 border ${B.color}`,children:r.jsx(U,{size:18})}),r.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:r.jsx(kv,{size:14,className:"rtl:rotate-180 transition-transform group-hover:translate-x-0.5 rtl:group-hover:-translate-x-0.5"})})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs sm:text-sm font-bold text-text-main group-hover:text-brand-cyan transition-colors",children:B.title}),r.jsx("p",{className:"text-[11px] sm:text-xs text-muted mt-0.5 line-clamp-2 leading-relaxed",children:B.desc})]})]},B.id)})}),r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 shadow-sm flex items-center gap-3.5",children:[r.jsx(Uv,{size:20,className:"text-faint shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-xs font-semibold text-muted",children:u("dataDir")}),r.jsx("div",{className:"text-xs font-mono text-text-main truncate text-start",dir:"ltr",children:(h==null?void 0:h.dataDir)||"..."})]})]})]})};function SN(){const s=window.LevixHost;return!!(s&&typeof s.pickContact=="function")}function jN(s){let o=String(s||"").replace(/\D/g,"");return o.startsWith("00")&&(o=o.slice(2)),o.length<8||o.length>15?null:`${o}@s.whatsapp.net`}const _N=({isConnected:s=!1,onNavigate:o})=>{const{t:u,language:c}=an(),{toast:d}=Zn(),[h,p]=Y.useState([]),[x,b]=Y.useState("UTC"),[E,N]=Y.useState(!0),[g,T]=Y.useState([]),[L,K]=Y.useState(!1),[B,U]=Y.useState(null),[G,Q]=Y.useState(""),[$,F]=Y.useState(!1),[xe,Z]=Y.useState(""),[V,z]=Y.useState("recurring"),[J,le]=Y.useState("0 9 * * *"),[ae,W]=Y.useState(""),[ie,re]=Y.useState(!1),ge=3,A=h.length>=ge,I=async()=>{try{const v=await ee.getSchedules();v!=null&&v.schedules&&(p(v.schedules),v.timezone&&b(v.timezone))}catch(v){d(v.message,"error")}finally{N(!1)}},M=async()=>{K(!0);try{const v=await ee.getRecipients();v!=null&&v.recipients&&T(v.recipients)}catch{}finally{K(!1)}};Y.useEffect(()=>{I(),s&&M()},[s]);const me=async v=>{try{await ee.deleteSchedule(v),d(u("savedSuccessfully"),"success"),p(P=>P.filter(te=>te.id!==v))}catch(P){d(P.message,"error")}},X=async v=>{if(!s){d(c==="ar"?"واتساب غير متصل، يرجى بدء الاتصال أولاً":"WhatsApp is disconnected, please connect first","warning");return}try{await ee.retrySchedule(v),d(c==="ar"?"تمت إعادة محاولة الإرسال":"Delivery retry triggered","info"),I()}catch(P){d(P.message,"error")}},qe=async()=>{const v=window.LevixHost;if(!(v!=null&&v.pickContact)){d(c==="ar"?"دليل الهاتف متاح من تطبيق أندرويد فقط":"Phone book is available in the Android app","info");return}const P=await new Promise(fe=>{var se;const Se=oe=>{window.removeEventListener("levix-contact",Se);const tt=oe.detail;if(!(tt!=null&&tt.phone)){fe(null);return}fe({name:String(tt.name||""),phone:String(tt.phone)})};window.addEventListener("levix-contact",Se);try{(se=v.pickContact)==null||se.call(v)}catch{window.removeEventListener("levix-contact",Se),fe(null)}});if(!P)return;const te=jN(P.phone);if(!te){d(c==="ar"?"الرقم غير صالح. استخدم رقمًا مع كود الدولة.":"That number is not valid. Use a number with country code.","error");return}const ye=`+${te.split("@")[0]}`;U({id:te,name:P.name||ye,phone:ye,type:"contact"})},et=()=>{if(!s){d(c==="ar"?"يلزم اتصال واتساب لجدولة الرسائل":"Active WhatsApp connection is required to schedule messages","warning");return}if(A){d(u("maxSchedulesReached"),"warning");return}U(null),Q(""),Z(""),F(!0),g.length||M()},Ce=async()=>{if(!B){d(c==="ar"?"يرجى اختيار المحادثة المستهدفة":"Please select a recipient chat","warning");return}if(!xe.trim()){d(c==="ar"?"يرجى كتابة نص الرسالة":"Please write the message text","warning");return}if(V==="once"&&(!ae||new Date(ae).getTime()<=Date.now())){d(c==="ar"?"يرجى تحديد وقت وتاريخ مستقبلي صالح":"Please select a valid future date and time","warning");return}re(!0);const v={targetJid:B.id,message:xe.trim(),type:V};V==="recurring"?v.cronString=J:v.scheduledTime=new Date(ae).getTime();try{await ee.createSchedule(v),d(u("savedSuccessfully"),"success"),F(!1),U(null),Z(""),I()}catch(P){d(P.message,"error")}finally{re(!1)}},w=g.filter(v=>{const P=G.toLowerCase().trim();return P?v.name.toLowerCase().includes(P)||v.phone&&v.phone.includes(P)||v.id.toLowerCase().includes(P):!0});return r.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[!s&&r.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:[r.jsxs("div",{className:"flex items-center gap-3.5",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-warn/20 text-warn flex items-center justify-center shrink-0",children:r.jsx(Wr,{size:22})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm sm:text-base font-bold text-warn",children:c==="ar"?"واتساب غير متصل حالياً":"WhatsApp is Disconnected"}),r.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."})]})]}),r.jsx("button",{type:"button",onClick:()=>o==null?void 0:o("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:r.jsx("span",{children:c==="ar"?"الذهاب للاتصال":"Go to Connection"})})]}),r.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:[r.jsxs("div",{className:"flex items-center gap-3.5",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:r.jsx(jd,{size:24})}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[r.jsx("h2",{className:"text-lg md:text-xl font-bold text-text-main",children:u("schedules")}),r.jsxs("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-bold border ${A?"bg-warn/15 text-warn border-warn/30":"bg-brand-cyan/10 text-brand-cyan border-brand-cyan/20"}`,children:[h.length," / ",ge," ",c==="ar"?"مجدول":"scheduled"]})]}),r.jsxs("p",{className:"text-xs md:text-sm text-muted mt-1",children:[c==="ar"?"المنطقة الزمنية:":"Timezone:"," ",r.jsx("code",{className:"text-brand-cyan font-mono font-semibold px-1.5 py-0.5 rounded bg-bg-soft border border-line",children:x})," ","·"," ",c==="ar"?"إرسال دوري ومحدد بالوقت":"Cron & one-off automated message deliveries"]})]})]}),r.jsxs("button",{type:"button",onClick:et,disabled:A||!s,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:[r.jsx(tb,{size:18}),r.jsx("span",{children:s?u(A?"limitReached":"scheduleNewMsg"):c==="ar"?"يلزم اتصال واتساب":"Connection Required"})]})]}),r.jsx("div",{className:"rounded-2xl border border-line bg-panel overflow-hidden shadow-sm overflow-x-auto",children:r.jsxs("table",{className:"w-full min-w-[680px] text-start border-collapse text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"bg-panel-raised border-b border-line text-xs font-bold text-muted uppercase tracking-wider",children:[r.jsx("th",{className:"px-5 py-4 text-start",children:u("thTarget")}),r.jsx("th",{className:"px-5 py-4 text-start",children:u("thMessage")}),r.jsx("th",{className:"px-5 py-4 text-start",children:u("thSchedule")}),r.jsx("th",{className:"px-5 py-4 text-start",children:u("thType")}),r.jsx("th",{className:"px-5 py-4 text-start",children:u("thDelivery")}),r.jsx("th",{className:"px-5 py-4 text-center",children:u("thActions")})]})}),r.jsx("tbody",{className:"divide-y divide-line/40",children:E?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-16 text-muted",children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-xs",children:u("loading")})]})})}):h.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-16 text-muted text-xs sm:text-sm",children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx(jd,{size:28,className:"text-muted/40"}),r.jsx("span",{children:c==="ar"?"لا توجد رسائل مجدولة حالياً.":"No active schedules found."})]})})}):h.map(v=>r.jsxs("tr",{className:"hover:bg-panel-hover/50 transition-colors",children:[r.jsx("td",{className:"px-5 py-4 text-xs text-text-main",children:r.jsx("bdi",{children:v.targetKind==="group"||v.targetJid.includes("@g.us")?r.jsxs("span",{className:"inline-flex items-center gap-1.5 text-brand-cyan",children:[r.jsx(Wl,{size:14}),r.jsx("span",{className:"font-semibold truncate max-w-[12rem]",children:v.targetLabel&&v.targetLabel!=="Group"?v.targetLabel:c==="ar"?"مجموعة":"Group"})]}):r.jsxs("span",{className:"inline-flex items-center gap-1.5 text-ok",children:[r.jsx(Xu,{size:14}),r.jsx("span",{className:"font-semibold",children:v.targetPhone||(v.targetLabel&&!v.targetLabel.includes("@lid")?v.targetLabel:null)||(c==="ar"?"جهة اتصال":"Contact")})]})})}),r.jsx("td",{className:"px-5 py-4 max-w-xs text-text-main truncate text-xs sm:text-sm",children:v.message}),r.jsx("td",{className:"px-5 py-4 text-xs font-mono text-muted",children:v.when||v.cronString||"—"}),r.jsx("td",{className:"px-5 py-4",children:r.jsx("span",{className:`inline-flex px-2.5 py-0.5 rounded-lg text-xs font-semibold ${v.type==="recurring"?"bg-brand-blue/10 text-brand-cyan":"bg-purple-500/10 text-purple-400"}`,children:v.type==="recurring"?c==="ar"?"متكرر":"Recurring":c==="ar"?"مرة واحدة":"Once"})}),r.jsx("td",{className:"px-5 py-4",children:r.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-bold ${v.lastDeliveryStatus==="failed"?"bg-danger/10 text-danger border border-danger/25":v.status==="active"?"bg-ok/10 text-ok border border-ok/25":"bg-muted/10 text-muted"}`,children:[v.lastDeliveryStatus==="failed"?r.jsx(Wr,{size:13}):r.jsx(ci,{size:13}),r.jsx("span",{children:v.lastDeliveryStatus==="failed"?c==="ar"?"فشل الإرسال":"Failed":v.status==="active"?c==="ar"?"نشط":"Active":v.status})]})}),r.jsx("td",{className:"px-5 py-4 text-center",children:r.jsxs("div",{className:"flex items-center justify-center gap-2",children:[v.lastDeliveryStatus==="failed"&&r.jsx("button",{type:"button",onClick:()=>X(v.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:r.jsx(eo,{size:14})}),r.jsx("button",{type:"button",onClick:()=>me(v.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:r.jsx(jb,{size:14})})]})})]},v.id))})]})}),r.jsx(es,{isOpen:$,onClose:()=>F(!1),title:u("scheduleNewMsg"),footer:r.jsxs("div",{className:"flex items-center justify-end gap-2.5 w-full",children:[r.jsx("button",{type:"button",onClick:()=>F(!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")}),r.jsx("button",{type:"button",onClick:Ce,disabled:ie||!B||!xe.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:ie?u("saving"):c==="ar"?"جدولة الرسالة":"Schedule"})]}),children:r.jsxs("div",{className:"flex flex-col gap-4 py-1",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"block text-xs font-bold text-text-main",children:[u("selectRecipient")," ",r.jsx("span",{className:"text-danger",children:"*"})]}),B?r.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl border border-brand-blue/40 bg-brand-blue/10",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg bg-brand-blue/20 text-brand-cyan flex items-center justify-center shrink-0",children:B.type==="group"?r.jsx(Wl,{size:16}):r.jsx(Xu,{size:16})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs sm:text-sm font-bold text-text-main truncate",children:B.name}),B.phone&&r.jsx("div",{className:"text-[11px] text-muted font-mono",dir:"ltr",children:B.phone})]})]}),r.jsx("button",{type:"button",onClick:()=>U(null),className:"p-1 rounded-lg hover:bg-panel text-muted hover:text-danger transition-colors",title:"Change chat",children:r.jsx(ui,{size:16})})]}):r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(cb,{size:16,className:"absolute start-3 top-3 text-muted"}),r.jsx("input",{type:"text",value:G,onChange:v=>Q(v.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"})]}),SN()&&r.jsxs("button",{type:"button",onClick:qe,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:[r.jsx(Ev,{size:15}),r.jsx("span",{className:"hidden sm:inline",children:u("pickPhoneContact")})]})]}),r.jsx("div",{className:"max-h-48 overflow-y-auto rounded-xl border border-line bg-panel-raised divide-y divide-line/40",children:L?r.jsx("div",{className:"p-4 text-center text-xs text-muted",children:u("loading")}):w.length===0?r.jsx("div",{className:"p-4 text-center text-xs text-muted",children:u("noRecipientsFound")}):w.map(v=>r.jsxs("button",{type:"button",onClick:()=>U(v),className:"w-full p-2.5 flex items-center justify-between gap-2 hover:bg-panel text-start transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("div",{className:"w-7 h-7 rounded-lg bg-panel border border-line flex items-center justify-center shrink-0 text-muted",children:v.type==="group"?r.jsx(Wl,{size:14}):r.jsx(Xu,{size:14})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-bold text-text-main truncate",children:v.name}),v.phone&&r.jsx("div",{className:"text-[10px] text-muted font-mono",dir:"ltr",children:v.phone})]})]}),r.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded bg-panel text-muted shrink-0",children:v.type==="group"?c==="ar"?"مجموعة":"Group":c==="ar"?"محادثة":"Contact"})]},v.id))})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs font-bold text-text-main",children:c==="ar"?"نوع الجدولة":"Schedule Type"}),r.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:V,onChange:v=>z(v.target.value),children:[r.jsx("option",{value:"recurring",children:c==="ar"?"دوري متكرر (Cron Expression)":"Recurring (Cron Expression)"}),r.jsx("option",{value:"once",children:c==="ar"?"مرة واحدة (تاريخ ووقت محدد)":"One-Off (Specific Date & Time)"})]})]}),V==="recurring"?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs font-bold text-text-main",children:c==="ar"?"تعبير Cron (دقيقة ساعة يوم شهر يوم-الأسبوع)":"Cron Expression (5 fields: min hour day month weekday)"}),r.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:J,onChange:v=>le(v.target.value),placeholder:"0 9 * * *"}),r.jsxs("span",{className:"block text-xs text-muted",children:[c==="ar"?"مثال: ":"e.g. ",r.jsx("code",{className:"text-brand-cyan",children:"0 9 * * *"})," (",c==="ar"?"يومياً الساعة 9:00 صباحاً":"Every day at 9:00 AM",")"]})]}):r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs font-bold text-text-main",children:c==="ar"?"موعد وتاريخ الإرسال":"Delivery Date & Time"}),r.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:ae,onChange:v=>W(v.target.value)})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"block text-xs font-bold text-text-main",children:[c==="ar"?"نص الرسالة":"Message Text"," ",r.jsx("span",{className:"text-danger",children:"*"})]}),r.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:xe,onChange:v=>Z(v.target.value)})]})]})})]})},pg={messageMin:10,messageMax:2e3},wd={bug:{icon:zv,labelKey:"feedbackTopicBug"},idea:{icon:Vv,labelKey:"feedbackTopicIdea"},question:{icon:Ad,labelKey:"feedbackTopicQuestion"},praise:{icon:qv,labelKey:"feedbackTopicPraise"},other:{icon:Td,labelKey:"feedbackTopicOther"}},CN=["bug","idea","question","praise","other"],TN=()=>{var V;const{t:s}=an(),{toast:o}=Zn(),[u,c]=Y.useState(null),[d,h]=Y.useState("bug"),[p,x]=Y.useState(""),[b,E]=Y.useState(0),[N,g]=Y.useState(""),[T,L]=Y.useState(!1),[K,B]=Y.useState(!1);Y.useEffect(()=>{ee.getFeedbackMeta().then(c).catch(()=>{})},[]);const U=(u==null?void 0:u.messageMin)??pg.messageMin,G=(u==null?void 0:u.messageMax)??pg.messageMax,Q=p.trim(),$=Math.max(0,U-Q.length),F=((V=u==null?void 0:u.topics)!=null&&V.length?u.topics:CN).filter(z=>z in wd),xe=async z=>{if(z.preventDefault(),!($>0||T)){L(!0);try{await ee.sendFeedback({message:Q,topic:d,rating:b||null,contact:N.trim()||null}),B(!0),o(s("feedbackSent"),"success")}catch(J){o(J.message,"error")}finally{L(!1)}}},Z=()=>{x(""),g(""),E(0),h("bug"),B(!1)};return K?r.jsxs("div",{className:"rounded-2xl border border-ok/30 bg-panel p-6 sm:p-8 text-center shadow-sm",children:[r.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-ok/10 text-ok flex items-center justify-center",children:r.jsx(ci,{size:26})}),r.jsx("h3",{className:"mt-4 text-lg font-bold text-text-main",children:s("feedbackSent")}),r.jsx("p",{className:"mt-2 mx-auto max-w-md text-xs sm:text-sm text-muted leading-relaxed",children:s("feedbackSentDesc")}),r.jsx("button",{type:"button",onClick:Z,className:"mt-6 inline-flex items-center justify-center px-4 h-11 rounded-xl border border-line bg-panel-raised text-text-main font-bold text-xs sm:text-sm hover:bg-panel-hover transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50",children:s("feedbackSendAnother")})]}):r.jsxs("div",{className:"flex flex-col gap-5",children:[r.jsxs("form",{onSubmit:xe,className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[r.jsxs("div",{className:"flex items-center gap-3 pb-4 border-b border-line",children:[r.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:r.jsx(Td,{size:20})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:s("feedbackTitle")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:s("feedbackDesc")})]})]}),r.jsxs("fieldset",{className:"flex flex-col gap-2",children:[r.jsx("legend",{className:"text-xs sm:text-sm font-bold text-text-main mb-2",children:s("feedbackTopicLabel")}),r.jsx("div",{className:"flex flex-wrap gap-2",children:F.map(z=>{const J=wd[z].icon,le=d===z;return r.jsxs("button",{type:"button","aria-pressed":le,onClick:()=>h(z),className:Xt("inline-flex items-center gap-2 px-3.5 py-2.5 min-h-[44px] rounded-xl border font-bold text-xs sm:text-sm transition-all focus-visible:ring-2 focus-visible:ring-brand-blue/50",le?"bg-brand-blue text-white border-brand-blue shadow-md shadow-brand-blue/20":"bg-panel-raised border-line text-muted hover:text-text-main hover:bg-panel-hover"),children:[r.jsx(J,{size:16,className:"shrink-0"}),r.jsx("span",{children:s(wd[z].labelKey)})]},z)})})]}),r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("label",{htmlFor:"feedback-message",className:"text-xs sm:text-sm font-bold text-text-main",children:s("feedbackMessageLabel")}),r.jsx("textarea",{id:"feedback-message",rows:6,required:!0,maxLength:G,value:p,onChange:z=>x(z.target.value),placeholder:s("feedbackMessagePlaceholder"),className:"w-full resize-y px-3.5 py-3 rounded-xl border border-line bg-panel-raised text-text-main text-xs sm:text-sm leading-relaxed focus:outline-none focus:ring-2 focus:ring-brand-blue/50"}),r.jsx("span",{className:"self-end text-[11px] text-muted tabular-nums",children:$>0?`${$} ${s("feedbackCharsNeeded")}`:`${p.length} / ${G}`})]}),r.jsxs("fieldset",{className:"flex flex-col gap-2",children:[r.jsx("legend",{className:"text-xs sm:text-sm font-bold text-text-main mb-1",children:s("feedbackRatingLabel")}),r.jsx("div",{className:"flex items-center gap-1",children:[1,2,3,4,5].map(z=>r.jsx("button",{type:"button","aria-label":`${z} / 5`,"aria-pressed":b===z,onClick:()=>E(b===z?0:z),className:"p-2 rounded-lg hover:bg-panel-hover transition-colors focus-visible:ring-2 focus-visible:ring-brand-blue/50",children:r.jsx(e2,{size:22,className:Xt("transition-colors",z<=b?"fill-brand-cyan text-brand-cyan":"text-muted")})},z))})]}),r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("label",{htmlFor:"feedback-contact",className:"text-xs sm:text-sm font-bold text-text-main",children:s("feedbackContactLabel")}),r.jsx("input",{id:"feedback-contact",type:"text",maxLength:200,value:N,onChange:z=>g(z.target.value),placeholder:s("feedbackContactPlaceholder"),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"})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 pt-1",children:[u!=null&&u.runtime?r.jsxs("span",{className:"text-[11px] text-muted",children:[s("feedbackRuntimeLabel"),": v",u.runtime.version," · ",u.runtime.platform]}):r.jsx("span",{}),r.jsxs("button",{type:"submit",disabled:$>0||T,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 font-bold text-xs sm:text-sm transition-all shadow-md shadow-brand-blue/20 focus-visible:ring-2 focus-visible:ring-brand-blue/50 disabled:opacity-50 disabled:cursor-not-allowed",children:[r.jsx(Td,{size:16}),r.jsx("span",{children:s(T?"feedbackSending":"feedbackSendBtn")})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(qd,{size:16,className:"text-brand-cyan shrink-0"}),r.jsx("h4",{className:"text-xs sm:text-sm font-bold text-text-main",children:s("feedbackWhatIsSent")})]}),r.jsx("p",{className:"text-xs sm:text-sm text-muted leading-relaxed",children:s("feedbackWhatIsSentDesc")}),r.jsxs("div",{className:"pt-2 border-t border-line flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[r.jsx("span",{className:"text-xs text-muted leading-relaxed",children:s("feedbackGithubHint")}),r.jsxs("a",{href:"https://github.com/Abdodiab2005/levix/issues",target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1.5 text-xs font-bold text-brand-cyan hover:underline whitespace-nowrap",children:[s("feedbackOpenGithub"),r.jsx(Bv,{size:13})]})]})]})]})},AN=["!","/",".","#","$","?"],EN=()=>{const{t:s,language:o,setLanguage:u}=an(),{toast:c}=Zn(),[d,h]=Y.useState("general"),[p,x]=Y.useState({}),[b,E]=Y.useState(!0),[N,g]=Y.useState("!"),[T,L]=Y.useState("!"),[K,B]=Y.useState(!1),[U,G]=Y.useState(""),[Q,$]=Y.useState(""),[F,xe]=Y.useState(""),[Z,V]=Y.useState(!1),[z,J]=Y.useState(!1),[le,ae]=Y.useState(!1),[W,ie]=Y.useState(!1),re=async()=>{try{const M=await ee.getSettings();if(M!=null&&M.settings){const me={};M.settings.forEach(X=>{me[X.key]=X.value}),x(me)}M!=null&&M.prefix&&(g(M.prefix),L(M.prefix))}catch(M){c(M.message,"error")}finally{E(!1)}};Y.useEffect(()=>{re()},[]);const ge=async(M,me)=>{x(X=>({...X,[M]:me}));try{await ee.updateSetting(M,me),c(s("savedSuccessfully"),"success")}catch(X){c(X.message,"error")}},A=async M=>{const me=(M!==void 0?M:T).trim();if(!me||me.length>3){c(s("prefixValidation"),"error");return}B(!0);try{await ee.updatePrefix(me),g(me),L(me),c(`${s("prefixUpdated")} (${me})`,"success")}catch(X){c(X.message,"error")}finally{B(!1)}},I=async M=>{if(M.preventDefault(),Q!==F){c(s("passwordMatchError"),"error");return}if(Q.length<8){c(s("passwordMinLength"),"error");return}V(!0);try{await ee.changePassword(U,Q),c(s("passwordChangedSuccess"),"success"),G(""),$(""),xe("")}catch(me){c(me.message,"error")}finally{V(!1)}};return b?r.jsxs("div",{className:"flex items-center justify-center p-12 text-muted",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-brand-cyan border-t-transparent rounded-full animate-spin mr-2"}),r.jsx("span",{className:"text-sm font-semibold",children:s("loading")})]}):r.jsxs("div",{className:"flex flex-col gap-5 sm:gap-6",children:[r.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:[r.jsxs("button",{type:"button",role:"tab","aria-selected":d==="general",onClick:()=>h("general"),className:Xt("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:[r.jsx(pb,{size:17,className:"shrink-0"}),r.jsx("span",{children:s("tabGeneral")})]}),r.jsxs("button",{type:"button",role:"tab","aria-selected":d==="integrations",onClick:()=>h("integrations"),className:Xt("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:[r.jsx(_d,{size:17,className:"shrink-0"}),r.jsx("span",{children:s("tabIntegrations")})]}),r.jsxs("button",{type:"button",role:"tab","aria-selected":d==="proxy",onClick:()=>h("proxy"),className:Xt("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:[r.jsx(ri,{size:17,className:"shrink-0"}),r.jsx("span",{children:s("tabProxy")})]}),r.jsxs("button",{type:"button",role:"tab","aria-selected":d==="security",onClick:()=>h("security"),className:Xt("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:[r.jsx(qd,{size:17,className:"shrink-0"}),r.jsx("span",{children:s("tabSecurity")})]}),r.jsxs("button",{type:"button",role:"tab","aria-selected":d==="storage",onClick:()=>h("storage"),className:Xt("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:[r.jsx(Ax,{size:17,className:"shrink-0"}),r.jsx("span",{children:s("tabStorage")})]}),r.jsxs("button",{type:"button",role:"tab","aria-selected":d==="feedback",onClick:()=>h("feedback"),className:Xt("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==="feedback"?"bg-brand-blue text-white shadow-md shadow-brand-blue/25":"text-muted hover:text-text-main hover:bg-panel-hover"),children:[r.jsx(Kv,{size:17,className:"shrink-0"}),r.jsx("span",{children:s("tabFeedback")})]})]}),d==="general"&&r.jsxs("div",{className:"flex flex-col gap-5",children:[r.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:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-4 border-b border-line",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.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:r.jsx(ts,{size:22})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:s("prefixTitle")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:s("prefixDesc")})]})]}),r.jsxs("div",{className:"flex items-center gap-2 self-start sm:self-auto",children:[r.jsxs("span",{className:"text-xs text-muted font-semibold",children:[s("activePrefix"),":"]}),r.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:N})]})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-4 pt-1",children:[r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx("span",{className:"text-xs text-muted font-semibold",children:s("prefixPresets")}),r.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:AN.map(M=>{const me=N===M;return r.jsx("button",{type:"button",className:Xt("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",me?"bg-brand-cyan text-slate-900 border-brand-cyan shadow-sm":"bg-panel-raised border-line text-text-main hover:bg-panel-hover"),onClick:()=>{L(M),A(M)},children:M},M)})})]}),r.jsxs("div",{className:"flex flex-col gap-1.5 flex-1 min-w-[200px]",children:[r.jsx("span",{className:"text-xs text-muted font-semibold",children:s("changePrefix")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.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:s("prefixPlaceholder"),value:T,onChange:M=>L(M.target.value),onKeyDown:M=>{M.key==="Enter"&&A()}}),r.jsxs("button",{type:"button",onClick:()=>A(),disabled:K||T.trim()===N,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:[r.jsx(to,{size:16}),r.jsx("span",{children:s(K?"saving":"prefixSaveBtn")})]})]})]})]}),r.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:[r.jsx("span",{className:"font-semibold text-muted",children:s("prefixPreview")}),r.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:r.jsxs("code",{children:[T||N,"help"]})}),r.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:r.jsxs("code",{children:[T||N,"lang ar"]})}),r.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:r.jsxs("code",{children:[T||N,"sticker"]})})]})]}),r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-4",children:[r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:o==="ar"?"سلوك النظام والردود":"System Behavior & Delays"}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("interfaceLanguage")}),r.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:o,onChange:M=>u(M.target.value),children:[r.jsx("option",{value:"ar",children:"العربية (RTL - اليمين لليسار)"}),r.jsx("option",{value:"en",children:"English (LTR - Left to Right)"})]}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("interfaceLanguageDesc")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("botLanguage")}),r.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=>ge("bot_language",M.target.value),children:[r.jsx("option",{value:"auto",children:s("langAuto")}),r.jsx("option",{value:"ar",children:s("langAr")}),r.jsx("option",{value:"en",children:s("langEn")})]}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("botLanguageDesc")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("botTimezone")}),r.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=>x({...p,bot_timezone:M.target.value}),onBlur:M=>ge("bot_timezone",M.target.value)}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("botTimezoneDesc")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("botMinDelay")}),r.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=>x({...p,bot_min_delay_ms:Number(M.target.value)}),onBlur:M=>ge("bot_min_delay_ms",Number(M.target.value))}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("delaysDesc")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("botMaxDelay")}),r.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=>x({...p,bot_max_delay_ms:Number(M.target.value)}),onBlur:M=>ge("bot_max_delay_ms",Number(M.target.value))})]})]})]})]}),d==="integrations"&&r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[r.jsxs("div",{className:"flex items-center gap-3.5 pb-4 border-b border-line",children:[r.jsx("div",{className:"w-11 h-11 rounded-xl bg-brand-cyan/10 text-brand-cyan flex items-center justify-center shrink-0",children:r.jsx(_d,{size:22})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:s("tabIntegrations")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:s("integrationsDesc")})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[r.jsx("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main mb-1",children:s("weatherApiKey")}),r.jsx("p",{className:"text-xs text-muted mb-3",children:o==="ar"?"مطلوب لتشغيل أمر الطقس والأحوال الجوية !weather":"Required for the !weather forecast command"}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:le?"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=>x({...p,openweathermap_api_key:M.target.value}),onBlur:M=>ge("openweathermap_api_key",M.target.value)}),r.jsx("button",{type:"button",onClick:()=>ae(!le),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:le?r.jsx(Hu,{size:16}):r.jsx($l,{size:16})})]})]})}),r.jsx("div",{className:"rounded-xl border border-line bg-panel-raised p-4 flex flex-col justify-between gap-3",children:r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main mb-1",children:s("youtubeApiKey")}),r.jsx("p",{className:"text-xs text-muted mb-3",children:o==="ar"?"مطلوب لأدوات البحث ومعلومات الفيديوهات من يوتيوب":"Required for YouTube search and video tools"}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:W?"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=>x({...p,youtube_api_key:M.target.value}),onBlur:M=>ge("youtube_api_key",M.target.value)}),r.jsx("button",{type:"button",onClick:()=>ie(!W),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:W?r.jsx(Hu,{size:16}):r.jsx($l,{size:16})})]})]})})]})]}),d==="proxy"&&r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[r.jsxs("div",{className:"flex items-center justify-between gap-3 pb-4 border-b border-line",children:[r.jsxs("div",{className:"flex items-center gap-3.5 min-w-0 flex-1",children:[r.jsx("div",{className:"w-11 h-11 rounded-xl bg-blue-500/10 text-brand-blue flex items-center justify-center shrink-0",children:r.jsx(ri,{size:22})}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main truncate",children:s("proxyTitle")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5 truncate",children:s("proxyDesc")})]})]}),r.jsx("div",{className:"shrink-0",children:r.jsx(Wa,{checked:!!p.whatsapp_proxy_enabled,onChange:M=>ge("whatsapp_proxy_enabled",M)})})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("proxyProtocol")}),r.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=>ge("whatsapp_proxy_protocol",M.target.value),children:[r.jsx("option",{value:"http",children:"HTTP"}),r.jsx("option",{value:"https",children:"HTTPS"}),r.jsx("option",{value:"socks5",children:"SOCKS5"})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("proxyHost")}),r.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=>x({...p,whatsapp_proxy_host:M.target.value}),onBlur:M=>ge("whatsapp_proxy_host",M.target.value)})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("proxyPort")}),r.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=>x({...p,whatsapp_proxy_port:Number(M.target.value)}),onBlur:M=>ge("whatsapp_proxy_port",Number(M.target.value))})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("proxyUsername")}),r.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=>x({...p,whatsapp_proxy_username:M.target.value}),onBlur:M=>ge("whatsapp_proxy_username",M.target.value)})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("proxyPassword")}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:z?"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=>x({...p,whatsapp_proxy_password:M.target.value}),onBlur:M=>ge("whatsapp_proxy_password",M.target.value)}),r.jsx("button",{type:"button",onClick:()=>J(!z),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:z?r.jsx(Hu,{size:16}):r.jsx($l,{size:16})})]})]})]})]}),d==="security"&&r.jsx("div",{className:"flex flex-col gap-5",children:r.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:[r.jsxs("div",{className:"flex items-center gap-3 pb-3 border-b border-line",children:[r.jsx(Yv,{size:20,className:"text-ok"}),r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:s("changePassword")})]}),r.jsxs("form",{onSubmit:I,className:"flex flex-col gap-3.5",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("currentPassword")}),r.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:U,onChange:M=>G(M.target.value)})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("newPassword")}),r.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:Q,onChange:M=>$(M.target.value)}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("passwordMinLength")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("confirmPassword")}),r.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:F,onChange:M=>xe(M.target.value)})]}),r.jsxs("button",{type:"submit",disabled:Z,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:[r.jsx(to,{size:16}),r.jsx("span",{children:s(Z?"saving":"save")})]})]})]})}),d==="storage"&&r.jsxs("div",{className:"rounded-2xl border border-line bg-panel p-4 sm:p-6 shadow-sm flex flex-col gap-5",children:[r.jsxs("div",{className:"flex items-center gap-3.5 pb-4 border-b border-line",children:[r.jsx("div",{className:"w-11 h-11 rounded-xl bg-purple-500/10 text-purple-400 flex items-center justify-center shrink-0",children:r.jsx(Ax,{size:22})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-base sm:text-lg font-bold text-text-main",children:s("storageTitle")}),r.jsx("p",{className:"text-xs sm:text-sm text-muted mt-0.5",children:s("storageDesc")})]})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("forwardTtl")}),r.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=>x({...p,forward_score_ttl_days:Number(M.target.value)}),onBlur:M=>ge("forward_score_ttl_days",Number(M.target.value))}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("forwardTtlDesc")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-xs sm:text-sm font-bold text-text-main",children:s("maxFetchBytes")}),r.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=>x({...p,max_fetch_bytes:Number(M.target.value)}),onBlur:M=>ge("max_fetch_bytes",Number(M.target.value))}),r.jsx("span",{className:"block text-[11px] text-muted",children:s("maxFetchBytesDesc")})]})]})]}),d==="feedback"&&r.jsx(TN,{})]})},zN=()=>{const{t:s}=an(),{toast:o}=Zn(),[u,c]=Y.useState(()=>{const B=window.location.hash.replace(/^#/,"");return["overview","connection","commands","ai","groups","schedules","settings","logs"].includes(B)?B:"overview"}),[d,h]=Y.useState(!1),{sessionStatus:p,socket:x}=J5((B,U)=>{if(B==="status"){const G=U==null?void 0:U.state;o(`Connection state: ${G}`,"info")}}),[b,E]=Y.useState(null),N=Y.useCallback(async()=>{try{const B=await ee.getSession();B!=null&&B.session?E({...B.session,qr:B.qr??null,pairingCode:B.pairingCode??null}):B!=null&&B.status&&E(B.status)}catch{}},[]);Y.useEffect(()=>{N()},[N]);const g=b||p?{state:(p==null?void 0:p.state)||(b==null?void 0:b.state)||"idle",...b||{},...p||{}}:null,T=(g==null?void 0:g.connected)===!0||(g==null?void 0:g.state)==="connected";Y.useEffect(()=>{const B=g==null?void 0:g.state,G=B==="starting"||B==="linking"||B==="reconnecting"||B==="waiting_for_qr"&&!(g!=null&&g.qr)&&!(g!=null&&g.pairingCode)?2e3:15e3,Q=setInterval(()=>{N()},G);return()=>clearInterval(Q)},[g==null?void 0:g.state,g==null?void 0:g.qr,g==null?void 0:g.pairingCode,N]);const L=B=>{c(B),window.location.hash=B};Y.useEffect(()=>{const B=()=>{const U=window.location.hash.replace(/^#/,"");U&&c(U)};return window.addEventListener("hashchange",B),()=>window.removeEventListener("hashchange",B)},[]);const K={overview:s("overview"),connection:s("connection"),commands:s("commands"),ai:s("ai"),groups:s("groups"),schedules:s("schedules"),settings:s("settings"),logs:s("logs")};return r.jsxs("div",{className:"min-h-screen min-h-[100dvh] flex bg-bg text-text-main bg-ambient-glow overflow-x-hidden relative",children:[r.jsx(W2,{currentView:u,onSelectView:L,isOpenMobile:d,onCloseMobile:()=>h(!1)}),r.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[r.jsx(i2,{onToggleMobileMenu:()=>h(B=>!B),title:K[u]||"Dashboard",status:g}),r.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto p-4 sm:p-6 lg:p-8",children:[u==="overview"&&r.jsx(wN,{status:g,onNavigate:L}),u==="connection"&&r.jsx(yN,{status:g,onRefresh:N,onStatusUpdate:B=>E(U=>({...U||{},...B}))}),u==="ai"&&r.jsx(I5,{}),u==="commands"&&r.jsx(P5,{}),u==="schedules"&&r.jsx(_N,{isConnected:T,onNavigate:L}),u==="groups"&&r.jsx(vN,{}),u==="settings"&&r.jsx(EN,{}),u==="logs"&&r.jsx(NN,{socket:x})]})]})]})},kN=()=>r.jsx(s2,{children:r.jsx(e5,{children:r.jsx(zN,{})})}),xg=document.getElementById("root");xg&&xv.createRoot(xg).render(r.jsx(si.StrictMode,{children:r.jsx(kN,{})}));
|