var _b=Object.defineProperty;var jb=(n,a,r)=>a in n?_b(n,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[a]=r;var Sa=(n,a,r)=>jb(n,typeof a!="symbol"?a+"":a,r);(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(o){if(o.ep)return;o.ep=!0;const u=r(o);fetch(o.href,u)}})();try{}catch(n){console.error("[wxt] Failed to initialize plugins",n)}function Ci(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Ob(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var a=n.default;if(typeof a=="function"){var r=function s(){return this instanceof s?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};r.prototype=a.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(n).forEach(function(s){var o=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:function(){return n[s]}})}),r}var Bf={exports:{}},Hl={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Zm;function Fb(){if(Zm)return Hl;Zm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(s,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:n,type:s,key:c,ref:o!==void 0?o:null,props:u}}return Hl.Fragment=a,Hl.jsx=r,Hl.jsxs=r,Hl}var e0;function Vb(){return e0||(e0=1,Bf.exports=Fb()),Bf.exports}var h=Vb(),Sf={exports:{}},Gl={},Nf={exports:{}},kf={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var t0;function Hb(){return t0||(t0=1,function(n){function a(Y,ae){var xe=Y.length;Y.push(ae);e:for(;0<xe;){var Me=xe-1>>>1,G=Y[Me];if(0<o(G,ae))Y[Me]=ae,Y[xe]=G,xe=Me;else break e}}function r(Y){return Y.length===0?null:Y[0]}function s(Y){if(Y.length===0)return null;var ae=Y[0],xe=Y.pop();if(xe!==ae){Y[0]=xe;e:for(var Me=0,G=Y.length,re=G>>>1;Me<re;){var ye=2*(Me+1)-1,Re=Y[ye],Ve=ye+1,Je=Y[Ve];if(0>o(Re,xe))Ve<G&&0>o(Je,Re)?(Y[Me]=Je,Y[Ve]=xe,Me=Ve):(Y[Me]=Re,Y[ye]=xe,Me=ye);else if(Ve<G&&0>o(Je,xe))Y[Me]=Je,Y[Ve]=xe,Me=Ve;else break e}}return ae}function o(Y,ae){var xe=Y.sortIndex-ae.sortIndex;return xe!==0?xe:Y.id-ae.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();n.unstable_now=function(){return c.now()-d}}var p=[],A=[],E=1,v=null,C=3,S=!1,k=!1,D=!1,R=!1,N=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function P(Y){for(var ae=r(A);ae!==null;){if(ae.callback===null)s(A);else if(ae.startTime<=Y)s(A),ae.sortIndex=ae.expirationTime,a(p,ae);else break;ae=r(A)}}function V(Y){if(D=!1,P(Y),!k)if(r(p)!==null)k=!0,de||(de=!0,pe());else{var ae=r(A);ae!==null&&Ee(V,ae.startTime-Y)}}var de=!1,ce=-1,Z=5,X=-1;function K(){return R?!0:!(n.unstable_now()-X<Z)}function ee(){if(R=!1,de){var Y=n.unstable_now();X=Y;var ae=!0;try{e:{k=!1,D&&(D=!1,U(ce),ce=-1),S=!0;var xe=C;try{t:{for(P(Y),v=r(p);v!==null&&!(v.expirationTime>Y&&K());){var Me=v.callback;if(typeof Me=="function"){v.callback=null,C=v.priorityLevel;var G=Me(v.expirationTime<=Y);if(Y=n.unstable_now(),typeof G=="function"){v.callback=G,P(Y),ae=!0;break t}v===r(p)&&s(p),P(Y)}else s(p);v=r(p)}if(v!==null)ae=!0;else{var re=r(A);re!==null&&Ee(V,re.startTime-Y),ae=!1}}break e}finally{v=null,C=xe,S=!1}ae=void 0}}finally{ae?pe():de=!1}}}var pe;if(typeof j=="function")pe=function(){j(ee)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Ne=ge.port2;ge.port1.onmessage=ee,pe=function(){Ne.postMessage(null)}}else pe=function(){N(ee,0)};function Ee(Y,ae){ce=N(function(){Y(n.unstable_now())},ae)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(Y){switch(C){case 1:case 2:case 3:var ae=3;break;default:ae=C}var xe=C;C=ae;try{return Y()}finally{C=xe}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(Y,ae){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var xe=C;C=Y;try{return ae()}finally{C=xe}},n.unstable_scheduleCallback=function(Y,ae,xe){var Me=n.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?Me+xe:Me):xe=Me,Y){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=xe+G,Y={id:E++,callback:ae,priorityLevel:Y,startTime:xe,expirationTime:G,sortIndex:-1},xe>Me?(Y.sortIndex=xe,a(A,Y),r(p)===null&&Y===r(A)&&(D?(U(ce),ce=-1):D=!0,Ee(V,xe-Me))):(Y.sortIndex=G,a(p,Y),k||S||(k=!0,de||(de=!0,pe()))),Y},n.unstable_shouldYield=K,n.unstable_wrapCallback=function(Y){var ae=C;return function(){var xe=C;C=ae;try{return Y.apply(this,arguments)}finally{C=xe}}}}(kf)),kf}var a0;function Gb(){return a0||(a0=1,Nf.exports=Hb()),Nf.exports}var Tf={exports:{}},ct={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n0;function Pb(){if(n0)return ct;n0=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),v=Symbol.iterator;function C(G){return G===null||typeof G!="object"?null:(G=v&&G[v]||G["@@iterator"],typeof G=="function"?G:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,D={};function R(G,re,ye){this.props=G,this.context=re,this.refs=D,this.updater=ye||S}R.prototype.isReactComponent={},R.prototype.setState=function(G,re){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,re,"setState")},R.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function N(){}N.prototype=R.prototype;function U(G,re,ye){this.props=G,this.context=re,this.refs=D,this.updater=ye||S}var j=U.prototype=new N;j.constructor=U,k(j,R.prototype),j.isPureReactComponent=!0;var P=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},de=Object.prototype.hasOwnProperty;function ce(G,re,ye,Re,Ve,Je){return ye=Je.ref,{$$typeof:n,type:G,key:re,ref:ye!==void 0?ye:null,props:Je}}function Z(G,re){return ce(G.type,re,void 0,void 0,void 0,G.props)}function X(G){return typeof G=="object"&&G!==null&&G.$$typeof===n}function K(G){var re={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(ye){return re[ye]})}var ee=/\/+/g;function pe(G,re){return typeof G=="object"&&G!==null&&G.key!=null?K(""+G.key):re.toString(36)}function ge(){}function Ne(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(ge,ge):(G.status="pending",G.then(function(re){G.status==="pending"&&(G.status="fulfilled",G.value=re)},function(re){G.status==="pending"&&(G.status="rejected",G.reason=re)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function Ee(G,re,ye,Re,Ve){var Je=typeof G;(Je==="undefined"||Je==="boolean")&&(G=null);var He=!1;if(G===null)He=!0;else switch(Je){case"bigint":case"string":case"number":He=!0;break;case"object":switch(G.$$typeof){case n:case a:He=!0;break;case E:return He=G._init,Ee(He(G._payload),re,ye,Re,Ve)}}if(He)return Ve=Ve(G),He=Re===""?"."+pe(G,0):Re,P(Ve)?(ye="",He!=null&&(ye=He.replace(ee,"$&/")+"/"),Ee(Ve,re,ye,"",function(bt){return bt})):Ve!=null&&(X(Ve)&&(Ve=Z(Ve,ye+(Ve.key==null||G&&G.key===Ve.key?"":(""+Ve.key).replace(ee,"$&/")+"/")+He)),re.push(Ve)),1;He=0;var Et=Re===""?".":Re+":";if(P(G))for(var We=0;We<G.length;We++)Re=G[We],Je=Et+pe(Re,We),He+=Ee(Re,re,ye,Je,Ve);else if(We=C(G),typeof We=="function")for(G=We.call(G),We=0;!(Re=G.next()).done;)Re=Re.value,Je=Et+pe(Re,We++),He+=Ee(Re,re,ye,Je,Ve);else if(Je==="object"){if(typeof G.then=="function")return Ee(Ne(G),re,ye,Re,Ve);throw re=String(G),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return He}function Y(G,re,ye){if(G==null)return G;var Re=[],Ve=0;return Ee(G,Re,"","",function(Je){return re.call(ye,Je,Ve++)}),Re}function ae(G){if(G._status===-1){var re=G._result;re=re(),re.then(function(ye){(G._status===0||G._status===-1)&&(G._status=1,G._result=ye)},function(ye){(G._status===0||G._status===-1)&&(G._status=2,G._result=ye)}),G._status===-1&&(G._status=0,G._result=re)}if(G._status===1)return G._result.default;throw G._result}var xe=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var re=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(re))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function Me(){}return ct.Children={map:Y,forEach:function(G,re,ye){Y(G,function(){re.apply(this,arguments)},ye)},count:function(G){var re=0;return Y(G,function(){re++}),re},toArray:function(G){return Y(G,function(re){return re})||[]},only:function(G){if(!X(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},ct.Component=R,ct.Fragment=r,ct.Profiler=o,ct.PureComponent=U,ct.StrictMode=s,ct.Suspense=p,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ct.__COMPILER_RUNTIME={__proto__:null,c:function(G){return V.H.useMemoCache(G)}},ct.cache=function(G){return function(){return G.apply(null,arguments)}},ct.cloneElement=function(G,re,ye){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var Re=k({},G.props),Ve=G.key,Je=void 0;if(re!=null)for(He in re.ref!==void 0&&(Je=void 0),re.key!==void 0&&(Ve=""+re.key),re)!de.call(re,He)||He==="key"||He==="__self"||He==="__source"||He==="ref"&&re.ref===void 0||(Re[He]=re[He]);var He=arguments.length-2;if(He===1)Re.children=ye;else if(1<He){for(var Et=Array(He),We=0;We<He;We++)Et[We]=arguments[We+2];Re.children=Et}return ce(G.type,Ve,void 0,void 0,Je,Re)},ct.createContext=function(G){return G={$$typeof:c,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:u,_context:G},G},ct.createElement=function(G,re,ye){var Re,Ve={},Je=null;if(re!=null)for(Re in re.key!==void 0&&(Je=""+re.key),re)de.call(re,Re)&&Re!=="key"&&Re!=="__self"&&Re!=="__source"&&(Ve[Re]=re[Re]);var He=arguments.length-2;if(He===1)Ve.children=ye;else if(1<He){for(var Et=Array(He),We=0;We<He;We++)Et[We]=arguments[We+2];Ve.children=Et}if(G&&G.defaultProps)for(Re in He=G.defaultProps,He)Ve[Re]===void 0&&(Ve[Re]=He[Re]);return ce(G,Je,void 0,void 0,null,Ve)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(G){return{$$typeof:d,render:G}},ct.isValidElement=X,ct.lazy=function(G){return{$$typeof:E,_payload:{_status:-1,_result:G},_init:ae}},ct.memo=function(G,re){return{$$typeof:A,type:G,compare:re===void 0?null:re}},ct.startTransition=function(G){var re=V.T,ye={};V.T=ye;try{var Re=G(),Ve=V.S;Ve!==null&&Ve(ye,Re),typeof Re=="object"&&Re!==null&&typeof Re.then=="function"&&Re.then(Me,xe)}catch(Je){xe(Je)}finally{V.T=re}},ct.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ct.use=function(G){return V.H.use(G)},ct.useActionState=function(G,re,ye){return V.H.useActionState(G,re,ye)},ct.useCallback=function(G,re){return V.H.useCallback(G,re)},ct.useContext=function(G){return V.H.useContext(G)},ct.useDebugValue=function(){},ct.useDeferredValue=function(G,re){return V.H.useDeferredValue(G,re)},ct.useEffect=function(G,re,ye){var Re=V.H;if(typeof ye=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Re.useEffect(G,re)},ct.useId=function(){return V.H.useId()},ct.useImperativeHandle=function(G,re,ye){return V.H.useImperativeHandle(G,re,ye)},ct.useInsertionEffect=function(G,re){return V.H.useInsertionEffect(G,re)},ct.useLayoutEffect=function(G,re){return V.H.useLayoutEffect(G,re)},ct.useMemo=function(G,re){return V.H.useMemo(G,re)},ct.useOptimistic=function(G,re){return V.H.useOptimistic(G,re)},ct.useReducer=function(G,re,ye){return V.H.useReducer(G,re,ye)},ct.useRef=function(G){return V.H.useRef(G)},ct.useState=function(G){return V.H.useState(G)},ct.useSyncExternalStore=function(G,re,ye){return V.H.useSyncExternalStore(G,re,ye)},ct.useTransition=function(){return V.H.useTransition()},ct.version="19.1.0",ct}var r0;function vA(){return r0||(r0=1,Tf.exports=Pb()),Tf.exports}var Df={exports:{}},Va={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var i0;function zb(){if(i0)return Va;i0=1;var n=vA();function a(p){var A="https://react.dev/errors/"+p;if(1<arguments.length){A+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)A+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+p+"; visit "+A+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,A,E){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:A,implementation:E}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,A){if(p==="font")return"";if(typeof A=="string")return A==="use-credentials"?A:""}return Va.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Va.createPortal=function(p,A){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error(a(299));return u(p,A,null,E)},Va.flushSync=function(p){var A=c.T,E=s.p;try{if(c.T=null,s.p=2,p)return p()}finally{c.T=A,s.p=E,s.d.f()}},Va.preconnect=function(p,A){typeof p=="string"&&(A?(A=A.crossOrigin,A=typeof A=="string"?A==="use-credentials"?A:"":void 0):A=null,s.d.C(p,A))},Va.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},Va.preinit=function(p,A){if(typeof p=="string"&&A&&typeof A.as=="string"){var E=A.as,v=d(E,A.crossOrigin),C=typeof A.integrity=="string"?A.integrity:void 0,S=typeof A.fetchPriority=="string"?A.fetchPriority:void 0;E==="style"?s.d.S(p,typeof A.precedence=="string"?A.precedence:void 0,{crossOrigin:v,integrity:C,fetchPriority:S}):E==="script"&&s.d.X(p,{crossOrigin:v,integrity:C,fetchPriority:S,nonce:typeof A.nonce=="string"?A.nonce:void 0})}},Va.preinitModule=function(p,A){if(typeof p=="string")if(typeof A=="object"&&A!==null){if(A.as==null||A.as==="script"){var E=d(A.as,A.crossOrigin);s.d.M(p,{crossOrigin:E,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0})}}else A==null&&s.d.M(p)},Va.preload=function(p,A){if(typeof p=="string"&&typeof A=="object"&&A!==null&&typeof A.as=="string"){var E=A.as,v=d(E,A.crossOrigin);s.d.L(p,E,{crossOrigin:v,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0,type:typeof A.type=="string"?A.type:void 0,fetchPriority:typeof A.fetchPriority=="string"?A.fetchPriority:void 0,referrerPolicy:typeof A.referrerPolicy=="string"?A.referrerPolicy:void 0,imageSrcSet:typeof A.imageSrcSet=="string"?A.imageSrcSet:void 0,imageSizes:typeof A.imageSizes=="string"?A.imageSizes:void 0,media:typeof A.media=="string"?A.media:void 0})}},Va.preloadModule=function(p,A){if(typeof p=="string")if(A){var E=d(A.as,A.crossOrigin);s.d.m(p,{as:typeof A.as=="string"&&A.as!=="script"?A.as:void 0,crossOrigin:E,integrity:typeof A.integrity=="string"?A.integrity:void 0})}else s.d.m(p)},Va.requestFormReset=function(p){s.d.r(p)},Va.unstable_batchedUpdates=function(p,A){return p(A)},Va.useFormState=function(p,A,E){return c.H.useFormState(p,A,E)},Va.useFormStatus=function(){return c.H.useHostTransitionStatus()},Va.version="19.1.0",Va}var s0;function qb(){if(s0)return Df.exports;s0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Df.exports=zb(),Df.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var l0;function Yb(){if(l0)return Gl;l0=1;var n=Gb(),a=vA(),r=qb();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function c(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 d(e){if(u(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(s(188));return t!==e?null:e}for(var i=e,l=t;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){i=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return d(f),e;if(m===l)return d(f),t;m=m.sibling}throw Error(s(188))}if(i.return!==l.return)i=f,l=m;else{for(var x=!1,M=f.child;M;){if(M===i){x=!0,i=f,l=m;break}if(M===l){x=!0,l=f,i=m;break}M=M.sibling}if(!x){for(M=m.child;M;){if(M===i){x=!0,i=m,l=f;break}if(M===l){x=!0,l=m,i=f;break}M=M.sibling}if(!x)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,v=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),j=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function Ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case R:return"Profiler";case D:return"StrictMode";case V:return"Suspense";case de:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case j:return(e.displayName||"Context")+".Provider";case U:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ce:return t=e.displayName||null,t!==null?t:Ne(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return Ne(e(t))}catch{}}return null}var Ee=Array.isArray,Y=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe={pending:!1,data:null,method:null,action:null},Me=[],G=-1;function re(e){return{current:e}}function ye(e){0>G||(e.current=Me[G],Me[G]=null,G--)}function Re(e,t){G++,Me[G]=e.current,e.current=t}var Ve=re(null),Je=re(null),He=re(null),Et=re(null);function We(e,t){switch(Re(He,t),Re(Je,e),Re(Ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sm(t),e=Nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ye(Ve),Re(Ve,e)}function bt(){ye(Ve),ye(Je),ye(He)}function Kt(e){e.memoizedState!==null&&Re(Et,e);var t=Ve.current,i=Nm(t,e.type);t!==i&&(Re(Je,e),Re(Ve,i))}function Ta(e){Je.current===e&&(ye(Ve),ye(Je)),Et.current===e&&(ye(Et),_l._currentValue=xe)}var Qt=Object.prototype.hasOwnProperty,Vt=n.unstable_scheduleCallback,Ft=n.unstable_cancelCallback,va=n.unstable_shouldYield,Te=n.unstable_requestPaint,Oe=n.unstable_now,nt=n.unstable_getCurrentPriorityLevel,lt=n.unstable_ImmediatePriority,F=n.unstable_UserBlockingPriority,J=n.unstable_NormalPriority,ie=n.unstable_LowPriority,ke=n.unstable_IdlePriority,Le=n.log,we=n.unstable_setDisableYieldValue,Ge=null,T=null;function b(e){if(typeof Le=="function"&&we(e),T&&typeof T.setStrictMode=="function")try{T.setStrictMode(Ge,e)}catch{}}var w=Math.clz32?Math.clz32:Ae,H=Math.log,$=Math.LN2;function Ae(e){return e>>>=0,e===0?32:31-(H(e)/$|0)|0}var be=256,Qe=4194304;function mt(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 ft(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var f=0,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var M=l&134217727;return M!==0?(l=M&~m,l!==0?f=mt(l):(x&=M,x!==0?f=mt(x):i||(i=M&~e,i!==0&&(f=mt(i))))):(M=l&~m,M!==0?f=mt(M):x!==0?f=mt(x):i||(i=l&~e,i!==0&&(f=mt(i)))),f===0?0:t!==0&&t!==f&&(t&m)===0&&(m=f&-f,i=t&-t,m>=i||m===32&&(i&4194048)!==0)?t:f}function vt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ot(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 ns(){var e=be;return be<<=1,(be&4194048)===0&&(be=256),e}function on(){var e=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),e}function jr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rs(e,t,i,l,f,m){var x=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var M=e.entanglements,z=e.expirationTimes,ue=e.hiddenUpdates;for(i=x&~i;0<i;){var ve=31-w(i),Se=1<<ve;M[ve]=0,z[ve]=-1;var fe=ue[ve];if(fe!==null)for(ue[ve]=null,ve=0;ve<fe.length;ve++){var he=fe[ve];he!==null&&(he.lane&=-536870913)}i&=~Se}l!==0&&_e(e,l,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(x&~t))}function _e(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-w(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&4194090}function is(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-w(i),f=1<<l;f&t|e[l]&t&&(e[l]|=t),i&=~f}}function Ii(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 wa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Or(){var e=ae.p;return e!==0?e:(e=window.event,e===void 0?32:Ym(e.type))}function Bi(e,t){var i=ae.p;try{return ae.p=e,t()}finally{ae.p=i}}var $a=Math.random().toString(36).slice(2),_t="__reactFiber$"+$a,fa="__reactProps$"+$a,Jt="__reactContainer$"+$a,Fr="__reactEvents$"+$a,Xn="__reactListeners$"+$a,ss="__reactHandles$"+$a,Si="__reactResources$"+$a,bn="__reactMarker$"+$a;function aa(e){delete e[_t],delete e[fa],delete e[Fr],delete e[Xn],delete e[ss]}function Un(e){var t=e[_t];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Jt]||i[_t]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Lm(e);e!==null;){if(i=e[_t])return i;e=Lm(e)}return t}e=i,i=e.parentNode}return null}function $n(e){if(e=e[_t]||e[Jt]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Mn(e){var t=e[Si];return t||(t=e[Si]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ht(e){e[bn]=!0}var Ni=new Set,Ar={};function _n(e,t){Aa(e,t),Aa(e+"Capture",t)}function Aa(e,t){for(Ar[e]=t,e=0;e<t.length;e++)Ni.add(t[e])}var Wa=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]*$"),Vr={},ki={};function ls(e){return Qt.call(ki,e)?!0:Qt.call(Vr,e)?!1:Wa.test(e)?ki[e]=!0:(Vr[e]=!0,!1)}function vn(e,t,i){if(ls(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function hr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function _a(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}var Hr,jn;function wn(e){if(Hr===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Hr=t&&t[1]||"",jn=-1<i.stack.indexOf(`
    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Hr+e+jn}var $t=!1;function Gr(e,t){if(!e||$t)return"";$t=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(he){var fe=he}Reflect.construct(e,[],Se)}else{try{Se.call()}catch(he){fe=he}e.call(Se.prototype)}}else{try{throw Error()}catch(he){fe=he}(Se=e())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(he){if(he&&fe&&typeof he.stack=="string")return[he.stack,fe.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),x=m[0],M=m[1];if(x&&M){var z=x.split(`
`),ue=M.split(`
`);for(f=l=0;l<z.length&&!z[l].includes("DetermineComponentFrameRoot");)l++;for(;f<ue.length&&!ue[f].includes("DetermineComponentFrameRoot");)f++;if(l===z.length||f===ue.length)for(l=z.length-1,f=ue.length-1;1<=l&&0<=f&&z[l]!==ue[f];)f--;for(;1<=l&&0<=f;l--,f--)if(z[l]!==ue[f]){if(l!==1||f!==1)do if(l--,f--,0>f||z[l]!==ue[f]){var ve=`
`+z[l].replace(" at new "," at ");return e.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",e.displayName)),ve}while(1<=l&&0<=f);break}}}finally{$t=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?wn(i):""}function os(e){switch(e.tag){case 26:case 27:case 5:return wn(e.type);case 16:return wn("Lazy");case 13:return wn("Suspense");case 19:return wn("SuspenseList");case 0:case 15:return Gr(e.type,!1);case 11:return Gr(e.type.render,!1);case 1:return Gr(e.type,!0);case 31:return wn("Activity");default:return""}}function us(e){try{var t="";do t+=os(e),e=e.return;while(e);return t}catch(i){return`
Error generating stack: `+i.message+`
`+i.stack}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ut(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kt(e){var t=ut(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var f=i.get,m=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(x){l=""+x,m.call(this,x)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function On(e){e._valueTracker||(e._valueTracker=kt(e))}function Wn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=ut(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function na(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Pr=/[\n"\\]/g;function Da(e){return e.replace(Pr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ti(e,t,i,l,f,m,x,M){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?gr(e,x,jt(t)):i!=null?gr(e,x,jt(i)):l!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+jt(M):e.removeAttribute("name")}function Zn(e,t,i,l,f,m,x,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),t!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||t!=null))return;i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,M||t===e.value||(e.value=t),e.defaultValue=t}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=M?e.checked:!!l,e.defaultChecked=!!l,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function gr(e,t,i){t==="number"&&na(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function xn(e,t,i,l){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&l&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,l&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function zr(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function Di(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(s(92));if(Ee(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l)}function Cn(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var mr=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 B(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||mr.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function L(e,t,i){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var f in t)l=t[f],t.hasOwnProperty(f)&&i[f]!==l&&B(e,f,l)}else for(var m in t)t.hasOwnProperty(m)&&B(e,m,t[m])}function O(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 te=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ie=/^[\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 Be(e){return Ie.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Ue=null;function Fe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wt=null,je=null;function ha(e){var t=$n(e);if(t&&(e=t.stateNode)){var i=e[fa]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ti(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Da(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var f=l[fa]||null;if(!f)throw Error(s(90));Ti(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&Wn(l)}break e;case"textarea":zr(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&xn(e,!!i.multiple,t,!1)}}}var Wt=!1;function za(e,t,i){if(Wt)return e(t,i);Wt=!0;try{var l=e(t);return l}finally{if(Wt=!1,(wt!==null||je!==null)&&(Wo(),wt&&(t=wt,e=je,je=wt=null,ha(t),e)))for(t=0;t<e.length;t++)ha(e[t])}}function un(e,t){var i=e.stateNode;if(i===null)return null;var l=i[fa]||null;if(l===null)return null;i=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,t,typeof i));return i}var Ut=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gt=!1;if(Ut)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){Gt=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{Gt=!1}var ra=null,g=null,y=null;function I(){if(y)return y;var e,t=g,i=t.length,l,f="value"in ra?ra.value:ra.textContent,m=f.length;for(e=0;e<i&&t[e]===f[e];e++);var x=i-e;for(l=1;l<=x&&t[i-l]===f[m-l];l++);return y=f.slice(e,1<l?1-l:void 0)}function _(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 q(){return!0}function le(){return!1}function me(e){function t(i,l,f,m,x){this._reactName=i,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(i=e[M],this[M]=i?i(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?q:le,this.isPropagationStopped=le,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=q)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=q)},persist:function(){},isPersistent:q}),t}var Pe={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},st=me(Pe),rt=E({},Pe,{view:0,detail:0}),Pt=me(rt),xa,cs,Li,Ri=E({},rt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tl,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!==Li&&(Li&&e.type==="mousemove"?(xa=e.screenX-Li.screenX,cs=e.screenY-Li.screenY):cs=xa=0,Li=e),xa)},movementY:function(e){return"movementY"in e?e.movementY:cs}}),Ao=me(Ri),ho=E({},Ri,{dataTransfer:0}),Ac=me(ho),hc=E({},rt,{relatedTarget:0}),Zs=me(hc),gc=E({},Pe,{animationName:0,elapsedTime:0,pseudoElement:0}),mc=me(gc),pc=E({},Pe,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yc=me(pc),Ec=E({},Pe,{data:0}),el=me(Ec),bc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vc={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"},wc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xc(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wc[e])?!!t[e]:!1}function tl(){return xc}var Cc=E({},rt,{key:function(e){if(e.key){var t=bc[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tl,charCode:function(e){return e.type==="keypress"?_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ic=me(Cc),go=E({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mo=me(go),Bc=E({},rt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tl}),Sc=me(Bc),Nc=E({},Pe,{propertyName:0,elapsedTime:0,pseudoElement:0}),kc=me(Nc),Tc=E({},Ri,{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}),po=me(Tc),Dc=E({},Pe,{newState:0,oldState:0}),Lc=me(Dc),Rc=[9,13,27,32],qr=Ut&&"CompositionEvent"in window,Yr=null;Ut&&"documentMode"in document&&(Yr=document.documentMode);var yo=Ut&&"TextEvent"in window&&!Yr,al=Ut&&(!qr||Yr&&8<Yr&&11>=Yr),se=" ",De=!1;function ze(e,t){switch(e){case"keyup":return Rc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $e(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var et=!1;function It(e,t){switch(e){case"compositionend":return $e(t);case"keypress":return t.which!==32?null:(De=!0,se);case"textInput":return e=t.data,e===se&&De?null:e;default:return null}}function cn(e,t){if(et)return e==="compositionend"||!qr&&ze(e,t)?(e=I(),y=g=ra=null,et=!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 al&&t.locale!=="ko"?null:t.data;default:return null}}var Za={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 Oa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Za[e.type]:t==="textarea"}function en(e,t,i,l){wt?je?je.push(l):je=[l]:wt=l,t=ru(t,"onChange"),0<t.length&&(i=new st("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var pr=null,dn=null;function Qc(e){wm(e,0)}function Eo(e){var t=Pa(e);if(Wn(t))return e}function GA(e,t){if(e==="change")return t}var PA=!1;if(Ut){var Uc;if(Ut){var Mc="oninput"in document;if(!Mc){var zA=document.createElement("div");zA.setAttribute("oninput","return;"),Mc=typeof zA.oninput=="function"}Uc=Mc}else Uc=!1;PA=Uc&&(!document.documentMode||9<document.documentMode)}function qA(){pr&&(pr.detachEvent("onpropertychange",YA),dn=pr=null)}function YA(e){if(e.propertyName==="value"&&Eo(dn)){var t=[];en(t,dn,e,Fe(e)),za(Qc,t)}}function AE(e,t,i){e==="focusin"?(qA(),pr=t,dn=i,pr.attachEvent("onpropertychange",YA)):e==="focusout"&&qA()}function hE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Eo(dn)}function gE(e,t){if(e==="click")return Eo(t)}function mE(e,t){if(e==="input"||e==="change")return Eo(t)}function pE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fn=typeof Object.is=="function"?Object.is:pE;function nl(e,t){if(fn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var f=i[l];if(!Qt.call(t,f)||!fn(e[f],t[f]))return!1}return!0}function KA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function JA(e,t){var i=KA(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=KA(i)}}function XA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?XA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $A(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=na(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=na(e.document)}return t}function _c(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 yE=Ut&&"documentMode"in document&&11>=document.documentMode,ds=null,jc=null,rl=null,Oc=!1;function WA(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Oc||ds==null||ds!==na(l)||(l=ds,"selectionStart"in l&&_c(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),rl&&nl(rl,l)||(rl=l,l=ru(jc,"onSelect"),0<l.length&&(t=new st("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=ds)))}function Qi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var fs={animationend:Qi("Animation","AnimationEnd"),animationiteration:Qi("Animation","AnimationIteration"),animationstart:Qi("Animation","AnimationStart"),transitionrun:Qi("Transition","TransitionRun"),transitionstart:Qi("Transition","TransitionStart"),transitioncancel:Qi("Transition","TransitionCancel"),transitionend:Qi("Transition","TransitionEnd")},Fc={},ZA={};Ut&&(ZA=document.createElement("div").style,"AnimationEvent"in window||(delete fs.animationend.animation,delete fs.animationiteration.animation,delete fs.animationstart.animation),"TransitionEvent"in window||delete fs.transitionend.transition);function Ui(e){if(Fc[e])return Fc[e];if(!fs[e])return e;var t=fs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in ZA)return Fc[e]=t[i];return e}var eh=Ui("animationend"),th=Ui("animationiteration"),ah=Ui("animationstart"),EE=Ui("transitionrun"),bE=Ui("transitionstart"),vE=Ui("transitioncancel"),nh=Ui("transitionend"),rh=new Map,Vc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vc.push("scrollEnd");function Fn(e,t){rh.set(e,t),_n(t,[e])}var ih=new WeakMap;function In(e,t){if(typeof e=="object"&&e!==null){var i=ih.get(e);return i!==void 0?i:(t={value:e,source:t,stack:us(t)},ih.set(e,t),t)}return{value:e,source:t,stack:us(t)}}var Bn=[],As=0,Hc=0;function bo(){for(var e=As,t=Hc=As=0;t<e;){var i=Bn[t];Bn[t++]=null;var l=Bn[t];Bn[t++]=null;var f=Bn[t];Bn[t++]=null;var m=Bn[t];if(Bn[t++]=null,l!==null&&f!==null){var x=l.pending;x===null?f.next=f:(f.next=x.next,x.next=f),l.pending=f}m!==0&&sh(i,f,m)}}function vo(e,t,i,l){Bn[As++]=e,Bn[As++]=t,Bn[As++]=i,Bn[As++]=l,Hc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Gc(e,t,i,l){return vo(e,t,i,l),wo(e)}function hs(e,t){return vo(e,null,null,t),wo(e)}function sh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var f=!1,m=e.return;m!==null;)m.childLanes|=i,l=m.alternate,l!==null&&(l.childLanes|=i),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&t!==null&&(f=31-w(i),e=m.hiddenUpdates,l=e[f],l===null?e[f]=[t]:l.push(t),t.lane=i|536870912),m):null}function wo(e){if(50<kl)throw kl=0,Jd=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gs={};function wE(e,t,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,i,l){return new wE(e,t,i,l)}function Pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yr(e,t){var i=e.alternate;return i===null?(i=An(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function lh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xo(e,t,i,l,f,m){var x=0;if(l=e,typeof e=="function")Pc(e)&&(x=1);else if(typeof e=="string")x=Cb(e,i,Ve.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=An(31,i,t,f),e.elementType=X,e.lanes=m,e;case k:return Mi(i.children,f,m,t);case D:x=8,f|=24;break;case R:return e=An(12,i,t,f|2),e.elementType=R,e.lanes=m,e;case V:return e=An(13,i,t,f),e.elementType=V,e.lanes=m,e;case de:return e=An(19,i,t,f),e.elementType=de,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:case j:x=10;break e;case U:x=9;break e;case P:x=11;break e;case ce:x=14;break e;case Z:x=16,l=null;break e}x=29,i=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=An(x,i,t,f),t.elementType=e,t.type=l,t.lanes=m,t}function Mi(e,t,i,l){return e=An(7,e,l,t),e.lanes=i,e}function zc(e,t,i){return e=An(6,e,null,t),e.lanes=i,e}function qc(e,t,i){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ms=[],ps=0,Co=null,Io=0,Sn=[],Nn=0,_i=null,Er=1,br="";function ji(e,t){ms[ps++]=Io,ms[ps++]=Co,Co=e,Io=t}function oh(e,t,i){Sn[Nn++]=Er,Sn[Nn++]=br,Sn[Nn++]=_i,_i=e;var l=Er;e=br;var f=32-w(l)-1;l&=~(1<<f),i+=1;var m=32-w(t)+f;if(30<m){var x=f-f%5;m=(l&(1<<x)-1).toString(32),l>>=x,f-=x,Er=1<<32-w(t)+f|i<<f|l,br=m+e}else Er=1<<m|i<<f|l,br=e}function Yc(e){e.return!==null&&(ji(e,1),oh(e,1,0))}function Kc(e){for(;e===Co;)Co=ms[--ps],ms[ps]=null,Io=ms[--ps],ms[ps]=null;for(;e===_i;)_i=Sn[--Nn],Sn[Nn]=null,br=Sn[--Nn],Sn[Nn]=null,Er=Sn[--Nn],Sn[Nn]=null}var qa=null,Zt=null,Bt=!1,Oi=null,er=!1,Jc=Error(s(519));function Fi(e){var t=Error(s(418,""));throw ll(In(t,e)),Jc}function uh(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[_t]=e,t[fa]=l,i){case"dialog":yt("cancel",t),yt("close",t);break;case"iframe":case"object":case"embed":yt("load",t);break;case"video":case"audio":for(i=0;i<Dl.length;i++)yt(Dl[i],t);break;case"source":yt("error",t);break;case"img":case"image":case"link":yt("error",t),yt("load",t);break;case"details":yt("toggle",t);break;case"input":yt("invalid",t),Zn(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),On(t);break;case"select":yt("invalid",t);break;case"textarea":yt("invalid",t),Di(t,l.value,l.defaultValue,l.children),On(t)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||Bm(t.textContent,i)?(l.popover!=null&&(yt("beforetoggle",t),yt("toggle",t)),l.onScroll!=null&&yt("scroll",t),l.onScrollEnd!=null&&yt("scrollend",t),l.onClick!=null&&(t.onclick=iu),t=!0):t=!1,t||Fi(e)}function ch(e){for(qa=e.return;qa;)switch(qa.tag){case 5:case 13:er=!1;return;case 27:case 3:er=!0;return;default:qa=qa.return}}function il(e){if(e!==qa)return!1;if(!Bt)return ch(e),Bt=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ff(e.type,e.memoizedProps)),i=!i),i&&Zt&&Fi(e),ch(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(i=e.data,i==="/$"){if(t===0){Zt=Hn(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++;e=e.nextSibling}Zt=null}}else t===27?(t=Zt,ui(e.type)?(e=mf,mf=null,Zt=e):Zt=t):Zt=qa?Hn(e.stateNode.nextSibling):null;return!0}function sl(){Zt=qa=null,Bt=!1}function dh(){var e=Oi;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),Oi=null),e}function ll(e){Oi===null?Oi=[e]:Oi.push(e)}var Xc=re(null),Vi=null,vr=null;function Kr(e,t,i){Re(Xc,t._currentValue),t._currentValue=i}function wr(e){e._currentValue=Xc.current,ye(Xc)}function $c(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function Wc(e,t,i,l){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var x=f.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=f;for(var z=0;z<t.length;z++)if(M.context===t[z]){m.lanes|=i,M=m.alternate,M!==null&&(M.lanes|=i),$c(m.return,i,e),l||(x=null);break e}m=M.next}}else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=i,m=x.alternate,m!==null&&(m.lanes|=i),$c(x,i,e),x=null}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===e){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}}function ol(e,t,i,l){e=null;for(var f=t,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var x=f.alternate;if(x===null)throw Error(s(387));if(x=x.memoizedProps,x!==null){var M=f.type;fn(f.pendingProps.value,x.value)||(e!==null?e.push(M):e=[M])}}else if(f===Et.current){if(x=f.alternate,x===null)throw Error(s(387));x.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(_l):e=[_l])}f=f.return}e!==null&&Wc(t,e,i,l),t.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!fn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Hi(e){Vi=e,vr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fa(e){return fh(Vi,e)}function So(e,t){return Vi===null&&Hi(e),fh(e,t)}function fh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},vr===null){if(e===null)throw Error(s(308));vr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vr=vr.next=t;return i}var xE=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},CE=n.unstable_scheduleCallback,IE=n.unstable_NormalPriority,ga={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zc(){return{controller:new xE,data:new Map,refCount:0}}function ul(e){e.refCount--,e.refCount===0&&CE(IE,function(){e.controller.abort()})}var cl=null,ed=0,ys=0,Es=null;function BE(e,t){if(cl===null){var i=cl=[];ed=0,ys=af(),Es={status:"pending",value:void 0,then:function(l){i.push(l)}}}return ed++,t.then(Ah,Ah),t}function Ah(){if(--ed===0&&cl!==null){Es!==null&&(Es.status="fulfilled");var e=cl;cl=null,ys=0,Es=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function SE(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(l.status="rejected",l.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),l}var hh=Y.S;Y.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&BE(e,t),hh!==null&&hh(e,t)};var Gi=re(null);function td(){var e=Gi.current;return e!==null?e:Ot.pooledCache}function No(e,t){t===null?Re(Gi,Gi.current):Re(Gi,t.pool)}function gh(){var e=td();return e===null?null:{parent:ga._currentValue,pool:e}}var dl=Error(s(460)),mh=Error(s(474)),ko=Error(s(542)),ad={then:function(){}};function ph(e){return e=e.status,e==="fulfilled"||e==="rejected"}function To(){}function yh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(To,To),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bh(e),e;default:if(typeof t.status=="string")t.then(To,To);else{if(e=Ot,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=l}},function(l){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bh(e),e}throw fl=t,dl}}var fl=null;function Eh(){if(fl===null)throw Error(s(459));var e=fl;return fl=null,e}function bh(e){if(e===dl||e===ko)throw Error(s(483))}var Jr=!1;function nd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rd(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 Xr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $r(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(St&2)!==0){var f=l.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),l.pending=t,t=wo(e),sh(e,null,i),t}return vo(e,l,t,i),wo(e)}function Al(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,is(e,i)}}function id(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=x:m=m.next=x,i=i.next}while(i!==null);m===null?f=m=t:m=m.next=t}else f=m=t;i={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var sd=!1;function hl(){if(sd){var e=Es;if(e!==null)throw e}}function gl(e,t,i,l){sd=!1;var f=e.updateQueue;Jr=!1;var m=f.firstBaseUpdate,x=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var z=M,ue=z.next;z.next=null,x===null?m=ue:x.next=ue,x=z;var ve=e.alternate;ve!==null&&(ve=ve.updateQueue,M=ve.lastBaseUpdate,M!==x&&(M===null?ve.firstBaseUpdate=ue:M.next=ue,ve.lastBaseUpdate=z))}if(m!==null){var Se=f.baseState;x=0,ve=ue=z=null,M=m;do{var fe=M.lane&-536870913,he=fe!==M.lane;if(he?(xt&fe)===fe:(l&fe)===fe){fe!==0&&fe===ys&&(sd=!0),ve!==null&&(ve=ve.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var at=e,Ze=M;fe=t;var Lt=i;switch(Ze.tag){case 1:if(at=Ze.payload,typeof at=="function"){Se=at.call(Lt,Se,fe);break e}Se=at;break e;case 3:at.flags=at.flags&-65537|128;case 0:if(at=Ze.payload,fe=typeof at=="function"?at.call(Lt,Se,fe):at,fe==null)break e;Se=E({},Se,fe);break e;case 2:Jr=!0}}fe=M.callback,fe!==null&&(e.flags|=64,he&&(e.flags|=8192),he=f.callbacks,he===null?f.callbacks=[fe]:he.push(fe))}else he={lane:fe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ve===null?(ue=ve=he,z=Se):ve=ve.next=he,x|=fe;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;he=M,M=he.next,he.next=null,f.lastBaseUpdate=he,f.shared.pending=null}}while(!0);ve===null&&(z=Se),f.baseState=z,f.firstBaseUpdate=ue,f.lastBaseUpdate=ve,m===null&&(f.shared.lanes=0),ii|=x,e.lanes=x,e.memoizedState=Se}}function vh(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function wh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)vh(i[e],t)}var bs=re(null),Do=re(0);function xh(e,t){e=kr,Re(Do,e),Re(bs,t),kr=e|t.baseLanes}function ld(){Re(Do,kr),Re(bs,bs.current)}function od(){kr=Do.current,ye(bs),ye(Do)}var Wr=0,At=null,Tt=null,oa=null,Lo=!1,vs=!1,Pi=!1,Ro=0,ml=0,ws=null,NE=0;function ia(){throw Error(s(321))}function ud(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!fn(e[i],t[i]))return!1;return!0}function cd(e,t,i,l,f,m){return Wr=m,At=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?sg:lg,Pi=!1,m=i(l,f),Pi=!1,vs&&(m=Ih(t,i,l,f)),Ch(e),m}function Ch(e){Y.H=Oo;var t=Tt!==null&&Tt.next!==null;if(Wr=0,oa=Tt=At=null,Lo=!1,ml=0,ws=null,t)throw Error(s(300));e===null||Ca||(e=e.dependencies,e!==null&&Bo(e)&&(Ca=!0))}function Ih(e,t,i,l){At=e;var f=0;do{if(vs&&(ws=null),ml=0,vs=!1,25<=f)throw Error(s(301));if(f+=1,oa=Tt=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}Y.H=UE,m=t(i,l)}while(vs);return m}function kE(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?pl(t):t,e=e.useState()[0],(Tt!==null?Tt.memoizedState:null)!==e&&(At.flags|=1024),t}function dd(){var e=Ro!==0;return Ro=0,e}function fd(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Ad(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}Wr=0,oa=Tt=At=null,vs=!1,ml=Ro=0,ws=null}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oa===null?At.memoizedState=oa=e:oa=oa.next=e,oa}function ua(){if(Tt===null){var e=At.alternate;e=e!==null?e.memoizedState:null}else e=Tt.next;var t=oa===null?At.memoizedState:oa.next;if(t!==null)oa=t,Tt=e;else{if(e===null)throw At.alternate===null?Error(s(467)):Error(s(310));Tt=e,e={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},oa===null?At.memoizedState=oa=e:oa=oa.next=e}return oa}function hd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pl(e){var t=ml;return ml+=1,ws===null&&(ws=[]),e=yh(ws,e,t),t=At,(oa===null?t.memoizedState:oa.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?sg:lg),e}function Qo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pl(e);if(e.$$typeof===j)return Fa(e)}throw Error(s(438,String(e)))}function gd(e){var t=null,i=At.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=At.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=hd(),At.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=K;return t.index++,i}function xr(e,t){return typeof t=="function"?t(e):t}function Uo(e){var t=ua();return md(t,Tt,e)}function md(e,t,i){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var f=e.baseQueue,m=l.pending;if(m!==null){if(f!==null){var x=f.next;f.next=m.next,m.next=x}t.baseQueue=f=m,l.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{t=f.next;var M=x=null,z=null,ue=t,ve=!1;do{var Se=ue.lane&-536870913;if(Se!==ue.lane?(xt&Se)===Se:(Wr&Se)===Se){var fe=ue.revertLane;if(fe===0)z!==null&&(z=z.next={lane:0,revertLane:0,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),Se===ys&&(ve=!0);else if((Wr&fe)===fe){ue=ue.next,fe===ys&&(ve=!0);continue}else Se={lane:0,revertLane:ue.revertLane,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},z===null?(M=z=Se,x=m):z=z.next=Se,At.lanes|=fe,ii|=fe;Se=ue.action,Pi&&i(m,Se),m=ue.hasEagerState?ue.eagerState:i(m,Se)}else fe={lane:Se,revertLane:ue.revertLane,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},z===null?(M=z=fe,x=m):z=z.next=fe,At.lanes|=Se,ii|=Se;ue=ue.next}while(ue!==null&&ue!==t);if(z===null?x=m:z.next=M,!fn(m,e.memoizedState)&&(Ca=!0,ve&&(i=Es,i!==null)))throw i;e.memoizedState=m,e.baseState=x,e.baseQueue=z,l.lastRenderedState=m}return f===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function pd(e){var t=ua(),i=t.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var l=i.dispatch,f=i.pending,m=t.memoizedState;if(f!==null){i.pending=null;var x=f=f.next;do m=e(m,x.action),x=x.next;while(x!==f);fn(m,t.memoizedState)||(Ca=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),i.lastRenderedState=m}return[m,l]}function Bh(e,t,i){var l=At,f=ua(),m=Bt;if(m){if(i===void 0)throw Error(s(407));i=i()}else i=t();var x=!fn((Tt||f).memoizedState,i);x&&(f.memoizedState=i,Ca=!0),f=f.queue;var M=kh.bind(null,l,f,e);if(yl(2048,8,M,[e]),f.getSnapshot!==t||x||oa!==null&&oa.memoizedState.tag&1){if(l.flags|=2048,xs(9,Mo(),Nh.bind(null,l,f,i,t),null),Ot===null)throw Error(s(349));m||(Wr&124)!==0||Sh(l,t,i)}return i}function Sh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=At.updateQueue,t===null?(t=hd(),At.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Nh(e,t,i,l){t.value=i,t.getSnapshot=l,Th(t)&&Dh(e)}function kh(e,t,i){return i(function(){Th(t)&&Dh(e)})}function Th(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!fn(e,i)}catch{return!0}}function Dh(e){var t=hs(e,2);t!==null&&yn(t,e,2)}function yd(e){var t=tn();if(typeof e=="function"){var i=e;if(e=i(),Pi){b(!0);try{i()}finally{b(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:e},t}function Lh(e,t,i,l){return e.baseState=i,md(e,Tt,typeof l=="function"?l:xr)}function TE(e,t,i,l,f){if(jo(e))throw Error(s(485));if(e=t.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};Y.T!==null?i(!0):m.isTransition=!1,l(m),i=t.pending,i===null?(m.next=t.pending=m,Rh(t,m)):(m.next=i.next,t.pending=i.next=m)}}function Rh(e,t){var i=t.action,l=t.payload,f=e.state;if(t.isTransition){var m=Y.T,x={};Y.T=x;try{var M=i(f,l),z=Y.S;z!==null&&z(x,M),Qh(e,t,M)}catch(ue){Ed(e,t,ue)}finally{Y.T=m}}else try{m=i(f,l),Qh(e,t,m)}catch(ue){Ed(e,t,ue)}}function Qh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Uh(e,t,l)},function(l){return Ed(e,t,l)}):Uh(e,t,i)}function Uh(e,t,i){t.status="fulfilled",t.value=i,Mh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Rh(e,i)))}function Ed(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Mh(t),t=t.next;while(t!==l)}e.action=null}function Mh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _h(e,t){return t}function jh(e,t){if(Bt){var i=Ot.formState;if(i!==null){e:{var l=At;if(Bt){if(Zt){t:{for(var f=Zt,m=er;f.nodeType!==8;){if(!m){f=null;break t}if(f=Hn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){Zt=Hn(f.nextSibling),l=f.data==="F!";break e}}Fi(l)}l=!1}l&&(t=i[0])}}return i=tn(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_h,lastRenderedState:t},i.queue=l,i=ng.bind(null,At,l),l.dispatch=i,l=yd(!1),m=Cd.bind(null,At,!1,l.queue),l=tn(),f={state:t,dispatch:null,action:e,pending:null},l.queue=f,i=TE.bind(null,At,f,m,i),f.dispatch=i,l.memoizedState=e,[t,i,!1]}function Oh(e){var t=ua();return Fh(t,Tt,e)}function Fh(e,t,i){if(t=md(e,t,_h)[0],e=Uo(xr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=pl(t)}catch(x){throw x===dl?ko:x}else l=t;t=ua();var f=t.queue,m=f.dispatch;return i!==t.memoizedState&&(At.flags|=2048,xs(9,Mo(),DE.bind(null,f,i),null)),[l,m,e]}function DE(e,t){e.action=t}function Vh(e){var t=ua(),i=Tt;if(i!==null)return Fh(t,i,e);ua(),t=t.memoizedState,i=ua();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function xs(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=At.updateQueue,t===null&&(t=hd(),At.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Mo(){return{destroy:void 0,resource:void 0}}function Hh(){return ua().memoizedState}function _o(e,t,i,l){var f=tn();l=l===void 0?null:l,At.flags|=e,f.memoizedState=xs(1|t,Mo(),i,l)}function yl(e,t,i,l){var f=ua();l=l===void 0?null:l;var m=f.memoizedState.inst;Tt!==null&&l!==null&&ud(l,Tt.memoizedState.deps)?f.memoizedState=xs(t,m,i,l):(At.flags|=e,f.memoizedState=xs(1|t,m,i,l))}function Gh(e,t){_o(8390656,8,e,t)}function Ph(e,t){yl(2048,8,e,t)}function zh(e,t){return yl(4,2,e,t)}function qh(e,t){return yl(4,4,e,t)}function Yh(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kh(e,t,i){i=i!=null?i.concat([e]):null,yl(4,4,Yh.bind(null,t,e),i)}function bd(){}function Jh(e,t){var i=ua();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&ud(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function Xh(e,t){var i=ua();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&ud(t,l[1]))return l[0];if(l=e(),Pi){b(!0);try{e()}finally{b(!1)}}return i.memoizedState=[l,t],l}function vd(e,t,i){return i===void 0||(Wr&1073741824)!==0?e.memoizedState=t:(e.memoizedState=i,e=Zg(),At.lanes|=e,ii|=e,i)}function $h(e,t,i,l){return fn(i,t)?i:bs.current!==null?(e=vd(e,i,l),fn(e,t)||(Ca=!0),e):(Wr&42)===0?(Ca=!0,e.memoizedState=i):(e=Zg(),At.lanes|=e,ii|=e,t)}function Wh(e,t,i,l,f){var m=ae.p;ae.p=m!==0&&8>m?m:8;var x=Y.T,M={};Y.T=M,Cd(e,!1,t,i);try{var z=f(),ue=Y.S;if(ue!==null&&ue(M,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ve=SE(z,l);El(e,t,ve,pn(e))}else El(e,t,l,pn(e))}catch(Se){El(e,t,{then:function(){},status:"rejected",reason:Se},pn())}finally{ae.p=m,Y.T=x}}function LE(){}function wd(e,t,i,l){if(e.tag!==5)throw Error(s(476));var f=Zh(e).queue;Wh(e,f,t,xe,i===null?LE:function(){return eg(e),i(l)})}function Zh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:xe},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function eg(e){var t=Zh(e).next.queue;El(e,t,{},pn())}function xd(){return Fa(_l)}function tg(){return ua().memoizedState}function ag(){return ua().memoizedState}function RE(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=pn();e=Xr(i);var l=$r(t,e,i);l!==null&&(yn(l,t,i),Al(l,t,i)),t={cache:Zc()},e.payload=t;return}t=t.return}}function QE(e,t,i){var l=pn();i={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null},jo(e)?rg(t,i):(i=Gc(e,t,i,l),i!==null&&(yn(i,e,l),ig(i,t,l)))}function ng(e,t,i){var l=pn();El(e,t,i,l)}function El(e,t,i,l){var f={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null};if(jo(e))rg(t,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=t.lastRenderedReducer,m!==null))try{var x=t.lastRenderedState,M=m(x,i);if(f.hasEagerState=!0,f.eagerState=M,fn(M,x))return vo(e,t,f,0),Ot===null&&bo(),!1}catch{}finally{}if(i=Gc(e,t,f,l),i!==null)return yn(i,e,l),ig(i,t,l),!0}return!1}function Cd(e,t,i,l){if(l={lane:2,revertLane:af(),action:l,hasEagerState:!1,eagerState:null,next:null},jo(e)){if(t)throw Error(s(479))}else t=Gc(e,i,l,2),t!==null&&yn(t,e,2)}function jo(e){var t=e.alternate;return e===At||t!==null&&t===At}function rg(e,t){vs=Lo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ig(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,is(e,i)}}var Oo={readContext:Fa,use:Qo,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useInsertionEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useSyncExternalStore:ia,useId:ia,useHostTransitionStatus:ia,useFormState:ia,useActionState:ia,useOptimistic:ia,useMemoCache:ia,useCacheRefresh:ia},sg={readContext:Fa,use:Qo,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Fa,useEffect:Gh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,_o(4194308,4,Yh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return _o(4194308,4,e,t)},useInsertionEffect:function(e,t){_o(4,2,e,t)},useMemo:function(e,t){var i=tn();t=t===void 0?null:t;var l=e();if(Pi){b(!0);try{e()}finally{b(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=tn();if(i!==void 0){var f=i(t);if(Pi){b(!0);try{i(t)}finally{b(!1)}}}else f=t;return l.memoizedState=l.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},l.queue=e,e=e.dispatch=QE.bind(null,At,e),[l.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:function(e){e=yd(e);var t=e.queue,i=ng.bind(null,At,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:bd,useDeferredValue:function(e,t){var i=tn();return vd(i,e,t)},useTransition:function(){var e=yd(!1);return e=Wh.bind(null,At,e.queue,!0,!1),tn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=At,f=tn();if(Bt){if(i===void 0)throw Error(s(407));i=i()}else{if(i=t(),Ot===null)throw Error(s(349));(xt&124)!==0||Sh(l,t,i)}f.memoizedState=i;var m={value:i,getSnapshot:t};return f.queue=m,Gh(kh.bind(null,l,m,e),[e]),l.flags|=2048,xs(9,Mo(),Nh.bind(null,l,m,i,t),null),i},useId:function(){var e=tn(),t=Ot.identifierPrefix;if(Bt){var i=br,l=Er;i=(l&~(1<<32-w(l)-1)).toString(32)+i,t="«"+t+"R"+i,i=Ro++,0<i&&(t+="H"+i.toString(32)),t+="»"}else i=NE++,t="«"+t+"r"+i.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:xd,useFormState:jh,useActionState:jh,useOptimistic:function(e){var t=tn();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Cd.bind(null,At,!0,i),i.dispatch=t,[e,t]},useMemoCache:gd,useCacheRefresh:function(){return tn().memoizedState=RE.bind(null,At)}},lg={readContext:Fa,use:Qo,useCallback:Jh,useContext:Fa,useEffect:Ph,useImperativeHandle:Kh,useInsertionEffect:zh,useLayoutEffect:qh,useMemo:Xh,useReducer:Uo,useRef:Hh,useState:function(){return Uo(xr)},useDebugValue:bd,useDeferredValue:function(e,t){var i=ua();return $h(i,Tt.memoizedState,e,t)},useTransition:function(){var e=Uo(xr)[0],t=ua().memoizedState;return[typeof e=="boolean"?e:pl(e),t]},useSyncExternalStore:Bh,useId:tg,useHostTransitionStatus:xd,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var i=ua();return Lh(i,Tt,e,t)},useMemoCache:gd,useCacheRefresh:ag},UE={readContext:Fa,use:Qo,useCallback:Jh,useContext:Fa,useEffect:Ph,useImperativeHandle:Kh,useInsertionEffect:zh,useLayoutEffect:qh,useMemo:Xh,useReducer:pd,useRef:Hh,useState:function(){return pd(xr)},useDebugValue:bd,useDeferredValue:function(e,t){var i=ua();return Tt===null?vd(i,e,t):$h(i,Tt.memoizedState,e,t)},useTransition:function(){var e=pd(xr)[0],t=ua().memoizedState;return[typeof e=="boolean"?e:pl(e),t]},useSyncExternalStore:Bh,useId:tg,useHostTransitionStatus:xd,useFormState:Vh,useActionState:Vh,useOptimistic:function(e,t){var i=ua();return Tt!==null?Lh(i,Tt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:gd,useCacheRefresh:ag},Cs=null,bl=0;function Fo(e){var t=bl;return bl+=1,Cs===null&&(Cs=[]),yh(Cs,e,t)}function vl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vo(e,t){throw t.$$typeof===v?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function og(e){var t=e._init;return t(e._payload)}function ug(e){function t(ne,W){if(e){var oe=ne.deletions;oe===null?(ne.deletions=[W],ne.flags|=16):oe.push(W)}}function i(ne,W){if(!e)return null;for(;W!==null;)t(ne,W),W=W.sibling;return null}function l(ne){for(var W=new Map;ne!==null;)ne.key!==null?W.set(ne.key,ne):W.set(ne.index,ne),ne=ne.sibling;return W}function f(ne,W){return ne=yr(ne,W),ne.index=0,ne.sibling=null,ne}function m(ne,W,oe){return ne.index=oe,e?(oe=ne.alternate,oe!==null?(oe=oe.index,oe<W?(ne.flags|=67108866,W):oe):(ne.flags|=67108866,W)):(ne.flags|=1048576,W)}function x(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function M(ne,W,oe,Ce){return W===null||W.tag!==6?(W=zc(oe,ne.mode,Ce),W.return=ne,W):(W=f(W,oe),W.return=ne,W)}function z(ne,W,oe,Ce){var qe=oe.type;return qe===k?ve(ne,W,oe.props.children,Ce,oe.key):W!==null&&(W.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===Z&&og(qe)===W.type)?(W=f(W,oe.props),vl(W,oe),W.return=ne,W):(W=xo(oe.type,oe.key,oe.props,null,ne.mode,Ce),vl(W,oe),W.return=ne,W)}function ue(ne,W,oe,Ce){return W===null||W.tag!==4||W.stateNode.containerInfo!==oe.containerInfo||W.stateNode.implementation!==oe.implementation?(W=qc(oe,ne.mode,Ce),W.return=ne,W):(W=f(W,oe.children||[]),W.return=ne,W)}function ve(ne,W,oe,Ce,qe){return W===null||W.tag!==7?(W=Mi(oe,ne.mode,Ce,qe),W.return=ne,W):(W=f(W,oe),W.return=ne,W)}function Se(ne,W,oe){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=zc(""+W,ne.mode,oe),W.return=ne,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case C:return oe=xo(W.type,W.key,W.props,null,ne.mode,oe),vl(oe,W),oe.return=ne,oe;case S:return W=qc(W,ne.mode,oe),W.return=ne,W;case Z:var Ce=W._init;return W=Ce(W._payload),Se(ne,W,oe)}if(Ee(W)||pe(W))return W=Mi(W,ne.mode,oe,null),W.return=ne,W;if(typeof W.then=="function")return Se(ne,Fo(W),oe);if(W.$$typeof===j)return Se(ne,So(ne,W),oe);Vo(ne,W)}return null}function fe(ne,W,oe,Ce){var qe=W!==null?W.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return qe!==null?null:M(ne,W,""+oe,Ce);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case C:return oe.key===qe?z(ne,W,oe,Ce):null;case S:return oe.key===qe?ue(ne,W,oe,Ce):null;case Z:return qe=oe._init,oe=qe(oe._payload),fe(ne,W,oe,Ce)}if(Ee(oe)||pe(oe))return qe!==null?null:ve(ne,W,oe,Ce,null);if(typeof oe.then=="function")return fe(ne,W,Fo(oe),Ce);if(oe.$$typeof===j)return fe(ne,W,So(ne,oe),Ce);Vo(ne,oe)}return null}function he(ne,W,oe,Ce,qe){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return ne=ne.get(oe)||null,M(W,ne,""+Ce,qe);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case C:return ne=ne.get(Ce.key===null?oe:Ce.key)||null,z(W,ne,Ce,qe);case S:return ne=ne.get(Ce.key===null?oe:Ce.key)||null,ue(W,ne,Ce,qe);case Z:var ht=Ce._init;return Ce=ht(Ce._payload),he(ne,W,oe,Ce,qe)}if(Ee(Ce)||pe(Ce))return ne=ne.get(oe)||null,ve(W,ne,Ce,qe,null);if(typeof Ce.then=="function")return he(ne,W,oe,Fo(Ce),qe);if(Ce.$$typeof===j)return he(ne,W,oe,So(W,Ce),qe);Vo(W,Ce)}return null}function at(ne,W,oe,Ce){for(var qe=null,ht=null,Xe=W,tt=W=0,Ba=null;Xe!==null&&tt<oe.length;tt++){Xe.index>tt?(Ba=Xe,Xe=null):Ba=Xe.sibling;var Ct=fe(ne,Xe,oe[tt],Ce);if(Ct===null){Xe===null&&(Xe=Ba);break}e&&Xe&&Ct.alternate===null&&t(ne,Xe),W=m(Ct,W,tt),ht===null?qe=Ct:ht.sibling=Ct,ht=Ct,Xe=Ba}if(tt===oe.length)return i(ne,Xe),Bt&&ji(ne,tt),qe;if(Xe===null){for(;tt<oe.length;tt++)Xe=Se(ne,oe[tt],Ce),Xe!==null&&(W=m(Xe,W,tt),ht===null?qe=Xe:ht.sibling=Xe,ht=Xe);return Bt&&ji(ne,tt),qe}for(Xe=l(Xe);tt<oe.length;tt++)Ba=he(Xe,ne,tt,oe[tt],Ce),Ba!==null&&(e&&Ba.alternate!==null&&Xe.delete(Ba.key===null?tt:Ba.key),W=m(Ba,W,tt),ht===null?qe=Ba:ht.sibling=Ba,ht=Ba);return e&&Xe.forEach(function(hi){return t(ne,hi)}),Bt&&ji(ne,tt),qe}function Ze(ne,W,oe,Ce){if(oe==null)throw Error(s(151));for(var qe=null,ht=null,Xe=W,tt=W=0,Ba=null,Ct=oe.next();Xe!==null&&!Ct.done;tt++,Ct=oe.next()){Xe.index>tt?(Ba=Xe,Xe=null):Ba=Xe.sibling;var hi=fe(ne,Xe,Ct.value,Ce);if(hi===null){Xe===null&&(Xe=Ba);break}e&&Xe&&hi.alternate===null&&t(ne,Xe),W=m(hi,W,tt),ht===null?qe=hi:ht.sibling=hi,ht=hi,Xe=Ba}if(Ct.done)return i(ne,Xe),Bt&&ji(ne,tt),qe;if(Xe===null){for(;!Ct.done;tt++,Ct=oe.next())Ct=Se(ne,Ct.value,Ce),Ct!==null&&(W=m(Ct,W,tt),ht===null?qe=Ct:ht.sibling=Ct,ht=Ct);return Bt&&ji(ne,tt),qe}for(Xe=l(Xe);!Ct.done;tt++,Ct=oe.next())Ct=he(Xe,ne,tt,Ct.value,Ce),Ct!==null&&(e&&Ct.alternate!==null&&Xe.delete(Ct.key===null?tt:Ct.key),W=m(Ct,W,tt),ht===null?qe=Ct:ht.sibling=Ct,ht=Ct);return e&&Xe.forEach(function(Mb){return t(ne,Mb)}),Bt&&ji(ne,tt),qe}function Lt(ne,W,oe,Ce){if(typeof oe=="object"&&oe!==null&&oe.type===k&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case C:e:{for(var qe=oe.key;W!==null;){if(W.key===qe){if(qe=oe.type,qe===k){if(W.tag===7){i(ne,W.sibling),Ce=f(W,oe.props.children),Ce.return=ne,ne=Ce;break e}}else if(W.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===Z&&og(qe)===W.type){i(ne,W.sibling),Ce=f(W,oe.props),vl(Ce,oe),Ce.return=ne,ne=Ce;break e}i(ne,W);break}else t(ne,W);W=W.sibling}oe.type===k?(Ce=Mi(oe.props.children,ne.mode,Ce,oe.key),Ce.return=ne,ne=Ce):(Ce=xo(oe.type,oe.key,oe.props,null,ne.mode,Ce),vl(Ce,oe),Ce.return=ne,ne=Ce)}return x(ne);case S:e:{for(qe=oe.key;W!==null;){if(W.key===qe)if(W.tag===4&&W.stateNode.containerInfo===oe.containerInfo&&W.stateNode.implementation===oe.implementation){i(ne,W.sibling),Ce=f(W,oe.children||[]),Ce.return=ne,ne=Ce;break e}else{i(ne,W);break}else t(ne,W);W=W.sibling}Ce=qc(oe,ne.mode,Ce),Ce.return=ne,ne=Ce}return x(ne);case Z:return qe=oe._init,oe=qe(oe._payload),Lt(ne,W,oe,Ce)}if(Ee(oe))return at(ne,W,oe,Ce);if(pe(oe)){if(qe=pe(oe),typeof qe!="function")throw Error(s(150));return oe=qe.call(oe),Ze(ne,W,oe,Ce)}if(typeof oe.then=="function")return Lt(ne,W,Fo(oe),Ce);if(oe.$$typeof===j)return Lt(ne,W,So(ne,oe),Ce);Vo(ne,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,W!==null&&W.tag===6?(i(ne,W.sibling),Ce=f(W,oe),Ce.return=ne,ne=Ce):(i(ne,W),Ce=zc(oe,ne.mode,Ce),Ce.return=ne,ne=Ce),x(ne)):i(ne,W)}return function(ne,W,oe,Ce){try{bl=0;var qe=Lt(ne,W,oe,Ce);return Cs=null,qe}catch(Xe){if(Xe===dl||Xe===ko)throw Xe;var ht=An(29,Xe,null,ne.mode);return ht.lanes=Ce,ht.return=ne,ht}finally{}}}var Is=ug(!0),cg=ug(!1),kn=re(null),tr=null;function Zr(e){var t=e.alternate;Re(ma,ma.current&1),Re(kn,e),tr===null&&(t===null||bs.current!==null||t.memoizedState!==null)&&(tr=e)}function dg(e){if(e.tag===22){if(Re(ma,ma.current),Re(kn,e),tr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(tr=e)}}else ei()}function ei(){Re(ma,ma.current),Re(kn,kn.current)}function Cr(e){ye(kn),tr===e&&(tr=null),ye(ma)}var ma=re(0);function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||gf(i)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function Id(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:E({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Bd={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=pn(),f=Xr(l);f.payload=t,i!=null&&(f.callback=i),t=$r(e,f,l),t!==null&&(yn(t,e,l),Al(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=pn(),f=Xr(l);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=$r(e,f,l),t!==null&&(yn(t,e,l),Al(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=pn(),l=Xr(i);l.tag=2,t!=null&&(l.callback=t),t=$r(e,l,i),t!==null&&(yn(t,e,i),Al(t,e,i))}};function fg(e,t,i,l,f,m,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,m,x):t.prototype&&t.prototype.isPureReactComponent?!nl(i,l)||!nl(f,m):!0}function Ag(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&Bd.enqueueReplaceState(t,t.state,null)}function zi(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=E({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}var Go=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)};function hg(e){Go(e)}function gg(e){console.error(e)}function mg(e){Go(e)}function Po(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function pg(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Sd(e,t,i){return i=Xr(i),i.tag=3,i.payload={element:null},i.callback=function(){Po(e,t)},i}function yg(e){return e=Xr(e),e.tag=3,e}function Eg(e,t,i,l){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;e.payload=function(){return f(m)},e.callback=function(){pg(t,i,l)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){pg(t,i,l),typeof f!="function"&&(si===null?si=new Set([this]):si.add(this));var M=l.stack;this.componentDidCatch(l.value,{componentStack:M!==null?M:""})})}function ME(e,t,i,l,f){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&ol(t,i,f,!0),i=kn.current,i!==null){switch(i.tag){case 13:return tr===null?$d():i.alternate===null&&ea===0&&(ea=3),i.flags&=-257,i.flags|=65536,i.lanes=f,l===ad?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Zd(e,l,f)),!1;case 22:return i.flags|=65536,l===ad?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),Zd(e,l,f)),!1}throw Error(s(435,i.tag))}return Zd(e,l,f),$d(),!1}if(Bt)return t=kn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,l!==Jc&&(e=Error(s(422),{cause:l}),ll(In(e,i)))):(l!==Jc&&(t=Error(s(423),{cause:l}),ll(In(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,l=In(l,i),f=Sd(e.stateNode,l,f),id(e,f),ea!==4&&(ea=2)),!1;var m=Error(s(520),{cause:l});if(m=In(m,i),Nl===null?Nl=[m]:Nl.push(m),ea!==4&&(ea=2),t===null)return!0;l=In(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Sd(i.stateNode,l,e),id(i,e),!1;case 1:if(t=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(si===null||!si.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=yg(f),Eg(f,e,i,l),id(i,f),!1}i=i.return}while(i!==null);return!1}var bg=Error(s(461)),Ca=!1;function La(e,t,i,l){t.child=e===null?cg(t,null,i,l):Is(t,e.child,i,l)}function vg(e,t,i,l,f){i=i.render;var m=t.ref;if("ref"in l){var x={};for(var M in l)M!=="ref"&&(x[M]=l[M])}else x=l;return Hi(t),l=cd(e,t,i,x,m,f),M=dd(),e!==null&&!Ca?(fd(e,t,f),Ir(e,t,f)):(Bt&&M&&Yc(t),t.flags|=1,La(e,t,l,f),t.child)}function wg(e,t,i,l,f){if(e===null){var m=i.type;return typeof m=="function"&&!Pc(m)&&m.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=m,xg(e,t,m,l,f)):(e=xo(i.type,null,l,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(m=e.child,!Ud(e,f)){var x=m.memoizedProps;if(i=i.compare,i=i!==null?i:nl,i(x,l)&&e.ref===t.ref)return Ir(e,t,f)}return t.flags|=1,e=yr(m,l),e.ref=t.ref,e.return=t,t.child=e}function xg(e,t,i,l,f){if(e!==null){var m=e.memoizedProps;if(nl(m,l)&&e.ref===t.ref)if(Ca=!1,t.pendingProps=l=m,Ud(e,f))(e.flags&131072)!==0&&(Ca=!0);else return t.lanes=e.lanes,Ir(e,t,f)}return Nd(e,t,i,l,f)}function Cg(e,t,i){var l=t.pendingProps,f=l.children,m=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=m!==null?m.baseLanes|i:i,e!==null){for(f=t.child=e.child,m=0;f!==null;)m=m|f.lanes|f.childLanes,f=f.sibling;t.childLanes=m&~l}else t.childLanes=0,t.child=null;return Ig(e,t,l,i)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&No(t,m!==null?m.cachePool:null),m!==null?xh(t,m):ld(),dg(t);else return t.lanes=t.childLanes=536870912,Ig(e,t,m!==null?m.baseLanes|i:i,i)}else m!==null?(No(t,m.cachePool),xh(t,m),ei(),t.memoizedState=null):(e!==null&&No(t,null),ld(),ei());return La(e,t,f,i),t.child}function Ig(e,t,i,l){var f=td();return f=f===null?null:{parent:ga._currentValue,pool:f},t.memoizedState={baseLanes:i,cachePool:f},e!==null&&No(t,null),ld(),dg(t),e!==null&&ol(e,t,l,!0),null}function zo(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Nd(e,t,i,l,f){return Hi(t),i=cd(e,t,i,l,void 0,f),l=dd(),e!==null&&!Ca?(fd(e,t,f),Ir(e,t,f)):(Bt&&l&&Yc(t),t.flags|=1,La(e,t,i,f),t.child)}function Bg(e,t,i,l,f,m){return Hi(t),t.updateQueue=null,i=Ih(t,l,i,f),Ch(e),l=dd(),e!==null&&!Ca?(fd(e,t,m),Ir(e,t,m)):(Bt&&l&&Yc(t),t.flags|=1,La(e,t,i,m),t.child)}function Sg(e,t,i,l,f){if(Hi(t),t.stateNode===null){var m=gs,x=i.contextType;typeof x=="object"&&x!==null&&(m=Fa(x)),m=new i(l,m),t.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Bd,t.stateNode=m,m._reactInternals=t,m=t.stateNode,m.props=l,m.state=t.memoizedState,m.refs={},nd(t),x=i.contextType,m.context=typeof x=="object"&&x!==null?Fa(x):gs,m.state=t.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(Id(t,i,x,l),m.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&Bd.enqueueReplaceState(m,m.state,null),gl(t,l,m,f),hl(),m.state=t.memoizedState),typeof m.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){m=t.stateNode;var M=t.memoizedProps,z=zi(i,M);m.props=z;var ue=m.context,ve=i.contextType;x=gs,typeof ve=="object"&&ve!==null&&(x=Fa(ve));var Se=i.getDerivedStateFromProps;ve=typeof Se=="function"||typeof m.getSnapshotBeforeUpdate=="function",M=t.pendingProps!==M,ve||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(M||ue!==x)&&Ag(t,m,l,x),Jr=!1;var fe=t.memoizedState;m.state=fe,gl(t,l,m,f),hl(),ue=t.memoizedState,M||fe!==ue||Jr?(typeof Se=="function"&&(Id(t,i,Se,l),ue=t.memoizedState),(z=Jr||fg(t,i,z,l,fe,ue,x))?(ve||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=ue),m.props=l,m.state=ue,m.context=x,l=z):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{m=t.stateNode,rd(e,t),x=t.memoizedProps,ve=zi(i,x),m.props=ve,Se=t.pendingProps,fe=m.context,ue=i.contextType,z=gs,typeof ue=="object"&&ue!==null&&(z=Fa(ue)),M=i.getDerivedStateFromProps,(ue=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==Se||fe!==z)&&Ag(t,m,l,z),Jr=!1,fe=t.memoizedState,m.state=fe,gl(t,l,m,f),hl();var he=t.memoizedState;x!==Se||fe!==he||Jr||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof M=="function"&&(Id(t,i,M,l),he=t.memoizedState),(ve=Jr||fg(t,i,ve,l,fe,he,z)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(ue||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,he,z),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,he,z)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&fe===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&fe===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=he),m.props=l,m.state=he,m.context=z,l=ve):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&fe===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&fe===e.memoizedState||(t.flags|=1024),l=!1)}return m=l,zo(e,t),l=(t.flags&128)!==0,m||l?(m=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:m.render(),t.flags|=1,e!==null&&l?(t.child=Is(t,e.child,null,f),t.child=Is(t,null,i,f)):La(e,t,i,f),t.memoizedState=m.state,e=t.child):e=Ir(e,t,f),e}function Ng(e,t,i,l){return sl(),t.flags|=256,La(e,t,i,l),t.child}var kd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Td(e){return{baseLanes:e,cachePool:gh()}}function Dd(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Tn),e}function kg(e,t,i){var l=t.pendingProps,f=!1,m=(t.flags&128)!==0,x;if((x=m)||(x=e!==null&&e.memoizedState===null?!1:(ma.current&2)!==0),x&&(f=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Bt){if(f?Zr(t):ei(),Bt){var M=Zt,z;if(z=M){e:{for(z=M,M=er;z.nodeType!==8;){if(!M){M=null;break e}if(z=Hn(z.nextSibling),z===null){M=null;break e}}M=z}M!==null?(t.memoizedState={dehydrated:M,treeContext:_i!==null?{id:Er,overflow:br}:null,retryLane:536870912,hydrationErrors:null},z=An(18,null,null,0),z.stateNode=M,z.return=t,t.child=z,qa=t,Zt=null,z=!0):z=!1}z||Fi(t)}if(M=t.memoizedState,M!==null&&(M=M.dehydrated,M!==null))return gf(M)?t.lanes=32:t.lanes=536870912,null;Cr(t)}return M=l.children,l=l.fallback,f?(ei(),f=t.mode,M=qo({mode:"hidden",children:M},f),l=Mi(l,f,i,null),M.return=t,l.return=t,M.sibling=l,t.child=M,f=t.child,f.memoizedState=Td(i),f.childLanes=Dd(e,x,i),t.memoizedState=kd,l):(Zr(t),Ld(t,M))}if(z=e.memoizedState,z!==null&&(M=z.dehydrated,M!==null)){if(m)t.flags&256?(Zr(t),t.flags&=-257,t=Rd(e,t,i)):t.memoizedState!==null?(ei(),t.child=e.child,t.flags|=128,t=null):(ei(),f=l.fallback,M=t.mode,l=qo({mode:"visible",children:l.children},M),f=Mi(f,M,i,null),f.flags|=2,l.return=t,f.return=t,l.sibling=f,t.child=l,Is(t,e.child,null,i),l=t.child,l.memoizedState=Td(i),l.childLanes=Dd(e,x,i),t.memoizedState=kd,t=f);else if(Zr(t),gf(M)){if(x=M.nextSibling&&M.nextSibling.dataset,x)var ue=x.dgst;x=ue,l=Error(s(419)),l.stack="",l.digest=x,ll({value:l,source:null,stack:null}),t=Rd(e,t,i)}else if(Ca||ol(e,t,i,!1),x=(i&e.childLanes)!==0,Ca||x){if(x=Ot,x!==null&&(l=i&-i,l=(l&42)!==0?1:Ii(l),l=(l&(x.suspendedLanes|i))!==0?0:l,l!==0&&l!==z.retryLane))throw z.retryLane=l,hs(e,l),yn(x,e,l),bg;M.data==="$?"||$d(),t=Rd(e,t,i)}else M.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,Zt=Hn(M.nextSibling),qa=t,Bt=!0,Oi=null,er=!1,e!==null&&(Sn[Nn++]=Er,Sn[Nn++]=br,Sn[Nn++]=_i,Er=e.id,br=e.overflow,_i=t),t=Ld(t,l.children),t.flags|=4096);return t}return f?(ei(),f=l.fallback,M=t.mode,z=e.child,ue=z.sibling,l=yr(z,{mode:"hidden",children:l.children}),l.subtreeFlags=z.subtreeFlags&65011712,ue!==null?f=yr(ue,f):(f=Mi(f,M,i,null),f.flags|=2),f.return=t,l.return=t,l.sibling=f,t.child=l,l=f,f=t.child,M=e.child.memoizedState,M===null?M=Td(i):(z=M.cachePool,z!==null?(ue=ga._currentValue,z=z.parent!==ue?{parent:ue,pool:ue}:z):z=gh(),M={baseLanes:M.baseLanes|i,cachePool:z}),f.memoizedState=M,f.childLanes=Dd(e,x,i),t.memoizedState=kd,l):(Zr(t),i=e.child,e=i.sibling,i=yr(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=i,t.memoizedState=null,i)}function Ld(e,t){return t=qo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qo(e,t){return e=An(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Rd(e,t,i){return Is(t,e.child,null,i),e=Ld(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tg(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),$c(e.return,t,i)}function Qd(e,t,i,l,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:f}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=i,m.tailMode=f)}function Dg(e,t,i){var l=t.pendingProps,f=l.revealOrder,m=l.tail;if(La(e,t,l.children,i),l=ma.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tg(e,i,t);else if(e.tag===19)Tg(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(Re(ma,l),f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&Ho(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),Qd(t,!1,f,i,m);break;case"backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&Ho(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Qd(t,!0,i,null,m);break;case"together":Qd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ir(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ii|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ol(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,i=yr(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=yr(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ud(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function _E(e,t,i){switch(t.tag){case 3:We(t,t.stateNode.containerInfo),Kr(t,ga,e.memoizedState.cache),sl();break;case 27:case 5:Kt(t);break;case 4:We(t,t.stateNode.containerInfo);break;case 10:Kr(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Zr(t),t.flags|=128,null):(i&t.child.childLanes)!==0?kg(e,t,i):(Zr(t),e=Ir(e,t,i),e!==null?e.sibling:null);Zr(t);break;case 19:var f=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(ol(e,t,i,!1),l=(i&t.childLanes)!==0),f){if(l)return Dg(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Re(ma,ma.current),l)break;return null;case 22:case 23:return t.lanes=0,Cg(e,t,i);case 24:Kr(t,ga,e.memoizedState.cache)}return Ir(e,t,i)}function Lg(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ca=!0;else{if(!Ud(e,i)&&(t.flags&128)===0)return Ca=!1,_E(e,t,i);Ca=(e.flags&131072)!==0}else Ca=!1,Bt&&(t.flags&1048576)!==0&&oh(t,Io,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,f=l._init;if(l=f(l._payload),t.type=l,typeof l=="function")Pc(l)?(e=zi(l,e),t.tag=1,t=Sg(null,t,l,e,i)):(t.tag=0,t=Nd(null,t,l,e,i));else{if(l!=null){if(f=l.$$typeof,f===P){t.tag=11,t=vg(null,t,l,e,i);break e}else if(f===ce){t.tag=14,t=wg(null,t,l,e,i);break e}}throw t=Ne(l)||l,Error(s(306,t,""))}}return t;case 0:return Nd(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,f=zi(l,t.pendingProps),Sg(e,t,l,f,i);case 3:e:{if(We(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var m=t.memoizedState;f=m.element,rd(e,t),gl(t,l,null,i);var x=t.memoizedState;if(l=x.cache,Kr(t,ga,l),l!==m.cache&&Wc(t,[ga],i,!0),hl(),l=x.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=m,t.memoizedState=m,t.flags&256){t=Ng(e,t,l,i);break e}else if(l!==f){f=In(Error(s(424)),t),ll(f),t=Ng(e,t,l,i);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(Zt=Hn(e.firstChild),qa=t,Bt=!0,Oi=null,er=!0,i=cg(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(sl(),l===f){t=Ir(e,t,i);break e}La(e,t,l,i)}t=t.child}return t;case 26:return zo(e,t),e===null?(i=Mm(t.type,null,t.pendingProps,null))?t.memoizedState=i:Bt||(i=t.type,e=t.pendingProps,l=su(He.current).createElement(i),l[_t]=t,l[fa]=e,Qa(l,i,e),Ht(l),t.stateNode=l):t.memoizedState=Mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kt(t),e===null&&Bt&&(l=t.stateNode=Rm(t.type,t.pendingProps,He.current),qa=t,er=!0,f=Zt,ui(t.type)?(mf=f,Zt=Hn(l.firstChild)):Zt=f),La(e,t,t.pendingProps.children,i),zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Bt&&((f=l=Zt)&&(l=db(l,t.type,t.pendingProps,er),l!==null?(t.stateNode=l,qa=t,Zt=Hn(l.firstChild),er=!1,f=!0):f=!1),f||Fi(t)),Kt(t),f=t.type,m=t.pendingProps,x=e!==null?e.memoizedProps:null,l=m.children,ff(f,m)?l=null:x!==null&&ff(f,x)&&(t.flags|=32),t.memoizedState!==null&&(f=cd(e,t,kE,null,null,i),_l._currentValue=f),zo(e,t),La(e,t,l,i),t.child;case 6:return e===null&&Bt&&((e=i=Zt)&&(i=fb(i,t.pendingProps,er),i!==null?(t.stateNode=i,qa=t,Zt=null,e=!0):e=!1),e||Fi(t)),null;case 13:return kg(e,t,i);case 4:return We(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Is(t,null,l,i):La(e,t,l,i),t.child;case 11:return vg(e,t,t.type,t.pendingProps,i);case 7:return La(e,t,t.pendingProps,i),t.child;case 8:return La(e,t,t.pendingProps.children,i),t.child;case 12:return La(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Kr(t,t.type,l.value),La(e,t,l.children,i),t.child;case 9:return f=t.type._context,l=t.pendingProps.children,Hi(t),f=Fa(f),l=l(f),t.flags|=1,La(e,t,l,i),t.child;case 14:return wg(e,t,t.type,t.pendingProps,i);case 15:return xg(e,t,t.type,t.pendingProps,i);case 19:return Dg(e,t,i);case 31:return l=t.pendingProps,i=t.mode,l={mode:l.mode,children:l.children},e===null?(i=qo(l,i),i.ref=t.ref,t.child=i,i.return=t,t=i):(i=yr(e.child,l),i.ref=t.ref,t.child=i,i.return=t,t=i),t;case 22:return Cg(e,t,i);case 24:return Hi(t),l=Fa(ga),e===null?(f=td(),f===null&&(f=Ot,m=Zc(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),t.memoizedState={parent:l,cache:f},nd(t),Kr(t,ga,f)):((e.lanes&i)!==0&&(rd(e,t),gl(t,null,null,i),hl()),f=e.memoizedState,m=t.memoizedState,f.parent!==l?(f={parent:l,cache:l},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Kr(t,ga,l)):(l=m.cache,Kr(t,ga,l),l!==f.cache&&Wc(t,[ga],i,!0))),La(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Br(e){e.flags|=4}function Rg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vm(t)){if(t=kn.current,t!==null&&((xt&4194048)===xt?tr!==null:(xt&62914560)!==xt&&(xt&536870912)===0||t!==tr))throw fl=ad,mh;e.flags|=8192}}function Yo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?on():536870912,e.lanes|=t,ks|=t)}function wl(e,t){if(!Bt)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function jE(e,t,i){var l=t.pendingProps;switch(Kc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return Xt(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),wr(ga),bt(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(il(t)?Br(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dh())),Xt(t),null;case 26:return i=t.memoizedState,e===null?(Br(t),i!==null?(Xt(t),Rg(t,i)):(Xt(t),t.flags&=-16777217)):i?i!==e.memoizedState?(Br(t),Xt(t),Rg(t,i)):(Xt(t),t.flags&=-16777217):(e.memoizedProps!==l&&Br(t),Xt(t),t.flags&=-16777217),null;case 27:Ta(t),i=He.current;var f=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Br(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Xt(t),null}e=Ve.current,il(t)?uh(t):(e=Rm(f,l,i),t.stateNode=e,Br(t))}return Xt(t),null;case 5:if(Ta(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Br(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Xt(t),null}if(e=Ve.current,il(t))uh(t);else{switch(f=su(He.current),e){case 1:e=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:e=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":e=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":e=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?f.createElement(i,{is:l.is}):f.createElement(i)}}e[_t]=t,e[fa]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)e.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=e;e:switch(Qa(e,i,l),i){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Br(t)}}return Xt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Br(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=He.current,il(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,f=qa,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}e[_t]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Bm(e.nodeValue,i)),e||Fi(t)}else e=su(e).createTextNode(l),e[_t]=t,t.stateNode=e}return Xt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=il(t),l!==null&&l.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[_t]=t}else sl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xt(t),f=!1}else f=dh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Cr(t),t):(Cr(t),null)}if(Cr(t),(t.flags&128)!==0)return t.lanes=i,t;if(i=l!==null,e=e!==null&&e.memoizedState!==null,i){l=t.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool);var m=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)}return i!==e&&i&&(t.child.flags|=8192),Yo(t,t.updateQueue),Xt(t),null;case 4:return bt(),e===null&&lf(t.stateNode.containerInfo),Xt(t),null;case 10:return wr(t.type),Xt(t),null;case 19:if(ye(ma),f=t.memoizedState,f===null)return Xt(t),null;if(l=(t.flags&128)!==0,m=f.rendering,m===null)if(l)wl(f,!1);else{if(ea!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=Ho(e),m!==null){for(t.flags|=128,wl(f,!1),e=m.updateQueue,t.updateQueue=e,Yo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)lh(i,e),i=i.sibling;return Re(ma,ma.current&1|2),t.child}e=e.sibling}f.tail!==null&&Oe()>Xo&&(t.flags|=128,l=!0,wl(f,!1),t.lanes=4194304)}else{if(!l)if(e=Ho(m),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Yo(t,e),wl(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!Bt)return Xt(t),null}else 2*Oe()-f.renderingStartTime>Xo&&i!==536870912&&(t.flags|=128,l=!0,wl(f,!1),t.lanes=4194304);f.isBackwards?(m.sibling=t.child,t.child=m):(e=f.last,e!==null?e.sibling=m:t.child=m,f.last=m)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Oe(),t.sibling=null,e=ma.current,Re(ma,l?e&1|2:e&1),t):(Xt(t),null);case 22:case 23:return Cr(t),od(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),i=t.updateQueue,i!==null&&Yo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&ye(Gi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),wr(ga),Xt(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function OE(e,t){switch(Kc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wr(ga),bt(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ta(t),null;case 13:if(Cr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(ma),null;case 4:return bt(),null;case 10:return wr(t.type),null;case 22:case 23:return Cr(t),od(),e!==null&&ye(Gi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wr(ga),null;case 25:return null;default:return null}}function Qg(e,t){switch(Kc(t),t.tag){case 3:wr(ga),bt();break;case 26:case 27:case 5:Ta(t);break;case 4:bt();break;case 13:Cr(t);break;case 19:ye(ma);break;case 10:wr(t.type);break;case 22:case 23:Cr(t),od(),e!==null&&ye(Gi);break;case 24:wr(ga)}}function xl(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var f=l.next;i=f;do{if((i.tag&e)===e){l=void 0;var m=i.create,x=i.inst;l=m(),x.destroy=l}i=i.next}while(i!==f)}}catch(M){Mt(t,t.return,M)}}function ti(e,t,i){try{var l=t.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&e)===e){var x=l.inst,M=x.destroy;if(M!==void 0){x.destroy=void 0,f=t;var z=i,ue=M;try{ue()}catch(ve){Mt(f,z,ve)}}}l=l.next}while(l!==m)}}catch(ve){Mt(t,t.return,ve)}}function Ug(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{wh(t,i)}catch(l){Mt(e,e.return,l)}}}function Mg(e,t,i){i.props=zi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Mt(e,t,l)}}function Cl(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(f){Mt(e,t,f)}}function ar(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(f){Mt(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Mt(e,t,f)}else i.current=null}function _g(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(f){Mt(e,e.return,f)}}function Md(e,t,i){try{var l=e.stateNode;sb(l,e.type,i,t),l[fa]=t}catch(f){Mt(e,e.return,f)}}function jg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ui(e.type)||e.tag===4}function _d(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jg(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&&ui(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 jd(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=iu));else if(l!==4&&(l===27&&ui(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(jd(e,t,i),e=e.sibling;e!==null;)jd(e,t,i),e=e.sibling}function Ko(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&ui(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Ko(e,t,i),e=e.sibling;e!==null;)Ko(e,t,i),e=e.sibling}function Og(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Qa(t,l,i),t[_t]=e,t[fa]=i}catch(m){Mt(e,e.return,m)}}var Sr=!1,sa=!1,Od=!1,Fg=typeof WeakSet=="function"?WeakSet:Set,Ia=null;function FE(e,t){if(e=e.containerInfo,cf=fu,e=$A(e),_c(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var f=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var x=0,M=-1,z=-1,ue=0,ve=0,Se=e,fe=null;t:for(;;){for(var he;Se!==i||f!==0&&Se.nodeType!==3||(M=x+f),Se!==m||l!==0&&Se.nodeType!==3||(z=x+l),Se.nodeType===3&&(x+=Se.nodeValue.length),(he=Se.firstChild)!==null;)fe=Se,Se=he;for(;;){if(Se===e)break t;if(fe===i&&++ue===f&&(M=x),fe===m&&++ve===l&&(z=x),(he=Se.nextSibling)!==null)break;Se=fe,fe=Se.parentNode}Se=he}i=M===-1||z===-1?null:{start:M,end:z}}else i=null}i=i||{start:0,end:0}}else i=null;for(df={focusedElem:e,selectionRange:i},fu=!1,Ia=t;Ia!==null;)if(t=Ia,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Ia=e;else for(;Ia!==null;){switch(t=Ia,m=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,i=t,f=m.memoizedProps,m=m.memoizedState,l=i.stateNode;try{var at=zi(i.type,f,i.elementType===i.type);e=l.getSnapshotBeforeUpdate(at,m),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ze){Mt(i,i.return,Ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)hf(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Ia=e;break}Ia=t.return}}function Vg(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:ai(e,i),l&4&&xl(5,i);break;case 1:if(ai(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(x){Mt(i,i.return,x)}else{var f=zi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Mt(i,i.return,x)}}l&64&&Ug(i),l&512&&Cl(i,i.return);break;case 3:if(ai(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{wh(e,t)}catch(x){Mt(i,i.return,x)}}break;case 27:t===null&&l&4&&Og(i);case 26:case 5:ai(e,i),t===null&&l&4&&_g(i),l&512&&Cl(i,i.return);break;case 12:ai(e,i);break;case 13:ai(e,i),l&4&&Pg(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=JE.bind(null,i),Ab(e,i))));break;case 22:if(l=i.memoizedState!==null||Sr,!l){t=t!==null&&t.memoizedState!==null||sa,f=Sr;var m=sa;Sr=l,(sa=t)&&!m?ni(e,i,(i.subtreeFlags&8772)!==0):ai(e,i),Sr=f,sa=m}break;case 30:break;default:ai(e,i)}}function Hg(e){var t=e.alternate;t!==null&&(e.alternate=null,Hg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&aa(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 zt=null,an=!1;function Nr(e,t,i){for(i=i.child;i!==null;)Gg(e,t,i),i=i.sibling}function Gg(e,t,i){if(T&&typeof T.onCommitFiberUnmount=="function")try{T.onCommitFiberUnmount(Ge,i)}catch{}switch(i.tag){case 26:sa||ar(i,t),Nr(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:sa||ar(i,t);var l=zt,f=an;ui(i.type)&&(zt=i.stateNode,an=!1),Nr(e,t,i),Rl(i.stateNode),zt=l,an=f;break;case 5:sa||ar(i,t);case 6:if(l=zt,f=an,zt=null,Nr(e,t,i),zt=l,an=f,zt!==null)if(an)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(i.stateNode)}catch(m){Mt(i,t,m)}else try{zt.removeChild(i.stateNode)}catch(m){Mt(i,t,m)}break;case 18:zt!==null&&(an?(e=zt,Dm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Vl(e)):Dm(zt,i.stateNode));break;case 4:l=zt,f=an,zt=i.stateNode.containerInfo,an=!0,Nr(e,t,i),zt=l,an=f;break;case 0:case 11:case 14:case 15:sa||ti(2,i,t),sa||ti(4,i,t),Nr(e,t,i);break;case 1:sa||(ar(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Mg(i,t,l)),Nr(e,t,i);break;case 21:Nr(e,t,i);break;case 22:sa=(l=sa)||i.memoizedState!==null,Nr(e,t,i),sa=l;break;default:Nr(e,t,i)}}function Pg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vl(e)}catch(i){Mt(t,t.return,i)}}function VE(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Fg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Fg),t;default:throw Error(s(435,e.tag))}}function Fd(e,t){var i=VE(e);t.forEach(function(l){var f=XE.bind(null,e,l);i.has(l)||(i.add(l),l.then(f,f))})}function hn(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l],m=e,x=t,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(ui(M.type)){zt=M.stateNode,an=!1;break e}break;case 5:zt=M.stateNode,an=!1;break e;case 3:case 4:zt=M.stateNode.containerInfo,an=!0;break e}M=M.return}if(zt===null)throw Error(s(160));Gg(m,x,f),zt=null,an=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)zg(t,e),t=t.sibling}var Vn=null;function zg(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hn(t,e),gn(e),l&4&&(ti(3,e,e.return),xl(3,e),ti(5,e,e.return));break;case 1:hn(t,e),gn(e),l&512&&(sa||i===null||ar(i,i.return)),l&64&&Sr&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var f=Vn;if(hn(t,e),gn(e),l&512&&(sa||i===null||ar(i,i.return)),l&4){var m=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":m=f.getElementsByTagName("title")[0],(!m||m[bn]||m[_t]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(l),f.head.insertBefore(m,f.querySelector("head > title"))),Qa(m,l,i),m[_t]=e,Ht(m),l=m;break e;case"link":var x=Om("link","href",f).get(l+(i.href||""));if(x){for(var M=0;M<x.length;M++)if(m=x[M],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(M,1);break t}}m=f.createElement(l),Qa(m,l,i),f.head.appendChild(m);break;case"meta":if(x=Om("meta","content",f).get(l+(i.content||""))){for(M=0;M<x.length;M++)if(m=x[M],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(M,1);break t}}m=f.createElement(l),Qa(m,l,i),f.head.appendChild(m);break;default:throw Error(s(468,l))}m[_t]=e,Ht(m),l=m}e.stateNode=l}else Fm(f,e.type,e.stateNode);else e.stateNode=jm(f,l,e.memoizedProps);else m!==l?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,l===null?Fm(f,e.type,e.stateNode):jm(f,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Md(e,e.memoizedProps,i.memoizedProps)}break;case 27:hn(t,e),gn(e),l&512&&(sa||i===null||ar(i,i.return)),i!==null&&l&4&&Md(e,e.memoizedProps,i.memoizedProps);break;case 5:if(hn(t,e),gn(e),l&512&&(sa||i===null||ar(i,i.return)),e.flags&32){f=e.stateNode;try{Cn(f,"")}catch(he){Mt(e,e.return,he)}}l&4&&e.stateNode!=null&&(f=e.memoizedProps,Md(e,f,i!==null?i.memoizedProps:f)),l&1024&&(Od=!0);break;case 6:if(hn(t,e),gn(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(he){Mt(e,e.return,he)}}break;case 3:if(uu=null,f=Vn,Vn=lu(t.containerInfo),hn(t,e),Vn=f,gn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Vl(t.containerInfo)}catch(he){Mt(e,e.return,he)}Od&&(Od=!1,qg(e));break;case 4:l=Vn,Vn=lu(e.stateNode.containerInfo),hn(t,e),gn(e),Vn=l;break;case 12:hn(t,e),gn(e);break;case 13:hn(t,e),gn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(qd=Oe()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fd(e,l)));break;case 22:f=e.memoizedState!==null;var z=i!==null&&i.memoizedState!==null,ue=Sr,ve=sa;if(Sr=ue||f,sa=ve||z,hn(t,e),sa=ve,Sr=ue,gn(e),l&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||z||Sr||sa||qi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){z=i=t;try{if(m=z.stateNode,f)x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{M=z.stateNode;var Se=z.memoizedProps.style,fe=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;M.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(he){Mt(z,z.return,he)}}}else if(t.tag===6){if(i===null){z=t;try{z.stateNode.nodeValue=f?"":z.memoizedProps}catch(he){Mt(z,z.return,he)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Fd(e,i))));break;case 19:hn(t,e),gn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fd(e,l)));break;case 30:break;case 21:break;default:hn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(jg(l)){i=l;break}l=l.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var f=i.stateNode,m=_d(e);Ko(e,m,f);break;case 5:var x=i.stateNode;i.flags&32&&(Cn(x,""),i.flags&=-33);var M=_d(e);Ko(e,M,x);break;case 3:case 4:var z=i.stateNode.containerInfo,ue=_d(e);jd(e,ue,z);break;default:throw Error(s(161))}}catch(ve){Mt(e,e.return,ve)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ai(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vg(e,t.alternate,t),t=t.sibling}function qi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ti(4,t,t.return),qi(t);break;case 1:ar(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Mg(t,t.return,i),qi(t);break;case 27:Rl(t.stateNode);case 26:case 5:ar(t,t.return),qi(t);break;case 22:t.memoizedState===null&&qi(t);break;case 30:qi(t);break;default:qi(t)}e=e.sibling}}function ni(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,f=e,m=t,x=m.flags;switch(m.tag){case 0:case 11:case 15:ni(f,m,i),xl(4,m);break;case 1:if(ni(f,m,i),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ue){Mt(l,l.return,ue)}if(l=m,f=l.updateQueue,f!==null){var M=l.stateNode;try{var z=f.shared.hiddenCallbacks;if(z!==null)for(f.shared.hiddenCallbacks=null,f=0;f<z.length;f++)vh(z[f],M)}catch(ue){Mt(l,l.return,ue)}}i&&x&64&&Ug(m),Cl(m,m.return);break;case 27:Og(m);case 26:case 5:ni(f,m,i),i&&l===null&&x&4&&_g(m),Cl(m,m.return);break;case 12:ni(f,m,i);break;case 13:ni(f,m,i),i&&x&4&&Pg(f,m);break;case 22:m.memoizedState===null&&ni(f,m,i),Cl(m,m.return);break;case 30:break;default:ni(f,m,i)}t=t.sibling}}function Vd(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ul(i))}function Hd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ul(e))}function nr(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yg(e,t,i,l),t=t.sibling}function Yg(e,t,i,l){var f=t.flags;switch(t.tag){case 0:case 11:case 15:nr(e,t,i,l),f&2048&&xl(9,t);break;case 1:nr(e,t,i,l);break;case 3:nr(e,t,i,l),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ul(e)));break;case 12:if(f&2048){nr(e,t,i,l),e=t.stateNode;try{var m=t.memoizedProps,x=m.id,M=m.onPostCommit;typeof M=="function"&&M(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){Mt(t,t.return,z)}}else nr(e,t,i,l);break;case 13:nr(e,t,i,l);break;case 23:break;case 22:m=t.stateNode,x=t.alternate,t.memoizedState!==null?m._visibility&2?nr(e,t,i,l):Il(e,t):m._visibility&2?nr(e,t,i,l):(m._visibility|=2,Bs(e,t,i,l,(t.subtreeFlags&10256)!==0)),f&2048&&Vd(x,t);break;case 24:nr(e,t,i,l),f&2048&&Hd(t.alternate,t);break;default:nr(e,t,i,l)}}function Bs(e,t,i,l,f){for(f=f&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var m=e,x=t,M=i,z=l,ue=x.flags;switch(x.tag){case 0:case 11:case 15:Bs(m,x,M,z,f),xl(8,x);break;case 23:break;case 22:var ve=x.stateNode;x.memoizedState!==null?ve._visibility&2?Bs(m,x,M,z,f):Il(m,x):(ve._visibility|=2,Bs(m,x,M,z,f)),f&&ue&2048&&Vd(x.alternate,x);break;case 24:Bs(m,x,M,z,f),f&&ue&2048&&Hd(x.alternate,x);break;default:Bs(m,x,M,z,f)}t=t.sibling}}function Il(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,f=l.flags;switch(l.tag){case 22:Il(i,l),f&2048&&Vd(l.alternate,l);break;case 24:Il(i,l),f&2048&&Hd(l.alternate,l);break;default:Il(i,l)}t=t.sibling}}var Bl=8192;function Ss(e){if(e.subtreeFlags&Bl)for(e=e.child;e!==null;)Kg(e),e=e.sibling}function Kg(e){switch(e.tag){case 26:Ss(e),e.flags&Bl&&e.memoizedState!==null&&Bb(Vn,e.memoizedState,e.memoizedProps);break;case 5:Ss(e);break;case 3:case 4:var t=Vn;Vn=lu(e.stateNode.containerInfo),Ss(e),Vn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Bl,Bl=16777216,Ss(e),Bl=t):Ss(e));break;default:Ss(e)}}function Jg(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 Sl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Ia=l,$g(l,e)}Jg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xg(e),e=e.sibling}function Xg(e){switch(e.tag){case 0:case 11:case 15:Sl(e),e.flags&2048&&ti(9,e,e.return);break;case 3:Sl(e);break;case 12:Sl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Jo(e)):Sl(e);break;default:Sl(e)}}function Jo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Ia=l,$g(l,e)}Jg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ti(8,t,t.return),Jo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Jo(t));break;default:Jo(t)}e=e.sibling}}function $g(e,t){for(;Ia!==null;){var i=Ia;switch(i.tag){case 0:case 11:case 15:ti(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ul(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Ia=l;else e:for(i=e;Ia!==null;){l=Ia;var f=l.sibling,m=l.return;if(Hg(l),l===i){Ia=null;break e}if(f!==null){f.return=m,Ia=f;break e}Ia=m}}}var HE={getCacheForType:function(e){var t=Fa(ga),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i}},GE=typeof WeakMap=="function"?WeakMap:Map,St=0,Ot=null,pt=null,xt=0,Nt=0,mn=null,ri=!1,Ns=!1,Gd=!1,kr=0,ea=0,ii=0,Yi=0,Pd=0,Tn=0,ks=0,Nl=null,nn=null,zd=!1,qd=0,Xo=1/0,$o=null,si=null,Ra=0,li=null,Ts=null,Ds=0,Yd=0,Kd=null,Wg=null,kl=0,Jd=null;function pn(){if((St&2)!==0&&xt!==0)return xt&-xt;if(Y.T!==null){var e=ys;return e!==0?e:af()}return Or()}function Zg(){Tn===0&&(Tn=(xt&536870912)===0||Bt?ns():536870912);var e=kn.current;return e!==null&&(e.flags|=32),Tn}function yn(e,t,i){(e===Ot&&(Nt===2||Nt===9)||e.cancelPendingCommit!==null)&&(Ls(e,0),oi(e,xt,Tn,!1)),Jn(e,i),((St&2)===0||e!==Ot)&&(e===Ot&&((St&2)===0&&(Yi|=i),ea===4&&oi(e,xt,Tn,!1)),rr(e))}function em(e,t,i){if((St&6)!==0)throw Error(s(327));var l=!i&&(t&124)===0&&(t&e.expiredLanes)===0||vt(e,t),f=l?qE(e,t):Wd(e,t,!0),m=l;do{if(f===0){Ns&&!l&&oi(e,t,0,!1);break}else{if(i=e.current.alternate,m&&!PE(i)){f=Wd(e,t,!1),m=!1;continue}if(f===2){if(m=t,e.errorRecoveryDisabledLanes&m)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var M=e;f=Nl;var z=M.current.memoizedState.isDehydrated;if(z&&(Ls(M,x).flags|=256),x=Wd(M,x,!1),x!==2){if(Gd&&!z){M.errorRecoveryDisabledLanes|=m,Yi|=m,f=4;break e}m=nn,nn=f,m!==null&&(nn===null?nn=m:nn.push.apply(nn,m))}f=x}if(m=!1,f!==2)continue}}if(f===1){Ls(e,0),oi(e,t,0,!0);break}e:{switch(l=e,m=f,m){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:oi(l,t,Tn,!ri);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(f=qd+300-Oe(),10<f)){if(oi(l,t,Tn,!ri),ft(l,0,!0)!==0)break e;l.timeoutHandle=km(tm.bind(null,l,i,nn,$o,zd,t,Tn,Yi,ks,ri,m,2,-0,0),f);break e}tm(l,i,nn,$o,zd,t,Tn,Yi,ks,ri,m,0,-0,0)}}break}while(!0);rr(e)}function tm(e,t,i,l,f,m,x,M,z,ue,ve,Se,fe,he){if(e.timeoutHandle=-1,Se=t.subtreeFlags,(Se&8192||(Se&16785408)===16785408)&&(Ml={stylesheets:null,count:0,unsuspend:Ib},Kg(t),Se=Sb(),Se!==null)){e.cancelPendingCommit=Se(om.bind(null,e,t,m,i,l,f,x,M,z,ve,1,fe,he)),oi(e,m,x,!ue);return}om(e,t,m,i,l,f,x,M,z)}function PE(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var f=i[l],m=f.getSnapshot;f=f.value;try{if(!fn(m(),f))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function oi(e,t,i,l){t&=~Pd,t&=~Yi,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var f=t;0<f;){var m=31-w(f),x=1<<m;l[m]=-1,f&=~x}i!==0&&_e(e,i,t)}function Wo(){return(St&6)===0?(Tl(0),!1):!0}function Xd(){if(pt!==null){if(Nt===0)var e=pt.return;else e=pt,vr=Vi=null,Ad(e),Cs=null,bl=0,e=pt;for(;e!==null;)Qg(e.alternate,e),e=e.return;pt=null}}function Ls(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,ob(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Xd(),Ot=e,pt=i=yr(e.current,null),xt=t,Nt=0,mn=null,ri=!1,Ns=vt(e,t),Gd=!1,ks=Tn=Pd=Yi=ii=ea=0,nn=Nl=null,zd=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var f=31-w(l),m=1<<f;t|=e[f],l&=~m}return kr=t,bo(),i}function am(e,t){At=null,Y.H=Oo,t===dl||t===ko?(t=Eh(),Nt=3):t===mh?(t=Eh(),Nt=4):Nt=t===bg?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,pt===null&&(ea=1,Po(e,In(t,e.current)))}function nm(){var e=Y.H;return Y.H=Oo,e===null?Oo:e}function rm(){var e=Y.A;return Y.A=HE,e}function $d(){ea=4,ri||(xt&4194048)!==xt&&kn.current!==null||(Ns=!0),(ii&134217727)===0&&(Yi&134217727)===0||Ot===null||oi(Ot,xt,Tn,!1)}function Wd(e,t,i){var l=St;St|=2;var f=nm(),m=rm();(Ot!==e||xt!==t)&&($o=null,Ls(e,t)),t=!1;var x=ea;e:do try{if(Nt!==0&&pt!==null){var M=pt,z=mn;switch(Nt){case 8:Xd(),x=6;break e;case 3:case 2:case 9:case 6:kn.current===null&&(t=!0);var ue=Nt;if(Nt=0,mn=null,Rs(e,M,z,ue),i&&Ns){x=0;break e}break;default:ue=Nt,Nt=0,mn=null,Rs(e,M,z,ue)}}zE(),x=ea;break}catch(ve){am(e,ve)}while(!0);return t&&e.shellSuspendCounter++,vr=Vi=null,St=l,Y.H=f,Y.A=m,pt===null&&(Ot=null,xt=0,bo()),x}function zE(){for(;pt!==null;)im(pt)}function qE(e,t){var i=St;St|=2;var l=nm(),f=rm();Ot!==e||xt!==t?($o=null,Xo=Oe()+500,Ls(e,t)):Ns=vt(e,t);e:do try{if(Nt!==0&&pt!==null){t=pt;var m=mn;t:switch(Nt){case 1:Nt=0,mn=null,Rs(e,t,m,1);break;case 2:case 9:if(ph(m)){Nt=0,mn=null,sm(t);break}t=function(){Nt!==2&&Nt!==9||Ot!==e||(Nt=7),rr(e)},m.then(t,t);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:ph(m)?(Nt=0,mn=null,sm(t)):(Nt=0,mn=null,Rs(e,t,m,7));break;case 5:var x=null;switch(pt.tag){case 26:x=pt.memoizedState;case 5:case 27:var M=pt;if(!x||Vm(x)){Nt=0,mn=null;var z=M.sibling;if(z!==null)pt=z;else{var ue=M.return;ue!==null?(pt=ue,Zo(ue)):pt=null}break t}}Nt=0,mn=null,Rs(e,t,m,5);break;case 6:Nt=0,mn=null,Rs(e,t,m,6);break;case 8:Xd(),ea=6;break e;default:throw Error(s(462))}}YE();break}catch(ve){am(e,ve)}while(!0);return vr=Vi=null,Y.H=l,Y.A=f,St=i,pt!==null?0:(Ot=null,xt=0,bo(),ea)}function YE(){for(;pt!==null&&!va();)im(pt)}function im(e){var t=Lg(e.alternate,e,kr);e.memoizedProps=e.pendingProps,t===null?Zo(e):pt=t}function sm(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Bg(i,t,t.pendingProps,t.type,void 0,xt);break;case 11:t=Bg(i,t,t.pendingProps,t.type.render,t.ref,xt);break;case 5:Ad(t);default:Qg(i,t),t=pt=lh(t,kr),t=Lg(i,t,kr)}e.memoizedProps=e.pendingProps,t===null?Zo(e):pt=t}function Rs(e,t,i,l){vr=Vi=null,Ad(t),Cs=null,bl=0;var f=t.return;try{if(ME(e,f,t,i,xt)){ea=1,Po(e,In(i,e.current)),pt=null;return}}catch(m){if(f!==null)throw pt=f,m;ea=1,Po(e,In(i,e.current)),pt=null;return}t.flags&32768?(Bt||l===1?e=!0:Ns||(xt&536870912)!==0?e=!1:(ri=e=!0,(l===2||l===9||l===3||l===6)&&(l=kn.current,l!==null&&l.tag===13&&(l.flags|=16384))),lm(t,e)):Zo(t)}function Zo(e){var t=e;do{if((t.flags&32768)!==0){lm(t,ri);return}e=t.return;var i=jE(t.alternate,t,kr);if(i!==null){pt=i;return}if(t=t.sibling,t!==null){pt=t;return}pt=t=e}while(t!==null);ea===0&&(ea=5)}function lm(e,t){do{var i=OE(e.alternate,e);if(i!==null){i.flags&=32767,pt=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){pt=e;return}pt=e=i}while(e!==null);ea=6,pt=null}function om(e,t,i,l,f,m,x,M,z){e.cancelPendingCommit=null;do eu();while(Ra!==0);if((St&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(m=t.lanes|t.childLanes,m|=Hc,rs(e,i,m,x,M,z),e===Ot&&(pt=Ot=null,xt=0),Ts=t,li=e,Ds=i,Yd=m,Kd=f,Wg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$E(J,function(){return Am(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=Y.T,Y.T=null,f=ae.p,ae.p=2,x=St,St|=4;try{FE(e,t,i)}finally{St=x,ae.p=f,Y.T=l}}Ra=1,um(),cm(),dm()}}function um(){if(Ra===1){Ra=0;var e=li,t=Ts,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=Y.T,Y.T=null;var l=ae.p;ae.p=2;var f=St;St|=4;try{zg(t,e);var m=df,x=$A(e.containerInfo),M=m.focusedElem,z=m.selectionRange;if(x!==M&&M&&M.ownerDocument&&XA(M.ownerDocument.documentElement,M)){if(z!==null&&_c(M)){var ue=z.start,ve=z.end;if(ve===void 0&&(ve=ue),"selectionStart"in M)M.selectionStart=ue,M.selectionEnd=Math.min(ve,M.value.length);else{var Se=M.ownerDocument||document,fe=Se&&Se.defaultView||window;if(fe.getSelection){var he=fe.getSelection(),at=M.textContent.length,Ze=Math.min(z.start,at),Lt=z.end===void 0?Ze:Math.min(z.end,at);!he.extend&&Ze>Lt&&(x=Lt,Lt=Ze,Ze=x);var ne=JA(M,Ze),W=JA(M,Lt);if(ne&&W&&(he.rangeCount!==1||he.anchorNode!==ne.node||he.anchorOffset!==ne.offset||he.focusNode!==W.node||he.focusOffset!==W.offset)){var oe=Se.createRange();oe.setStart(ne.node,ne.offset),he.removeAllRanges(),Ze>Lt?(he.addRange(oe),he.extend(W.node,W.offset)):(oe.setEnd(W.node,W.offset),he.addRange(oe))}}}}for(Se=[],he=M;he=he.parentNode;)he.nodeType===1&&Se.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<Se.length;M++){var Ce=Se[M];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}fu=!!cf,df=cf=null}finally{St=f,ae.p=l,Y.T=i}}e.current=t,Ra=2}}function cm(){if(Ra===2){Ra=0;var e=li,t=Ts,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=Y.T,Y.T=null;var l=ae.p;ae.p=2;var f=St;St|=4;try{Vg(e,t.alternate,t)}finally{St=f,ae.p=l,Y.T=i}}Ra=3}}function dm(){if(Ra===4||Ra===3){Ra=0,Te();var e=li,t=Ts,i=Ds,l=Wg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ra=5:(Ra=0,Ts=li=null,fm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(si=null),wa(i),t=t.stateNode,T&&typeof T.onCommitFiberRoot=="function")try{T.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=Y.T,f=ae.p,ae.p=2,Y.T=null;try{for(var m=e.onRecoverableError,x=0;x<l.length;x++){var M=l[x];m(M.value,{componentStack:M.stack})}}finally{Y.T=t,ae.p=f}}(Ds&3)!==0&&eu(),rr(e),f=e.pendingLanes,(i&4194090)!==0&&(f&42)!==0?e===Jd?kl++:(kl=0,Jd=e):kl=0,Tl(0)}}function fm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ul(t)))}function eu(e){return um(),cm(),dm(),Am()}function Am(){if(Ra!==5)return!1;var e=li,t=Yd;Yd=0;var i=wa(Ds),l=Y.T,f=ae.p;try{ae.p=32>i?32:i,Y.T=null,i=Kd,Kd=null;var m=li,x=Ds;if(Ra=0,Ts=li=null,Ds=0,(St&6)!==0)throw Error(s(331));var M=St;if(St|=4,Xg(m.current),Yg(m,m.current,x,i),St=M,Tl(0,!1),T&&typeof T.onPostCommitFiberRoot=="function")try{T.onPostCommitFiberRoot(Ge,m)}catch{}return!0}finally{ae.p=f,Y.T=l,fm(e,t)}}function hm(e,t,i){t=In(i,t),t=Sd(e.stateNode,t,2),e=$r(e,t,2),e!==null&&(Jn(e,2),rr(e))}function Mt(e,t,i){if(e.tag===3)hm(e,e,i);else for(;t!==null;){if(t.tag===3){hm(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(si===null||!si.has(l))){e=In(i,e),i=yg(2),l=$r(t,i,2),l!==null&&(Eg(i,l,t,e),Jn(l,2),rr(l));break}}t=t.return}}function Zd(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new GE;var f=new Set;l.set(t,f)}else f=l.get(t),f===void 0&&(f=new Set,l.set(t,f));f.has(i)||(Gd=!0,f.add(i),e=KE.bind(null,e,t,i),t.then(e,e))}function KE(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ot===e&&(xt&i)===i&&(ea===4||ea===3&&(xt&62914560)===xt&&300>Oe()-qd?(St&2)===0&&Ls(e,0):Pd|=i,ks===xt&&(ks=0)),rr(e)}function gm(e,t){t===0&&(t=on()),e=hs(e,t),e!==null&&(Jn(e,t),rr(e))}function JE(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),gm(e,i)}function XE(e,t){var i=0;switch(e.tag){case 13:var l=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),gm(e,i)}function $E(e,t){return Vt(e,t)}var tu=null,Qs=null,ef=!1,au=!1,tf=!1,Ki=0;function rr(e){e!==Qs&&e.next===null&&(Qs===null?tu=Qs=e:Qs=Qs.next=e),au=!0,ef||(ef=!0,ZE())}function Tl(e,t){if(!tf&&au){tf=!0;do for(var i=!1,l=tu;l!==null;){if(e!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var x=l.suspendedLanes,M=l.pingedLanes;m=(1<<31-w(42|e)+1)-1,m&=f&~(x&~M),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,Em(l,m))}else m=xt,m=ft(l,l===Ot?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||vt(l,m)||(i=!0,Em(l,m));l=l.next}while(i);tf=!1}}function WE(){mm()}function mm(){au=ef=!1;var e=0;Ki!==0&&(lb()&&(e=Ki),Ki=0);for(var t=Oe(),i=null,l=tu;l!==null;){var f=l.next,m=pm(l,t);m===0?(l.next=null,i===null?tu=f:i.next=f,f===null&&(Qs=i)):(i=l,(e!==0||(m&3)!==0)&&(au=!0)),l=f}Tl(e)}function pm(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var x=31-w(m),M=1<<x,z=f[x];z===-1?((M&i)===0||(M&l)!==0)&&(f[x]=ot(M,t)):z<=t&&(e.expiredLanes|=M),m&=~M}if(t=Ot,i=xt,i=ft(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(Nt===2||Nt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ft(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||vt(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Ft(l),wa(i)){case 2:case 8:i=F;break;case 32:i=J;break;case 268435456:i=ke;break;default:i=J}return l=ym.bind(null,e),i=Vt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Ft(l),e.callbackPriority=2,e.callbackNode=null,2}function ym(e,t){if(Ra!==0&&Ra!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(eu()&&e.callbackNode!==i)return null;var l=xt;return l=ft(e,e===Ot?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(em(e,l,t),pm(e,Oe()),e.callbackNode!=null&&e.callbackNode===i?ym.bind(null,e):null)}function Em(e,t){if(eu())return null;em(e,t,!0)}function ZE(){ub(function(){(St&6)!==0?Vt(lt,WE):mm()})}function af(){return Ki===0&&(Ki=ns()),Ki}function bm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Be(""+e)}function vm(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function eb(e,t,i,l,f){if(t==="submit"&&i&&i.stateNode===f){var m=bm((f[fa]||null).action),x=l.submitter;x&&(t=(t=x[fa]||null)?bm(t.formAction):x.getAttribute("formAction"),t!==null&&(m=t,x=null));var M=new st("action","action",null,l,f);e.push({event:M,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ki!==0){var z=x?vm(f,x):new FormData(f);wd(i,{pending:!0,data:z,method:f.method,action:m},null,z)}}else typeof m=="function"&&(M.preventDefault(),z=x?vm(f,x):new FormData(f),wd(i,{pending:!0,data:z,method:f.method,action:m},m,z))},currentTarget:f}]})}}for(var nf=0;nf<Vc.length;nf++){var rf=Vc[nf],tb=rf.toLowerCase(),ab=rf[0].toUpperCase()+rf.slice(1);Fn(tb,"on"+ab)}Fn(eh,"onAnimationEnd"),Fn(th,"onAnimationIteration"),Fn(ah,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn(EE,"onTransitionRun"),Fn(bE,"onTransitionStart"),Fn(vE,"onTransitionCancel"),Fn(nh,"onTransitionEnd"),Aa("onMouseEnter",["mouseout","mouseover"]),Aa("onMouseLeave",["mouseout","mouseover"]),Aa("onPointerEnter",["pointerout","pointerover"]),Aa("onPointerLeave",["pointerout","pointerover"]),_n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_n("onBeforeInput",["compositionend","keypress","textInput","paste"]),_n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),nb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function wm(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],f=l.event;l=l.listeners;e:{var m=void 0;if(t)for(var x=l.length-1;0<=x;x--){var M=l[x],z=M.instance,ue=M.currentTarget;if(M=M.listener,z!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=ue;try{m(f)}catch(ve){Go(ve)}f.currentTarget=null,m=z}else for(x=0;x<l.length;x++){if(M=l[x],z=M.instance,ue=M.currentTarget,M=M.listener,z!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=ue;try{m(f)}catch(ve){Go(ve)}f.currentTarget=null,m=z}}}}function yt(e,t){var i=t[Fr];i===void 0&&(i=t[Fr]=new Set);var l=e+"__bubble";i.has(l)||(xm(t,e,2,!1),i.add(l))}function sf(e,t,i){var l=0;t&&(l|=4),xm(i,e,l,t)}var nu="_reactListening"+Math.random().toString(36).slice(2);function lf(e){if(!e[nu]){e[nu]=!0,Ni.forEach(function(i){i!=="selectionchange"&&(nb.has(i)||sf(i,!1,e),sf(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nu]||(t[nu]=!0,sf("selectionchange",!1,t))}}function xm(e,t,i,l){switch(Ym(t)){case 2:var f=Tb;break;case 8:f=Db;break;default:f=vf}i=f.bind(null,t,i,e),f=void 0,!Gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),l?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function of(e,t,i,l,f){var m=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var M=l.stateNode.containerInfo;if(M===f)break;if(x===4)for(x=l.return;x!==null;){var z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===f)return;x=x.return}for(;M!==null;){if(x=Un(M),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){l=m=x;continue e}M=M.parentNode}}l=l.return}za(function(){var ue=m,ve=Fe(i),Se=[];e:{var fe=rh.get(e);if(fe!==void 0){var he=st,at=e;switch(e){case"keypress":if(_(i)===0)break e;case"keydown":case"keyup":he=Ic;break;case"focusin":at="focus",he=Zs;break;case"focusout":at="blur",he=Zs;break;case"beforeblur":case"afterblur":he=Zs;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=Ao;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=Ac;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=Sc;break;case eh:case th:case ah:he=mc;break;case nh:he=kc;break;case"scroll":case"scrollend":he=Pt;break;case"wheel":he=po;break;case"copy":case"cut":case"paste":he=yc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=mo;break;case"toggle":case"beforetoggle":he=Lc}var Ze=(t&4)!==0,Lt=!Ze&&(e==="scroll"||e==="scrollend"),ne=Ze?fe!==null?fe+"Capture":null:fe;Ze=[];for(var W=ue,oe;W!==null;){var Ce=W;if(oe=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||oe===null||ne===null||(Ce=un(W,ne),Ce!=null&&Ze.push(Ll(W,Ce,oe))),Lt)break;W=W.return}0<Ze.length&&(fe=new he(fe,at,null,i,ve),Se.push({event:fe,listeners:Ze}))}}if((t&7)===0){e:{if(fe=e==="mouseover"||e==="pointerover",he=e==="mouseout"||e==="pointerout",fe&&i!==Ue&&(at=i.relatedTarget||i.fromElement)&&(Un(at)||at[Jt]))break e;if((he||fe)&&(fe=ve.window===ve?ve:(fe=ve.ownerDocument)?fe.defaultView||fe.parentWindow:window,he?(at=i.relatedTarget||i.toElement,he=ue,at=at?Un(at):null,at!==null&&(Lt=u(at),Ze=at.tag,at!==Lt||Ze!==5&&Ze!==27&&Ze!==6)&&(at=null)):(he=null,at=ue),he!==at)){if(Ze=Ao,Ce="onMouseLeave",ne="onMouseEnter",W="mouse",(e==="pointerout"||e==="pointerover")&&(Ze=mo,Ce="onPointerLeave",ne="onPointerEnter",W="pointer"),Lt=he==null?fe:Pa(he),oe=at==null?fe:Pa(at),fe=new Ze(Ce,W+"leave",he,i,ve),fe.target=Lt,fe.relatedTarget=oe,Ce=null,Un(ve)===ue&&(Ze=new Ze(ne,W+"enter",at,i,ve),Ze.target=oe,Ze.relatedTarget=Lt,Ce=Ze),Lt=Ce,he&&at)t:{for(Ze=he,ne=at,W=0,oe=Ze;oe;oe=Us(oe))W++;for(oe=0,Ce=ne;Ce;Ce=Us(Ce))oe++;for(;0<W-oe;)Ze=Us(Ze),W--;for(;0<oe-W;)ne=Us(ne),oe--;for(;W--;){if(Ze===ne||ne!==null&&Ze===ne.alternate)break t;Ze=Us(Ze),ne=Us(ne)}Ze=null}else Ze=null;he!==null&&Cm(Se,fe,he,Ze,!1),at!==null&&Lt!==null&&Cm(Se,Lt,at,Ze,!0)}}e:{if(fe=ue?Pa(ue):window,he=fe.nodeName&&fe.nodeName.toLowerCase(),he==="select"||he==="input"&&fe.type==="file")var qe=GA;else if(Oa(fe))if(PA)qe=mE;else{qe=hE;var ht=AE}else he=fe.nodeName,!he||he.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&O(ue.elementType)&&(qe=GA):qe=gE;if(qe&&(qe=qe(e,ue))){en(Se,qe,i,ve);break e}ht&&ht(e,fe,ue),e==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&gr(fe,"number",fe.value)}switch(ht=ue?Pa(ue):window,e){case"focusin":(Oa(ht)||ht.contentEditable==="true")&&(ds=ht,jc=ue,rl=null);break;case"focusout":rl=jc=ds=null;break;case"mousedown":Oc=!0;break;case"contextmenu":case"mouseup":case"dragend":Oc=!1,WA(Se,i,ve);break;case"selectionchange":if(yE)break;case"keydown":case"keyup":WA(Se,i,ve)}var Xe;if(qr)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else et?ze(e,i)&&(tt="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(tt="onCompositionStart");tt&&(al&&i.locale!=="ko"&&(et||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&et&&(Xe=I()):(ra=ve,g="value"in ra?ra.value:ra.textContent,et=!0)),ht=ru(ue,tt),0<ht.length&&(tt=new el(tt,e,null,i,ve),Se.push({event:tt,listeners:ht}),Xe?tt.data=Xe:(Xe=$e(i),Xe!==null&&(tt.data=Xe)))),(Xe=yo?It(e,i):cn(e,i))&&(tt=ru(ue,"onBeforeInput"),0<tt.length&&(ht=new el("onBeforeInput","beforeinput",null,i,ve),Se.push({event:ht,listeners:tt}),ht.data=Xe)),eb(Se,e,ue,i,ve)}wm(Se,t)})}function Ll(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ru(e,t){for(var i=t+"Capture",l=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=un(e,i),f!=null&&l.unshift(Ll(e,f,m)),f=un(e,t),f!=null&&l.push(Ll(e,f,m))),e.tag===3)return l;e=e.return}return[]}function Us(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cm(e,t,i,l,f){for(var m=t._reactName,x=[];i!==null&&i!==l;){var M=i,z=M.alternate,ue=M.stateNode;if(M=M.tag,z!==null&&z===l)break;M!==5&&M!==26&&M!==27||ue===null||(z=ue,f?(ue=un(i,m),ue!=null&&x.unshift(Ll(i,ue,z))):f||(ue=un(i,m),ue!=null&&x.push(Ll(i,ue,z)))),i=i.return}x.length!==0&&e.push({event:t,listeners:x})}var rb=/\r\n?/g,ib=/\u0000|\uFFFD/g;function Im(e){return(typeof e=="string"?e:""+e).replace(rb,`
`).replace(ib,"")}function Bm(e,t){return t=Im(t),Im(e)===t}function iu(){}function Dt(e,t,i,l,f,m){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Cn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Cn(e,""+l);break;case"className":hr(e,"class",l);break;case"tabIndex":hr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":hr(e,i,l);break;case"style":L(e,l,m);break;case"data":if(t!=="object"){hr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Be(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(i==="formAction"?(t!=="input"&&Dt(e,t,"name",f.name,f,null),Dt(e,t,"formEncType",f.formEncType,f,null),Dt(e,t,"formMethod",f.formMethod,f,null),Dt(e,t,"formTarget",f.formTarget,f,null)):(Dt(e,t,"encType",f.encType,f,null),Dt(e,t,"method",f.method,f,null),Dt(e,t,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Be(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=iu);break;case"onScroll":l!=null&&yt("scroll",e);break;case"onScrollEnd":l!=null&&yt("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=Be(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":yt("beforetoggle",e),yt("toggle",e),vn(e,"popover",l);break;case"xlinkActuate":_a(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":_a(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":_a(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":_a(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":_a(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":_a(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":_a(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":_a(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":_a(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":vn(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=te.get(i)||i,vn(e,i,l))}}function uf(e,t,i,l,f,m){switch(i){case"style":L(e,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"children":typeof l=="string"?Cn(e,l):(typeof l=="number"||typeof l=="bigint")&&Cn(e,""+l);break;case"onScroll":l!=null&&yt("scroll",e);break;case"onScrollEnd":l!=null&&yt("scrollend",e);break;case"onClick":l!=null&&(e.onclick=iu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ar.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),m=e[fa]||null,m=m!=null?m[i]:null,typeof m=="function"&&e.removeEventListener(t,m,f),typeof l=="function")){typeof m!="function"&&m!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,f);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):vn(e,i,l)}}}function Qa(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":yt("error",e),yt("load",e);var l=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var x=i[m];if(x!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Dt(e,t,m,x,i,null)}}f&&Dt(e,t,"srcSet",i.srcSet,i,null),l&&Dt(e,t,"src",i.src,i,null);return;case"input":yt("invalid",e);var M=m=x=f=null,z=null,ue=null;for(l in i)if(i.hasOwnProperty(l)){var ve=i[l];if(ve!=null)switch(l){case"name":f=ve;break;case"type":x=ve;break;case"checked":z=ve;break;case"defaultChecked":ue=ve;break;case"value":m=ve;break;case"defaultValue":M=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(s(137,t));break;default:Dt(e,t,l,ve,i,null)}}Zn(e,m,M,z,ue,x,f,!1),On(e);return;case"select":yt("invalid",e),l=x=m=null;for(f in i)if(i.hasOwnProperty(f)&&(M=i[f],M!=null))switch(f){case"value":m=M;break;case"defaultValue":x=M;break;case"multiple":l=M;default:Dt(e,t,f,M,i,null)}t=m,i=x,e.multiple=!!l,t!=null?xn(e,!!l,t,!1):i!=null&&xn(e,!!l,i,!0);return;case"textarea":yt("invalid",e),m=f=l=null;for(x in i)if(i.hasOwnProperty(x)&&(M=i[x],M!=null))switch(x){case"value":l=M;break;case"defaultValue":f=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(91));break;default:Dt(e,t,x,M,i,null)}Di(e,l,f,m),On(e);return;case"option":for(z in i)if(i.hasOwnProperty(z)&&(l=i[z],l!=null))switch(z){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Dt(e,t,z,l,i,null)}return;case"dialog":yt("beforetoggle",e),yt("toggle",e),yt("cancel",e),yt("close",e);break;case"iframe":case"object":yt("load",e);break;case"video":case"audio":for(l=0;l<Dl.length;l++)yt(Dl[l],e);break;case"image":yt("error",e),yt("load",e);break;case"details":yt("toggle",e);break;case"embed":case"source":case"link":yt("error",e),yt("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(ue in i)if(i.hasOwnProperty(ue)&&(l=i[ue],l!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Dt(e,t,ue,l,i,null)}return;default:if(O(t)){for(ve in i)i.hasOwnProperty(ve)&&(l=i[ve],l!==void 0&&uf(e,t,ve,l,i,void 0));return}}for(M in i)i.hasOwnProperty(M)&&(l=i[M],l!=null&&Dt(e,t,M,l,i,null))}function sb(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,x=null,M=null,z=null,ue=null,ve=null;for(he in i){var Se=i[he];if(i.hasOwnProperty(he)&&Se!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":z=Se;default:l.hasOwnProperty(he)||Dt(e,t,he,null,l,Se)}}for(var fe in l){var he=l[fe];if(Se=i[fe],l.hasOwnProperty(fe)&&(he!=null||Se!=null))switch(fe){case"type":m=he;break;case"name":f=he;break;case"checked":ue=he;break;case"defaultChecked":ve=he;break;case"value":x=he;break;case"defaultValue":M=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(s(137,t));break;default:he!==Se&&Dt(e,t,fe,he,l,Se)}}Ti(e,x,M,z,ue,ve,m,f);return;case"select":he=x=M=fe=null;for(m in i)if(z=i[m],i.hasOwnProperty(m)&&z!=null)switch(m){case"value":break;case"multiple":he=z;default:l.hasOwnProperty(m)||Dt(e,t,m,null,l,z)}for(f in l)if(m=l[f],z=i[f],l.hasOwnProperty(f)&&(m!=null||z!=null))switch(f){case"value":fe=m;break;case"defaultValue":M=m;break;case"multiple":x=m;default:m!==z&&Dt(e,t,f,m,l,z)}t=M,i=x,l=he,fe!=null?xn(e,!!i,fe,!1):!!l!=!!i&&(t!=null?xn(e,!!i,t,!0):xn(e,!!i,i?[]:"",!1));return;case"textarea":he=fe=null;for(M in i)if(f=i[M],i.hasOwnProperty(M)&&f!=null&&!l.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Dt(e,t,M,null,l,f)}for(x in l)if(f=l[x],m=i[x],l.hasOwnProperty(x)&&(f!=null||m!=null))switch(x){case"value":fe=f;break;case"defaultValue":he=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==m&&Dt(e,t,x,f,l,m)}zr(e,fe,he);return;case"option":for(var at in i)if(fe=i[at],i.hasOwnProperty(at)&&fe!=null&&!l.hasOwnProperty(at))switch(at){case"selected":e.selected=!1;break;default:Dt(e,t,at,null,l,fe)}for(z in l)if(fe=l[z],he=i[z],l.hasOwnProperty(z)&&fe!==he&&(fe!=null||he!=null))switch(z){case"selected":e.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:Dt(e,t,z,fe,l,he)}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 Ze in i)fe=i[Ze],i.hasOwnProperty(Ze)&&fe!=null&&!l.hasOwnProperty(Ze)&&Dt(e,t,Ze,null,l,fe);for(ue in l)if(fe=l[ue],he=i[ue],l.hasOwnProperty(ue)&&fe!==he&&(fe!=null||he!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(s(137,t));break;default:Dt(e,t,ue,fe,l,he)}return;default:if(O(t)){for(var Lt in i)fe=i[Lt],i.hasOwnProperty(Lt)&&fe!==void 0&&!l.hasOwnProperty(Lt)&&uf(e,t,Lt,void 0,l,fe);for(ve in l)fe=l[ve],he=i[ve],!l.hasOwnProperty(ve)||fe===he||fe===void 0&&he===void 0||uf(e,t,ve,fe,l,he);return}}for(var ne in i)fe=i[ne],i.hasOwnProperty(ne)&&fe!=null&&!l.hasOwnProperty(ne)&&Dt(e,t,ne,null,l,fe);for(Se in l)fe=l[Se],he=i[Se],!l.hasOwnProperty(Se)||fe===he||fe==null&&he==null||Dt(e,t,Se,fe,l,he)}var cf=null,df=null;function su(e){return e.nodeType===9?e:e.ownerDocument}function Sm(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 Nm(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 ff(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 Af=null;function lb(){var e=window.event;return e&&e.type==="popstate"?e===Af?!1:(Af=e,!0):(Af=null,!1)}var km=typeof setTimeout=="function"?setTimeout:void 0,ob=typeof clearTimeout=="function"?clearTimeout:void 0,Tm=typeof Promise=="function"?Promise:void 0,ub=typeof queueMicrotask=="function"?queueMicrotask:typeof Tm<"u"?function(e){return Tm.resolve(null).then(e).catch(cb)}:km;function cb(e){setTimeout(function(){throw e})}function ui(e){return e==="head"}function Dm(e,t){var i=t,l=0,f=0;do{var m=i.nextSibling;if(e.removeChild(i),m&&m.nodeType===8)if(i=m.data,i==="/$"){if(0<l&&8>l){i=l;var x=e.ownerDocument;if(i&1&&Rl(x.documentElement),i&2&&Rl(x.body),i&4)for(i=x.head,Rl(i),x=i.firstChild;x;){var M=x.nextSibling,z=x.nodeName;x[bn]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&x.rel.toLowerCase()==="stylesheet"||i.removeChild(x),x=M}}if(f===0){e.removeChild(m),Vl(t);return}f--}else i==="$"||i==="$?"||i==="$!"?f++:l=i.charCodeAt(0)-48;else l=0;i=m}while(i);Vl(t)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":hf(i),aa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function db(e,t,i,l){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[bn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function fb(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Hn(e.nextSibling),e===null))return null;return e}function gf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Ab(e,t){var i=e.ownerDocument;if(e.data!=="$?"||i.readyState==="complete")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Hn(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var mf=null;function Lm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(t===0)return e;t--}else i==="/$"&&t++}e=e.previousSibling}return null}function Rm(e,t,i){switch(t=su(i),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Rl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);aa(e)}var Dn=new Map,Qm=new Set;function lu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tr=ae.d;ae.d={f:hb,r:gb,D:mb,C:pb,L:yb,m:Eb,X:vb,S:bb,M:wb};function hb(){var e=Tr.f(),t=Wo();return e||t}function gb(e){var t=$n(e);t!==null&&t.tag===5&&t.type==="form"?eg(t):Tr.r(e)}var Ms=typeof document>"u"?null:document;function Um(e,t,i){var l=Ms;if(l&&typeof t=="string"&&t){var f=Da(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),Qm.has(f)||(Qm.add(f),e={rel:e,crossOrigin:i,href:t},l.querySelector(f)===null&&(t=l.createElement("link"),Qa(t,"link",e),Ht(t),l.head.appendChild(t)))}}function mb(e){Tr.D(e),Um("dns-prefetch",e,null)}function pb(e,t){Tr.C(e,t),Um("preconnect",e,t)}function yb(e,t,i){Tr.L(e,t,i);var l=Ms;if(l&&e&&t){var f='link[rel="preload"][as="'+Da(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Da(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Da(i.imageSizes)+'"]')):f+='[href="'+Da(e)+'"]';var m=f;switch(t){case"style":m=_s(e);break;case"script":m=js(e)}Dn.has(m)||(e=E({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Dn.set(m,e),l.querySelector(f)!==null||t==="style"&&l.querySelector(Ql(m))||t==="script"&&l.querySelector(Ul(m))||(t=l.createElement("link"),Qa(t,"link",e),Ht(t),l.head.appendChild(t)))}}function Eb(e,t){Tr.m(e,t);var i=Ms;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Da(l)+'"][href="'+Da(e)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=js(e)}if(!Dn.has(m)&&(e=E({rel:"modulepreload",href:e},t),Dn.set(m,e),i.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ul(m)))return}l=i.createElement("link"),Qa(l,"link",e),Ht(l),i.head.appendChild(l)}}}function bb(e,t,i){Tr.S(e,t,i);var l=Ms;if(l&&e){var f=Mn(l).hoistableStyles,m=_s(e);t=t||"default";var x=f.get(m);if(!x){var M={loading:0,preload:null};if(x=l.querySelector(Ql(m)))M.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Dn.get(m))&&pf(e,i);var z=x=l.createElement("link");Ht(z),Qa(z,"link",e),z._p=new Promise(function(ue,ve){z.onload=ue,z.onerror=ve}),z.addEventListener("load",function(){M.loading|=1}),z.addEventListener("error",function(){M.loading|=2}),M.loading|=4,ou(x,t,l)}x={type:"stylesheet",instance:x,count:1,state:M},f.set(m,x)}}}function vb(e,t){Tr.X(e,t);var i=Ms;if(i&&e){var l=Mn(i).hoistableScripts,f=js(e),m=l.get(f);m||(m=i.querySelector(Ul(f)),m||(e=E({src:e,async:!0},t),(t=Dn.get(f))&&yf(e,t),m=i.createElement("script"),Ht(m),Qa(m,"link",e),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function wb(e,t){Tr.M(e,t);var i=Ms;if(i&&e){var l=Mn(i).hoistableScripts,f=js(e),m=l.get(f);m||(m=i.querySelector(Ul(f)),m||(e=E({src:e,async:!0,type:"module"},t),(t=Dn.get(f))&&yf(e,t),m=i.createElement("script"),Ht(m),Qa(m,"link",e),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function Mm(e,t,i,l){var f=(f=He.current)?lu(f):null;if(!f)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=_s(i.href),i=Mn(f).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=_s(i.href);var m=Mn(f).hoistableStyles,x=m.get(e);if(x||(f=f.ownerDocument||f,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,x),(m=f.querySelector(Ql(e)))&&!m._p&&(x.instance=m,x.state.loading=5),Dn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Dn.set(e,i),m||xb(f,e,i,x.state))),t&&l===null)throw Error(s(528,""));return x}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=js(i),i=Mn(f).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function _s(e){return'href="'+Da(e)+'"'}function Ql(e){return'link[rel="stylesheet"]['+e+"]"}function _m(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function xb(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Qa(t,"link",i),Ht(t),e.head.appendChild(t))}function js(e){return'[src="'+Da(e)+'"]'}function Ul(e){return"script[async]"+e}function jm(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Da(i.href)+'"]');if(l)return t.instance=l,Ht(l),l;var f=E({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ht(l),Qa(l,"style",f),ou(l,i.precedence,e),t.instance=l;case"stylesheet":f=_s(i.href);var m=e.querySelector(Ql(f));if(m)return t.state.loading|=4,t.instance=m,Ht(m),m;l=_m(i),(f=Dn.get(f))&&pf(l,f),m=(e.ownerDocument||e).createElement("link"),Ht(m);var x=m;return x._p=new Promise(function(M,z){x.onload=M,x.onerror=z}),Qa(m,"link",l),t.state.loading|=4,ou(m,i.precedence,e),t.instance=m;case"script":return m=js(i.src),(f=e.querySelector(Ul(m)))?(t.instance=f,Ht(f),f):(l=i,(f=Dn.get(m))&&(l=E({},i),yf(l,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ht(f),Qa(f,"link",l),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ou(l,i.precedence,e));return t.instance}function ou(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,x=0;x<l.length;x++){var M=l[x];if(M.dataset.precedence===t)m=M;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function pf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var uu=null;function Om(e,t,i){if(uu===null){var l=new Map,f=uu=new Map;f.set(i,l)}else f=uu,l=f.get(i),l||(l=new Map,f.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var m=i[f];if(!(m[bn]||m[_t]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(t)||"";x=e+x;var M=l.get(x);M?M.push(m):l.set(x,[m])}}return l}function Fm(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Cb(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 Vm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Ml=null;function Ib(){}function Bb(e,t,i){if(Ml===null)throw Error(s(475));var l=Ml;if(t.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var f=_s(i.href),m=e.querySelector(Ql(f));if(m){e=m._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=cu.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=m,Ht(m);return}m=e.ownerDocument||e,i=_m(i),(f=Dn.get(f))&&pf(i,f),m=m.createElement("link"),Ht(m);var x=m;x._p=new Promise(function(M,z){x.onload=M,x.onerror=z}),Qa(m,"link",i),t.instance=m}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=cu.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function Sb(){if(Ml===null)throw Error(s(475));var e=Ml;return e.stylesheets&&e.count===0&&Ef(e,e.stylesheets),0<e.count?function(t){var i=setTimeout(function(){if(e.stylesheets&&Ef(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(i)}}:null}function cu(){if(this.count--,this.count===0){if(this.stylesheets)Ef(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var du=null;function Ef(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,du=new Map,t.forEach(Nb,e),du=null,cu.call(e))}function Nb(e,t){if(!(t.state.loading&4)){var i=du.get(e);if(i)var l=i.get(null);else{i=new Map,du.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var x=f[m];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),l=x)}l&&i.set(null,l)}f=t.instance,x=f.getAttribute("data-precedence"),m=i.get(x)||l,m===l&&i.set(null,f),i.set(x,f),this.count++,l=cu.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var _l={$$typeof:j,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function kb(e,t,i,l,f,m,x,M){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=jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jr(0),this.hiddenUpdates=jr(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Hm(e,t,i,l,f,m,x,M,z,ue,ve,Se){return e=new kb(e,t,i,x,M,z,ue,Se),t=1,m===!0&&(t|=24),m=An(3,null,null,t),e.current=m,m.stateNode=e,t=Zc(),t.refCount++,e.pooledCache=t,t.refCount++,m.memoizedState={element:l,isDehydrated:i,cache:t},nd(m),e}function Gm(e){return e?(e=gs,e):gs}function Pm(e,t,i,l,f,m){f=Gm(f),l.context===null?l.context=f:l.pendingContext=f,l=Xr(t),l.payload={element:i},m=m===void 0?null:m,m!==null&&(l.callback=m),i=$r(e,l,t),i!==null&&(yn(i,e,t),Al(i,e,t))}function zm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function bf(e,t){zm(e,t),(e=e.alternate)&&zm(e,t)}function qm(e){if(e.tag===13){var t=hs(e,67108864);t!==null&&yn(t,e,67108864),bf(e,67108864)}}var fu=!0;function Tb(e,t,i,l){var f=Y.T;Y.T=null;var m=ae.p;try{ae.p=2,vf(e,t,i,l)}finally{ae.p=m,Y.T=f}}function Db(e,t,i,l){var f=Y.T;Y.T=null;var m=ae.p;try{ae.p=8,vf(e,t,i,l)}finally{ae.p=m,Y.T=f}}function vf(e,t,i,l){if(fu){var f=wf(l);if(f===null)of(e,t,l,Au,i),Km(e,l);else if(Rb(f,e,t,i,l))l.stopPropagation();else if(Km(e,l),t&4&&-1<Lb.indexOf(e)){for(;f!==null;){var m=$n(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=mt(m.pendingLanes);if(x!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var z=1<<31-w(x);M.entanglements[1]|=z,x&=~z}rr(m),(St&6)===0&&(Xo=Oe()+500,Tl(0))}}break;case 13:M=hs(m,2),M!==null&&yn(M,m,2),Wo(),bf(m,2)}if(m=wf(l),m===null&&of(e,t,l,Au,i),m===f)break;f=m}f!==null&&l.stopPropagation()}else of(e,t,l,null,i)}}function wf(e){return e=Fe(e),xf(e)}var Au=null;function xf(e){if(Au=null,e=Un(e),e!==null){var t=u(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=c(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Au=e,null}function Ym(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nt()){case lt:return 2;case F:return 8;case J:case ie:return 32;case ke:return 268435456;default:return 32}default:return 32}}var Cf=!1,ci=null,di=null,fi=null,jl=new Map,Ol=new Map,Ai=[],Lb="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 Km(e,t){switch(e){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":jl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Fl(e,t,i,l,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},t!==null&&(t=$n(t),t!==null&&qm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function Rb(e,t,i,l,f){switch(t){case"focusin":return ci=Fl(ci,e,t,i,l,f),!0;case"dragenter":return di=Fl(di,e,t,i,l,f),!0;case"mouseover":return fi=Fl(fi,e,t,i,l,f),!0;case"pointerover":var m=f.pointerId;return jl.set(m,Fl(jl.get(m)||null,e,t,i,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Ol.set(m,Fl(Ol.get(m)||null,e,t,i,l,f)),!0}return!1}function Jm(e){var t=Un(e.target);if(t!==null){var i=u(t);if(i!==null){if(t=i.tag,t===13){if(t=c(i),t!==null){e.blockedOn=t,Bi(e.priority,function(){if(i.tag===13){var l=pn();l=Ii(l);var f=hs(i,l);f!==null&&yn(f,i,l),bf(i,l)}});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=wf(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Ue=l,i.target.dispatchEvent(l),Ue=null}else return t=$n(i),t!==null&&qm(t),e.blockedOn=i,!1;t.shift()}return!0}function Xm(e,t,i){hu(e)&&i.delete(t)}function Qb(){Cf=!1,ci!==null&&hu(ci)&&(ci=null),di!==null&&hu(di)&&(di=null),fi!==null&&hu(fi)&&(fi=null),jl.forEach(Xm),Ol.forEach(Xm)}function gu(e,t){e.blockedOn===t&&(e.blockedOn=null,Cf||(Cf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Qb)))}var mu=null;function $m(e){mu!==e&&(mu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){mu===e&&(mu=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],f=e[t+2];if(typeof l!="function"){if(xf(l||i)===null)continue;break}var m=$n(i);m!==null&&(e.splice(t,3),t-=3,wd(m,{pending:!0,data:f,method:i.method,action:l},l,f))}}))}function Vl(e){function t(z){return gu(z,e)}ci!==null&&gu(ci,e),di!==null&&gu(di,e),fi!==null&&gu(fi,e),jl.forEach(t),Ol.forEach(t);for(var i=0;i<Ai.length;i++){var l=Ai[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ai.length&&(i=Ai[0],i.blockedOn===null);)Jm(i),i.blockedOn===null&&Ai.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var f=i[l],m=i[l+1],x=f[fa]||null;if(typeof m=="function")x||$m(i);else if(x){var M=null;if(m&&m.hasAttribute("formAction")){if(f=m,x=m[fa]||null)M=x.formAction;else if(xf(f)!==null)continue}else M=x.action;typeof M=="function"?i[l+1]=M:(i.splice(l,3),l-=3),$m(i)}}}function If(e){this._internalRoot=e}pu.prototype.render=If.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var i=t.current,l=pn();Pm(i,l,e,t,null,null)},pu.prototype.unmount=If.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pm(e.current,2,null,e,null,null),Wo(),t[Jt]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Or();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ai.length&&t!==0&&t<Ai[i].priority;i++);Ai.splice(i,0,e),i===0&&Jm(e)}};var Wm=a.version;if(Wm!=="19.1.0")throw Error(s(527,Wm,"19.1.0"));ae.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var Ub={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yu.isDisabled&&yu.supportsFiber)try{Ge=yu.inject(Ub),T=yu}catch{}}return Gl.createRoot=function(e,t){if(!o(e))throw Error(s(299));var i=!1,l="",f=hg,m=gg,x=mg,M=null;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(m=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(M=t.unstable_transitionCallbacks)),t=Hm(e,1,!1,null,null,i,l,f,m,x,M,null),e[Jt]=t.current,lf(e),new If(t)},Gl.hydrateRoot=function(e,t,i){if(!o(e))throw Error(s(299));var l=!1,f="",m=hg,x=gg,M=mg,z=null,ue=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(M=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(z=i.unstable_transitionCallbacks),i.formState!==void 0&&(ue=i.formState)),t=Hm(e,1,!0,t,i??null,l,f,m,x,M,z,ue),t.context=Gm(null),i=t.current,l=pn(),l=Ii(l),f=Xr(l),f.callback=null,$r(i,f,l),i=l,t.current.lanes=i,Jn(t,i),rr(t),e[Jt]=t.current,lf(e),new pu(t)},Gl.version="19.1.0",Gl}var o0;function Kb(){if(o0)return Sf.exports;o0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Sf.exports=Yb(),Sf.exports}var Jb=Kb();const Xb=Ci(Jb);var Q=vA();const En=Ci(Q),$b=(n,a,r,s)=>{var u,c,d,p;const o=[r,{code:a,...s||{}}];if((c=(u=n==null?void 0:n.services)==null?void 0:u.logger)!=null&&c.forward)return n.services.logger.forward(o,"warn","react-i18next::",!0);Wi(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(p=(d=n==null?void 0:n.services)==null?void 0:d.logger)!=null&&p.warn?n.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},u0={},iA=(n,a,r,s)=>{Wi(r)&&u0[r]||(Wi(r)&&(u0[r]=new Date),$b(n,a,r,s))},qp=(n,a)=>()=>{if(n.isInitialized)a();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),a()};n.on("initialized",r)}},sA=(n,a,r)=>{n.loadNamespaces(a,qp(n,r))},c0=(n,a,r,s)=>{if(Wi(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(a)>-1)return sA(n,r,s);r.forEach(o=>{n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),n.loadLanguages(a,qp(n,s))},Wb=(n,a,r={})=>!a.languages||!a.languages.length?(iA(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:r.lng,precheck:(s,o)=>{var u;if(((u=r.bindI18n)==null?void 0:u.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,n))return!1}}),Wi=n=>typeof n=="string",Zb=n=>typeof n=="object"&&n!==null,ev=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,tv={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},av=n=>tv[n],nv=n=>n.replace(ev,av);let lA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:nv};const rv=(n={})=>{lA={...lA,...n}},iv=()=>lA;let Yp;const sv=n=>{Yp=n},lv=()=>Yp,ov={type:"3rdParty",init(n){rv(n.options.react),sv(n)}},uv=Q.createContext();class cv{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const dv=(n,a)=>{const r=Q.useRef();return Q.useEffect(()=>{r.current=n},[n,a]),r.current},Kp=(n,a,r,s)=>n.getFixedT(a,r,s),fv=(n,a,r,s)=>Q.useCallback(Kp(n,a,r,s),[n,a,r,s]),gt=(n,a={})=>{var P,V,de,ce;const{i18n:r}=a,{i18n:s,defaultNS:o}=Q.useContext(uv)||{},u=r||s||lv();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new cv),!u){iA(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const Z=(K,ee)=>Wi(ee)?ee:Zb(ee)&&Wi(ee.defaultValue)?ee.defaultValue:Array.isArray(K)?K[K.length-1]:K,X=[Z,{},!1];return X.t=Z,X.i18n={},X.ready=!1,X}(P=u.options.react)!=null&&P.wait&&iA(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...iv(),...u.options.react,...a},{useSuspense:d,keyPrefix:p}=c;let A=o||((V=u.options)==null?void 0:V.defaultNS);A=Wi(A)?[A]:A||["translation"],(ce=(de=u.reportNamespaces).addUsedNamespaces)==null||ce.call(de,A);const E=(u.isInitialized||u.initializedStoreOnce)&&A.every(Z=>Wb(Z,u,c)),v=fv(u,a.lng||null,c.nsMode==="fallback"?A:A[0],p),C=()=>v,S=()=>Kp(u,a.lng||null,c.nsMode==="fallback"?A:A[0],p),[k,D]=Q.useState(C);let R=A.join();a.lng&&(R=`${a.lng}${R}`);const N=dv(R),U=Q.useRef(!0);Q.useEffect(()=>{const{bindI18n:Z,bindI18nStore:X}=c;U.current=!0,!E&&!d&&(a.lng?c0(u,a.lng,A,()=>{U.current&&D(S)}):sA(u,A,()=>{U.current&&D(S)})),E&&N&&N!==R&&U.current&&D(S);const K=()=>{U.current&&D(S)};return Z&&(u==null||u.on(Z,K)),X&&(u==null||u.store.on(X,K)),()=>{U.current=!1,u&&(Z==null||Z.split(" ").forEach(ee=>u.off(ee,K))),X&&u&&X.split(" ").forEach(ee=>u.store.off(ee,K))}},[u,R]),Q.useEffect(()=>{U.current&&E&&D(C)},[u,p,E]);const j=[k,u,E];if(j.t=k,j.i18n=u,j.ready=E,E||!E&&!d)return j;throw new Promise(Z=>{a.lng?c0(u,a.lng,A,()=>Z()):sA(u,A,()=>Z())})};var Pl={},d0;function Av(){if(d0)return Pl;d0=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.parse=c,Pl.serialize=A;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,a=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,u=(()=>{const C=function(){};return C.prototype=Object.create(null),C})();function c(C,S){const k=new u,D=C.length;if(D<2)return k;const R=(S==null?void 0:S.decode)||E;let N=0;do{const U=C.indexOf("=",N);if(U===-1)break;const j=C.indexOf(";",N),P=j===-1?D:j;if(U>P){N=C.lastIndexOf(";",U-1)+1;continue}const V=d(C,N,U),de=p(C,U,V),ce=C.slice(V,de);if(k[ce]===void 0){let Z=d(C,U+1,P),X=p(C,P,Z);const K=R(C.slice(Z,X));k[ce]=K}N=P+1}while(N<D);return k}function d(C,S,k){do{const D=C.charCodeAt(S);if(D!==32&&D!==9)return S}while(++S<k);return k}function p(C,S,k){for(;S>k;){const D=C.charCodeAt(--S);if(D!==32&&D!==9)return S+1}return k}function A(C,S,k){const D=(k==null?void 0:k.encode)||encodeURIComponent;if(!n.test(C))throw new TypeError(`argument name is invalid: ${C}`);const R=D(S);if(!a.test(R))throw new TypeError(`argument val is invalid: ${S}`);let N=C+"="+R;if(!k)return N;if(k.maxAge!==void 0){if(!Number.isInteger(k.maxAge))throw new TypeError(`option maxAge is invalid: ${k.maxAge}`);N+="; Max-Age="+k.maxAge}if(k.domain){if(!r.test(k.domain))throw new TypeError(`option domain is invalid: ${k.domain}`);N+="; Domain="+k.domain}if(k.path){if(!s.test(k.path))throw new TypeError(`option path is invalid: ${k.path}`);N+="; Path="+k.path}if(k.expires){if(!v(k.expires)||!Number.isFinite(k.expires.valueOf()))throw new TypeError(`option expires is invalid: ${k.expires}`);N+="; Expires="+k.expires.toUTCString()}if(k.httpOnly&&(N+="; HttpOnly"),k.secure&&(N+="; Secure"),k.partitioned&&(N+="; Partitioned"),k.priority)switch(typeof k.priority=="string"?k.priority.toLowerCase():void 0){case"low":N+="; Priority=Low";break;case"medium":N+="; Priority=Medium";break;case"high":N+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${k.priority}`)}if(k.sameSite)switch(typeof k.sameSite=="string"?k.sameSite.toLowerCase():k.sameSite){case!0:case"strict":N+="; SameSite=Strict";break;case"lax":N+="; SameSite=Lax";break;case"none":N+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${k.sameSite}`)}return N}function E(C){if(C.indexOf("%")===-1)return C;try{return decodeURIComponent(C)}catch{return C}}function v(C){return o.call(C)==="[object Date]"}return Pl}Av();var f0="popstate";function hv(n={}){function a(o,u){let{pathname:c="/",search:d="",hash:p=""}=ts(o.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),oA("",{pathname:c,search:d,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function r(o,u){let c=o.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let p=o.location.href,A=p.indexOf("#");d=A===-1?p:p.slice(0,A)}return d+"#"+(typeof u=="string"?u:so(u))}function s(o,u){Qn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return mv(a,r,s,n)}function Yt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Qn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function gv(){return Math.random().toString(36).substring(2,10)}function A0(n,a){return{usr:n.state,key:n.key,idx:a}}function oA(n,a,r=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?ts(a):a,state:r,key:a&&a.key||s||gv()}}function so({pathname:n="/",search:a="",hash:r=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function ts(n){let a={};if(n){let r=n.indexOf("#");r>=0&&(a.hash=n.substring(r),n=n.substring(0,r));let s=n.indexOf("?");s>=0&&(a.search=n.substring(s),n=n.substring(0,s)),n&&(a.pathname=n)}return a}function mv(n,a,r,s={}){let{window:o=document.defaultView,v5Compat:u=!1}=s,c=o.history,d="POP",p=null,A=E();A==null&&(A=0,c.replaceState({...c.state,idx:A},""));function E(){return(c.state||{idx:null}).idx}function v(){d="POP";let R=E(),N=R==null?null:R-A;A=R,p&&p({action:d,location:D.location,delta:N})}function C(R,N){d="PUSH";let U=oA(D.location,R,N);r&&r(U,R),A=E()+1;let j=A0(U,A),P=D.createHref(U);try{c.pushState(j,"",P)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;o.location.assign(P)}u&&p&&p({action:d,location:D.location,delta:1})}function S(R,N){d="REPLACE";let U=oA(D.location,R,N);r&&r(U,R),A=E();let j=A0(U,A),P=D.createHref(U);c.replaceState(j,"",P),u&&p&&p({action:d,location:D.location,delta:0})}function k(R){return pv(R)}let D={get action(){return d},get location(){return n(o,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(f0,v),p=R,()=>{o.removeEventListener(f0,v),p=null}},createHref(R){return a(o,R)},createURL:k,encodeLocation(R){let N=k(R);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:C,replace:S,go(R){return c.go(R)}};return D}function pv(n,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Yt(r,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:so(n);return s=s.replace(/ $/,"%20"),!a&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function Jp(n,a,r="/"){return yv(n,a,r,!1)}function yv(n,a,r,s){let o=typeof a=="string"?ts(a):a,u=_r(o.pathname||"/",r);if(u==null)return null;let c=Xp(n);Ev(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let A=Tv(u);d=Nv(c[p],A,s)}return d}function Xp(n,a=[],r=[],s=""){let o=(u,c,d)=>{let p={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};p.relativePath.startsWith("/")&&(Yt(p.relativePath.startsWith(s),`Absolute route path "${p.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(s.length));let A=Mr([s,p.relativePath]),E=r.concat(p);u.children&&u.children.length>0&&(Yt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${A}".`),Xp(u.children,a,E,A)),!(u.path==null&&!u.index)&&a.push({path:A,score:Bv(A,u.index),routesMeta:E})};return n.forEach((u,c)=>{var d;if(u.path===""||!((d=u.path)!=null&&d.includes("?")))o(u,c);else for(let p of $p(u.path))o(u,c,p)}),a}function $p(n){let a=n.split("/");if(a.length===0)return[];let[r,...s]=a,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(s.length===0)return o?[u,""]:[u];let c=$p(s.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),o&&d.push(...c),d.map(p=>n.startsWith("/")&&p===""?"/":p)}function Ev(n){n.sort((a,r)=>a.score!==r.score?r.score-a.score:Sv(a.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var bv=/^:[\w-]+$/,vv=3,wv=2,xv=1,Cv=10,Iv=-2,h0=n=>n==="*";function Bv(n,a){let r=n.split("/"),s=r.length;return r.some(h0)&&(s+=Iv),a&&(s+=wv),r.filter(o=>!h0(o)).reduce((o,u)=>o+(bv.test(u)?vv:u===""?xv:Cv),s)}function Sv(n,a){return n.length===a.length&&n.slice(0,-1).every((s,o)=>s===a[o])?n[n.length-1]-a[a.length-1]:0}function Nv(n,a,r=!1){let{routesMeta:s}=n,o={},u="/",c=[];for(let d=0;d<s.length;++d){let p=s[d],A=d===s.length-1,E=u==="/"?a:a.slice(u.length)||"/",v=Ou({path:p.relativePath,caseSensitive:p.caseSensitive,end:A},E),C=p.route;if(!v&&A&&r&&!s[s.length-1].route.index&&(v=Ou({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},E)),!v)return null;Object.assign(o,v.params),c.push({params:o,pathname:Mr([u,v.pathname]),pathnameBase:Qv(Mr([u,v.pathnameBase])),route:C}),v.pathnameBase!=="/"&&(u=Mr([u,v.pathnameBase]))}return c}function Ou(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=kv(n.path,n.caseSensitive,n.end),o=a.match(r);if(!o)return null;let u=o[0],c=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:s.reduce((A,{paramName:E,isOptional:v},C)=>{if(E==="*"){let k=d[C]||"";c=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const S=d[C];return v&&!S?A[E]=void 0:A[E]=(S||"").replace(/%2F/g,"/"),A},{}),pathname:u,pathnameBase:c,pattern:n}}function kv(n,a=!1,r=!0){Qn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(s.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(s.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,a?void 0:"i"),s]}function Tv(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Qn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function _r(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,s=n.charAt(r);return s&&s!=="/"?null:n.slice(r)||"/"}function Dv(n,a="/"){let{pathname:r,search:s="",hash:o=""}=typeof n=="string"?ts(n):n;return{pathname:r?r.startsWith("/")?r:Lv(r,a):a,search:Uv(s),hash:Mv(o)}}function Lv(n,a){let r=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Lf(n,a,r,s){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(s)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rv(n){return n.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function wA(n){let a=Rv(n);return a.map((r,s)=>s===a.length-1?r.pathname:r.pathnameBase)}function xA(n,a,r,s=!1){let o;typeof n=="string"?o=ts(n):(o={...n},Yt(!o.pathname||!o.pathname.includes("?"),Lf("?","pathname","search",o)),Yt(!o.pathname||!o.pathname.includes("#"),Lf("#","pathname","hash",o)),Yt(!o.search||!o.search.includes("#"),Lf("#","search","hash",o)));let u=n===""||o.pathname==="",c=u?"/":o.pathname,d;if(c==null)d=r;else{let v=a.length-1;if(!s&&c.startsWith("..")){let C=c.split("/");for(;C[0]==="..";)C.shift(),v-=1;o.pathname=C.join("/")}d=v>=0?a[v]:"/"}let p=Dv(o,d),A=c&&c!=="/"&&c.endsWith("/"),E=(u||c===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(A||E)&&(p.pathname+="/"),p}var Mr=n=>n.join("/").replace(/\/\/+/g,"/"),Qv=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Uv=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Mv=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function _v(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var Wp=["POST","PUT","PATCH","DELETE"];new Set(Wp);var jv=["GET",...Wp];new Set(jv);var Js=Q.createContext(null);Js.displayName="DataRouter";var nc=Q.createContext(null);nc.displayName="DataRouterState";var Zp=Q.createContext({isTransitioning:!1});Zp.displayName="ViewTransition";var Ov=Q.createContext(new Map);Ov.displayName="Fetchers";var Fv=Q.createContext(null);Fv.displayName="Await";var zn=Q.createContext(null);zn.displayName="Navigation";var uo=Q.createContext(null);uo.displayName="Location";var qn=Q.createContext({outlet:null,matches:[],isDataRoute:!1});qn.displayName="Route";var CA=Q.createContext(null);CA.displayName="RouteError";function Vv(n,{relative:a}={}){Yt(Xs(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=Q.useContext(zn),{hash:o,pathname:u,search:c}=co(n,{relative:a}),d=u;return r!=="/"&&(d=u==="/"?r:Mr([r,u])),s.createHref({pathname:d,search:c,hash:o})}function Xs(){return Q.useContext(uo)!=null}function Yn(){return Yt(Xs(),"useLocation() may be used only in the context of a <Router> component."),Q.useContext(uo).location}var ey="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ty(n){Q.useContext(zn).static||Q.useLayoutEffect(n)}function Ua(){let{isDataRoute:n}=Q.useContext(qn);return n?ew():Hv()}function Hv(){Yt(Xs(),"useNavigate() may be used only in the context of a <Router> component.");let n=Q.useContext(Js),{basename:a,navigator:r}=Q.useContext(zn),{matches:s}=Q.useContext(qn),{pathname:o}=Yn(),u=JSON.stringify(wA(s)),c=Q.useRef(!1);return ty(()=>{c.current=!0}),Q.useCallback((p,A={})=>{if(Qn(c.current,ey),!c.current)return;if(typeof p=="number"){r.go(p);return}let E=xA(p,JSON.parse(u),o,A.relative==="path");n==null&&a!=="/"&&(E.pathname=E.pathname==="/"?a:Mr([a,E.pathname])),(A.replace?r.replace:r.push)(E,A.state,A)},[a,r,u,o,n])}Q.createContext(null);function IA(){let{matches:n}=Q.useContext(qn),a=n[n.length-1];return a?a.params:{}}function co(n,{relative:a}={}){let{matches:r}=Q.useContext(qn),{pathname:s}=Yn(),o=JSON.stringify(wA(r));return Q.useMemo(()=>xA(n,JSON.parse(o),s,a==="path"),[n,o,s,a])}function Gv(n,a){return ay(n,a)}function ay(n,a,r,s){var U;Yt(Xs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:u}=Q.useContext(zn),{matches:c}=Q.useContext(qn),d=c[c.length-1],p=d?d.params:{},A=d?d.pathname:"/",E=d?d.pathnameBase:"/",v=d&&d.route;{let j=v&&v.path||"";ny(A,!v||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${A}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let C=Yn(),S;if(a){let j=typeof a=="string"?ts(a):a;Yt(E==="/"||((U=j.pathname)==null?void 0:U.startsWith(E)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${j.pathname}" was given in the \`location\` prop.`),S=j}else S=C;let k=S.pathname||"/",D=k;if(E!=="/"){let j=E.replace(/^\//,"").split("/");D="/"+k.replace(/^\//,"").split("/").slice(j.length).join("/")}let R=!u&&r&&r.matches&&r.matches.length>0?r.matches:Jp(n,{pathname:D});Qn(v||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Qn(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=Kv(R&&R.map(j=>Object.assign({},j,{params:Object.assign({},p,j.params),pathname:Mr([E,o.encodeLocation?o.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?E:Mr([E,o.encodeLocation?o.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),c,r,s);return a&&N?Q.createElement(uo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},N):N}function Pv(){let n=Zv(),a=_v(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},u={padding:"2px 4px",backgroundColor:s},c=null;return console.error("Error handled by React Router default ErrorBoundary:",n),c=Q.createElement(Q.Fragment,null,Q.createElement("p",null,"💿 Hey developer 👋"),Q.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",Q.createElement("code",{style:u},"ErrorBoundary")," or"," ",Q.createElement("code",{style:u},"errorElement")," prop on your route.")),Q.createElement(Q.Fragment,null,Q.createElement("h2",null,"Unexpected Application Error!"),Q.createElement("h3",{style:{fontStyle:"italic"}},a),r?Q.createElement("pre",{style:o},r):null,c)}var zv=Q.createElement(Pv,null),qv=class extends Q.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?Q.createElement(qn.Provider,{value:this.props.routeContext},Q.createElement(CA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Yv({routeContext:n,match:a,children:r}){let s=Q.useContext(Js);return s&&s.static&&s.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=a.route.id),Q.createElement(qn.Provider,{value:n},r)}function Kv(n,a=[],r=null,s=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let o=n,u=r==null?void 0:r.errors;if(u!=null){let p=o.findIndex(A=>A.route.id&&(u==null?void 0:u[A.route.id])!==void 0);Yt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,p+1))}let c=!1,d=-1;if(r)for(let p=0;p<o.length;p++){let A=o[p];if((A.route.HydrateFallback||A.route.hydrateFallbackElement)&&(d=p),A.route.id){let{loaderData:E,errors:v}=r,C=A.route.loader&&!E.hasOwnProperty(A.route.id)&&(!v||v[A.route.id]===void 0);if(A.route.lazy||C){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((p,A,E)=>{let v,C=!1,S=null,k=null;r&&(v=u&&A.route.id?u[A.route.id]:void 0,S=A.route.errorElement||zv,c&&(d<0&&E===0?(ny("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,k=null):d===E&&(C=!0,k=A.route.hydrateFallbackElement||null)));let D=a.concat(o.slice(0,E+1)),R=()=>{let N;return v?N=S:C?N=k:A.route.Component?N=Q.createElement(A.route.Component,null):A.route.element?N=A.route.element:N=p,Q.createElement(Yv,{match:A,routeContext:{outlet:p,matches:D,isDataRoute:r!=null},children:N})};return r&&(A.route.ErrorBoundary||A.route.errorElement||E===0)?Q.createElement(qv,{location:r.location,revalidation:r.revalidation,component:S,error:v,children:R(),routeContext:{outlet:null,matches:D,isDataRoute:!0}}):R()},null)}function BA(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jv(n){let a=Q.useContext(Js);return Yt(a,BA(n)),a}function Xv(n){let a=Q.useContext(nc);return Yt(a,BA(n)),a}function $v(n){let a=Q.useContext(qn);return Yt(a,BA(n)),a}function SA(n){let a=$v(n),r=a.matches[a.matches.length-1];return Yt(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function Wv(){return SA("useRouteId")}function Zv(){var s;let n=Q.useContext(CA),a=Xv("useRouteError"),r=SA("useRouteError");return n!==void 0?n:(s=a.errors)==null?void 0:s[r]}function ew(){let{router:n}=Jv("useNavigate"),a=SA("useNavigate"),r=Q.useRef(!1);return ty(()=>{r.current=!0}),Q.useCallback(async(o,u={})=>{Qn(r.current,ey),r.current&&(typeof o=="number"?n.navigate(o):await n.navigate(o,{fromRouteId:a,...u}))},[n,a])}var g0={};function ny(n,a,r){!a&&!g0[n]&&(g0[n]=!0,Qn(!1,r))}Q.memo(tw);function tw({routes:n,future:a,state:r}){return ay(n,void 0,r,a)}function aw({to:n,replace:a,state:r,relative:s}){Yt(Xs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=Q.useContext(zn);Qn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=Q.useContext(qn),{pathname:c}=Yn(),d=Ua(),p=xA(n,wA(u),c,s==="path"),A=JSON.stringify(p);return Q.useEffect(()=>{d(JSON.parse(A),{replace:a,state:r,relative:s})},[d,A,s,a,r]),null}function ry(n){Yt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function nw({basename:n="/",children:a=null,location:r,navigationType:s="POP",navigator:o,static:u=!1}){Yt(!Xs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=n.replace(/^\/*/,"/"),d=Q.useMemo(()=>({basename:c,navigator:o,static:u,future:{}}),[c,o,u]);typeof r=="string"&&(r=ts(r));let{pathname:p="/",search:A="",hash:E="",state:v=null,key:C="default"}=r,S=Q.useMemo(()=>{let k=_r(p,c);return k==null?null:{location:{pathname:k,search:A,hash:E,state:v,key:C},navigationType:s}},[c,p,A,E,v,C,s]);return Qn(S!=null,`<Router basename="${c}"> is not able to match the URL "${p}${A}${E}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:Q.createElement(zn.Provider,{value:d},Q.createElement(uo.Provider,{children:a,value:S}))}function rw({children:n,location:a}){return Gv(uA(n),a)}function uA(n,a=[]){let r=[];return Q.Children.forEach(n,(s,o)=>{if(!Q.isValidElement(s))return;let u=[...a,o];if(s.type===Q.Fragment){r.push.apply(r,uA(s.props.children,u));return}Yt(s.type===ry,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Yt(!s.props.index||!s.props.children,"An index route cannot have child routes.");let c={id:s.props.id||u.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=uA(s.props.children,u)),r.push(c)}),r}var ku="get",Tu="application/x-www-form-urlencoded";function rc(n){return n!=null&&typeof n.tagName=="string"}function iw(n){return rc(n)&&n.tagName.toLowerCase()==="button"}function sw(n){return rc(n)&&n.tagName.toLowerCase()==="form"}function lw(n){return rc(n)&&n.tagName.toLowerCase()==="input"}function ow(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function uw(n,a){return n.button===0&&(!a||a==="_self")&&!ow(n)}var Eu=null;function cw(){if(Eu===null)try{new FormData(document.createElement("form"),0),Eu=!1}catch{Eu=!0}return Eu}var dw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rf(n){return n!=null&&!dw.has(n)?(Qn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Tu}"`),null):n}function fw(n,a){let r,s,o,u,c;if(sw(n)){let d=n.getAttribute("action");s=d?_r(d,a):null,r=n.getAttribute("method")||ku,o=Rf(n.getAttribute("enctype"))||Tu,u=new FormData(n)}else if(iw(n)||lw(n)&&(n.type==="submit"||n.type==="image")){let d=n.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||d.getAttribute("action");if(s=p?_r(p,a):null,r=n.getAttribute("formmethod")||d.getAttribute("method")||ku,o=Rf(n.getAttribute("formenctype"))||Rf(d.getAttribute("enctype"))||Tu,u=new FormData(d,n),!cw()){let{name:A,type:E,value:v}=n;if(E==="image"){let C=A?`${A}.`:"";u.append(`${C}x`,"0"),u.append(`${C}y`,"0")}else A&&u.append(A,v)}}else{if(rc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ku,s=null,o=Tu,c=n}return u&&o==="text/plain"&&(c=u,u=void 0),{action:s,method:r.toLowerCase(),encType:o,formData:u,body:c}}function NA(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}async function Aw(n,a){if(n.id in a)return a[n.id];try{let r=await import(n.module);return a[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function gw(n,a,r){let s=await Promise.all(n.map(async o=>{let u=a.routes[o.route.id];if(u){let c=await Aw(u,r);return c.links?c.links():[]}return[]}));return Ew(s.flat(1).filter(hw).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function m0(n,a,r,s,o,u){let c=(p,A)=>r[A]?p.route.id!==r[A].route.id:!0,d=(p,A)=>{var E;return r[A].pathname!==p.pathname||((E=r[A].route.path)==null?void 0:E.endsWith("*"))&&r[A].params["*"]!==p.params["*"]};return u==="assets"?a.filter((p,A)=>c(p,A)||d(p,A)):u==="data"?a.filter((p,A)=>{var v;let E=s.routes[p.route.id];if(!E||!E.hasLoader)return!1;if(c(p,A)||d(p,A))return!0;if(p.route.shouldRevalidate){let C=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=r[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function mw(n,a,{includeHydrateFallback:r}={}){return pw(n.map(s=>{let o=a.routes[s.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function pw(n){return[...new Set(n)]}function yw(n){let a={},r=Object.keys(n).sort();for(let s of r)a[s]=n[s];return a}function Ew(n,a){let r=new Set;return new Set(a),n.reduce((s,o)=>{let u=JSON.stringify(yw(o));return r.has(u)||(r.add(u),s.push({key:u,link:o})),s},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var bw=new Set([100,101,204,205]);function vw(n,a){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r.pathname==="/"?r.pathname="_root.data":a&&_r(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function iy(){let n=Q.useContext(Js);return NA(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function ww(){let n=Q.useContext(nc);return NA(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var kA=Q.createContext(void 0);kA.displayName="FrameworkContext";function sy(){let n=Q.useContext(kA);return NA(n,"You must render this element inside a <HydratedRouter> element"),n}function xw(n,a){let r=Q.useContext(kA),[s,o]=Q.useState(!1),[u,c]=Q.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:A,onMouseLeave:E,onTouchStart:v}=a,C=Q.useRef(null);Q.useEffect(()=>{if(n==="render"&&c(!0),n==="viewport"){let D=N=>{N.forEach(U=>{c(U.isIntersecting)})},R=new IntersectionObserver(D,{threshold:.5});return C.current&&R.observe(C.current),()=>{R.disconnect()}}},[n]),Q.useEffect(()=>{if(s){let D=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(D)}}},[s]);let S=()=>{o(!0)},k=()=>{o(!1),c(!1)};return r?n!=="intent"?[u,C,{}]:[u,C,{onFocus:zl(d,S),onBlur:zl(p,k),onMouseEnter:zl(A,S),onMouseLeave:zl(E,k),onTouchStart:zl(v,S)}]:[!1,C,{}]}function zl(n,a){return r=>{n&&n(r),r.defaultPrevented||a(r)}}function Cw({page:n,...a}){let{router:r}=iy(),s=Q.useMemo(()=>Jp(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?Q.createElement(Bw,{page:n,matches:s,...a}):null}function Iw(n){let{manifest:a,routeModules:r}=sy(),[s,o]=Q.useState([]);return Q.useEffect(()=>{let u=!1;return gw(n,a,r).then(c=>{u||o(c)}),()=>{u=!0}},[n,a,r]),s}function Bw({page:n,matches:a,...r}){let s=Yn(),{manifest:o,routeModules:u}=sy(),{basename:c}=iy(),{loaderData:d,matches:p}=ww(),A=Q.useMemo(()=>m0(n,a,p,o,s,"data"),[n,a,p,o,s]),E=Q.useMemo(()=>m0(n,a,p,o,s,"assets"),[n,a,p,o,s]),v=Q.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let k=new Set,D=!1;if(a.forEach(N=>{var j;let U=o.routes[N.route.id];!U||!U.hasLoader||(!A.some(P=>P.route.id===N.route.id)&&N.route.id in d&&((j=u[N.route.id])!=null&&j.shouldRevalidate)||U.hasClientLoader?D=!0:k.add(N.route.id))}),k.size===0)return[];let R=vw(n,c);return D&&k.size>0&&R.searchParams.set("_routes",a.filter(N=>k.has(N.route.id)).map(N=>N.route.id).join(",")),[R.pathname+R.search]},[c,d,s,o,A,a,n,u]),C=Q.useMemo(()=>mw(E,o),[E,o]),S=Iw(E);return Q.createElement(Q.Fragment,null,v.map(k=>Q.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...r})),C.map(k=>Q.createElement("link",{key:k,rel:"modulepreload",href:k,...r})),S.map(({key:k,link:D})=>Q.createElement("link",{key:k,...D})))}function Sw(...n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}var ly=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ly&&(window.__reactRouterVersion="7.6.0")}catch{}function Nw({basename:n,children:a,window:r}){let s=Q.useRef();s.current==null&&(s.current=hv({window:r,v5Compat:!0}));let o=s.current,[u,c]=Q.useState({action:o.action,location:o.location}),d=Q.useCallback(p=>{Q.startTransition(()=>c(p))},[c]);return Q.useLayoutEffect(()=>o.listen(d),[o,d]),Q.createElement(nw,{basename:n,children:a,location:u.location,navigationType:u.action,navigator:o})}var oy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ic=Q.forwardRef(function({onClick:a,discover:r="render",prefetch:s="none",relative:o,reloadDocument:u,replace:c,state:d,target:p,to:A,preventScrollReset:E,viewTransition:v,...C},S){let{basename:k}=Q.useContext(zn),D=typeof A=="string"&&oy.test(A),R,N=!1;if(typeof A=="string"&&D&&(R=A,ly))try{let X=new URL(window.location.href),K=A.startsWith("//")?new URL(X.protocol+A):new URL(A),ee=_r(K.pathname,k);K.origin===X.origin&&ee!=null?A=ee+K.search+K.hash:N=!0}catch{Qn(!1,`<Link to="${A}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let U=Vv(A,{relative:o}),[j,P,V]=xw(s,C),de=Lw(A,{replace:c,state:d,target:p,preventScrollReset:E,relative:o,viewTransition:v});function ce(X){a&&a(X),X.defaultPrevented||de(X)}let Z=Q.createElement("a",{...C,...V,href:R||U,onClick:N||u?a:ce,ref:Sw(S,P),target:p,"data-discover":!D&&r==="render"?"true":void 0});return j&&!D?Q.createElement(Q.Fragment,null,Z,Q.createElement(Cw,{page:U})):Z});ic.displayName="Link";var kw=Q.forwardRef(function({"aria-current":a="page",caseSensitive:r=!1,className:s="",end:o=!1,style:u,to:c,viewTransition:d,children:p,...A},E){let v=co(c,{relative:A.relative}),C=Yn(),S=Q.useContext(nc),{navigator:k,basename:D}=Q.useContext(zn),R=S!=null&&_w(v)&&d===!0,N=k.encodeLocation?k.encodeLocation(v).pathname:v.pathname,U=C.pathname,j=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;r||(U=U.toLowerCase(),j=j?j.toLowerCase():null,N=N.toLowerCase()),j&&D&&(j=_r(j,D)||j);const P=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let V=U===N||!o&&U.startsWith(N)&&U.charAt(P)==="/",de=j!=null&&(j===N||!o&&j.startsWith(N)&&j.charAt(N.length)==="/"),ce={isActive:V,isPending:de,isTransitioning:R},Z=V?a:void 0,X;typeof s=="function"?X=s(ce):X=[s,V?"active":null,de?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let K=typeof u=="function"?u(ce):u;return Q.createElement(ic,{...A,"aria-current":Z,className:X,ref:E,style:K,to:c,viewTransition:d},typeof p=="function"?p(ce):p)});kw.displayName="NavLink";var Tw=Q.forwardRef(({discover:n="render",fetcherKey:a,navigate:r,reloadDocument:s,replace:o,state:u,method:c=ku,action:d,onSubmit:p,relative:A,preventScrollReset:E,viewTransition:v,...C},S)=>{let k=Uw(),D=Mw(d,{relative:A}),R=c.toLowerCase()==="get"?"get":"post",N=typeof d=="string"&&oy.test(d),U=j=>{if(p&&p(j),j.defaultPrevented)return;j.preventDefault();let P=j.nativeEvent.submitter,V=(P==null?void 0:P.getAttribute("formmethod"))||c;k(P||j.currentTarget,{fetcherKey:a,method:V,navigate:r,replace:o,state:u,relative:A,preventScrollReset:E,viewTransition:v})};return Q.createElement("form",{ref:S,method:R,action:D,onSubmit:s?p:U,...C,"data-discover":!N&&n==="render"?"true":void 0})});Tw.displayName="Form";function Dw(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function uy(n){let a=Q.useContext(Js);return Yt(a,Dw(n)),a}function Lw(n,{target:a,replace:r,state:s,preventScrollReset:o,relative:u,viewTransition:c}={}){let d=Ua(),p=Yn(),A=co(n,{relative:u});return Q.useCallback(E=>{if(uw(E,a)){E.preventDefault();let v=r!==void 0?r:so(p)===so(A);d(n,{replace:v,state:s,preventScrollReset:o,relative:u,viewTransition:c})}},[p,d,A,r,s,a,n,o,u,c])}var Rw=0,Qw=()=>`__${String(++Rw)}__`;function Uw(){let{router:n}=uy("useSubmit"),{basename:a}=Q.useContext(zn),r=Wv();return Q.useCallback(async(s,o={})=>{let{action:u,method:c,encType:d,formData:p,body:A}=fw(s,a);if(o.navigate===!1){let E=o.fetcherKey||Qw();await n.fetch(E,r,o.action||u,{preventScrollReset:o.preventScrollReset,formData:p,body:A,formMethod:o.method||c,formEncType:o.encType||d,flushSync:o.flushSync})}else await n.navigate(o.action||u,{preventScrollReset:o.preventScrollReset,formData:p,body:A,formMethod:o.method||c,formEncType:o.encType||d,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,a,r])}function Mw(n,{relative:a}={}){let{basename:r}=Q.useContext(zn),s=Q.useContext(qn);Yt(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),u={...co(n||".",{relative:a})},c=Yn();if(n==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(E=>E==="")){d.delete("index"),p.filter(v=>v).forEach(v=>d.append("index",v));let E=d.toString();u.search=E?`?${E}`:""}}return(!n||n===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Mr([r,u.pathname])),so(u)}function _w(n,a={}){let r=Q.useContext(Zp);Yt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=uy("useViewTransitionState"),o=co(n,{relative:a.relative});if(!r.isTransitioning)return!1;let u=_r(r.currentLocation.pathname,s)||r.currentLocation.pathname,c=_r(r.nextLocation.pathname,s)||r.nextLocation.pathname;return Ou(o.pathname,c)!=null||Ou(o.pathname,u)!=null}[...bw];var bu={exports:{}},p0;function jw(){if(p0)return bu.exports;p0=1;const n=r=>typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>{const s=crypto.getRandomValues(new Uint8Array(1))[0];return(s>=r?s%r:s).toString(r)}:()=>Math.floor(Math.random()*r).toString(r),a=(r=7,s=!1)=>Array.from({length:r},n(s?16:36)).join("");return bu.exports=a,bu.exports.default=a,bu.exports}var Ow=jw();const Fu=Ci(Ow);var Fw=()=>`uid::${Fu(7)}`,Vw=(n,a=["endpointName","fingerprint"])=>typeof n=="object"&&n!==null&&a.every(r=>r in n),Hw=n=>{if(!Vw(n))throw new TypeError("Invalid connection args");return JSON.stringify(n)},Gw=()=>{let n=[];return{add:(...a)=>{n=[...n,...a]},remove:a=>{n=typeof a=="string"?n.filter(r=>r.message.transactionId!==a):n.filter(r=>!a.includes(r))},entries:()=>n}},Qf=class{static toBackground(n,a){return n.postMessage(a)}static toExtensionContext(n,a){return n.postMessage(a)}},Du={exports:{}},Pw=Du.exports,y0;function zw(){return y0||(y0=1,function(n,a){(function(r,s){s(n)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Pw,function(r){if(typeof globalThis!="object"||typeof chrome!="object"||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){const s="The message port closed before a response was received.",o="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",u=c=>{const d={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(d).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class p extends WeakMap{constructor(X,K=void 0){super(K),this.createItem=X}get(X){return this.has(X)||this.set(X,this.createItem(X)),super.get(X)}}const A=Z=>Z&&typeof Z=="object"&&typeof Z.then=="function",E=(Z,X)=>(...K)=>{c.runtime.lastError?Z.reject(new Error(c.runtime.lastError.message)):X.singleCallbackArg||K.length<=1&&X.singleCallbackArg!==!1?Z.resolve(K[0]):Z.resolve(K)},v=Z=>Z==1?"argument":"arguments",C=(Z,X)=>function(ee,...pe){if(pe.length<X.minArgs)throw new Error(`Expected at least ${X.minArgs} ${v(X.minArgs)} for ${Z}(), got ${pe.length}`);if(pe.length>X.maxArgs)throw new Error(`Expected at most ${X.maxArgs} ${v(X.maxArgs)} for ${Z}(), got ${pe.length}`);return new Promise((ge,Ne)=>{if(X.fallbackToNoCallback)try{ee[Z](...pe,E({resolve:ge,reject:Ne},X))}catch(Ee){console.warn(`${Z} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,Ee),ee[Z](...pe),X.fallbackToNoCallback=!1,X.noCallback=!0,ge()}else X.noCallback?(ee[Z](...pe),ge()):ee[Z](...pe,E({resolve:ge,reject:Ne},X))})},S=(Z,X,K)=>new Proxy(X,{apply(ee,pe,ge){return K.call(pe,Z,...ge)}});let k=Function.call.bind(Object.prototype.hasOwnProperty);const D=(Z,X={},K={})=>{let ee=Object.create(null),pe={has(Ne,Ee){return Ee in Z||Ee in ee},get(Ne,Ee,Y){if(Ee in ee)return ee[Ee];if(!(Ee in Z))return;let ae=Z[Ee];if(typeof ae=="function")if(typeof X[Ee]=="function")ae=S(Z,Z[Ee],X[Ee]);else if(k(K,Ee)){let xe=C(Ee,K[Ee]);ae=S(Z,Z[Ee],xe)}else ae=ae.bind(Z);else if(typeof ae=="object"&&ae!==null&&(k(X,Ee)||k(K,Ee)))ae=D(ae,X[Ee],K[Ee]);else if(k(K,"*"))ae=D(ae,X[Ee],K["*"]);else return Object.defineProperty(ee,Ee,{configurable:!0,enumerable:!0,get(){return Z[Ee]},set(xe){Z[Ee]=xe}}),ae;return ee[Ee]=ae,ae},set(Ne,Ee,Y,ae){return Ee in ee?ee[Ee]=Y:Z[Ee]=Y,!0},defineProperty(Ne,Ee,Y){return Reflect.defineProperty(ee,Ee,Y)},deleteProperty(Ne,Ee){return Reflect.deleteProperty(ee,Ee)}},ge=Object.create(Z);return new Proxy(ge,pe)},R=Z=>({addListener(X,K,...ee){X.addListener(Z.get(K),...ee)},hasListener(X,K){return X.hasListener(Z.get(K))},removeListener(X,K){X.removeListener(Z.get(K))}}),N=new p(Z=>typeof Z!="function"?Z:function(K){const ee=D(K,{},{getContent:{minArgs:0,maxArgs:0}});Z(ee)});let U=!1;const j=new p(Z=>typeof Z!="function"?Z:function(K,ee,pe){let ge=!1,Ne,Ee=new Promise(Me=>{Ne=function(G){U||(console.warn(o,new Error().stack),U=!0),ge=!0,Me(G)}}),Y;try{Y=Z(K,ee,Ne)}catch(Me){Y=Promise.reject(Me)}const ae=Y!==!0&&A(Y);if(Y!==!0&&!ae&&!ge)return!1;const xe=Me=>{Me.then(G=>{pe(G)},G=>{let re;G&&(G instanceof Error||typeof G.message=="string")?re=G.message:re="An unexpected error occurred",pe({__mozWebExtensionPolyfillReject__:!0,message:re})}).catch(G=>{console.error("Failed to send onMessage rejected reply",G)})};return xe(ae?Y:Ee),!0}),P=({reject:Z,resolve:X},K)=>{c.runtime.lastError?c.runtime.lastError.message===s?X():Z(new Error(c.runtime.lastError.message)):K&&K.__mozWebExtensionPolyfillReject__?Z(new Error(K.message)):X(K)},V=(Z,X,K,...ee)=>{if(ee.length<X.minArgs)throw new Error(`Expected at least ${X.minArgs} ${v(X.minArgs)} for ${Z}(), got ${ee.length}`);if(ee.length>X.maxArgs)throw new Error(`Expected at most ${X.maxArgs} ${v(X.maxArgs)} for ${Z}(), got ${ee.length}`);return new Promise((pe,ge)=>{const Ne=P.bind(null,{resolve:pe,reject:ge});ee.push(Ne),K.sendMessage(...ee)})},de={devtools:{network:{onRequestFinished:R(N)}},runtime:{onMessage:R(j),onMessageExternal:R(j),sendMessage:V.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:V.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},ce={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return d.privacy={network:{"*":ce},services:{"*":ce},websites:{"*":ce}},D(c,de,d)};r.exports=u(chrome)}else r.exports=globalThis.browser})}(Du)),Du.exports}var qw=zw();const Yw=Ci(qw);var Kw=(n="")=>{const a=Fw();let r,s=[];const o=Gw(),u=new Set,c=new Set,d=(A,E)=>{switch(A.status){case"undeliverable":s.some(v=>v.message.messageID===A.message.messageID)||(s=[...s,{message:A.message,resolvedDestination:A.resolvedDestination}]);return;case"deliverable":s=s.reduce((v,C)=>C.resolvedDestination===A.deliverableTo?(Qf.toBackground(E,{type:"deliver",message:C.message}),v):[...v,C],[]);return;case"delivered":A.receipt.message.messageType==="message"&&o.add(A.receipt);return;case"incoming":A.message.messageType==="reply"&&o.remove(A.message.messageID),u.forEach(v=>v(A.message,E));return;case"terminated":{const v=o.entries().filter(C=>A.fingerprint===C.to);o.remove(v),v.forEach(({message:C})=>c.forEach(S=>S(C)))}}},p=()=>{r=Yw.runtime.connect({name:Hw({endpointName:n,fingerprint:a})}),r.onMessage.addListener(d),r.onDisconnect.addListener(p),Qf.toBackground(r,{type:"sync",pendingResponses:o.entries(),pendingDeliveries:[...new Set(s.map(({resolvedDestination:A})=>A))]})};return p(),{onFailure(A){c.add(A)},onMessage(A){u.add(A)},postMessage(A){Qf.toBackground(r,{type:"deliver",message:A})}}},Jw=Object.defineProperty,Xw=Object.defineProperties,$w=Object.getOwnPropertyDescriptors,E0=Object.getOwnPropertySymbols,Ww=Object.prototype.hasOwnProperty,Zw=Object.prototype.propertyIsEnumerable,b0=(n,a,r)=>a in n?Jw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[a]=r,cy=(n,a)=>{for(var r in a||(a={}))Ww.call(a,r)&&b0(n,r,a[r]);if(E0)for(var r of E0(a))Zw.call(a,r)&&b0(n,r,a[r]);return n},dy=(n,a)=>Xw(n,$w(a)),ex=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,fy=n=>{const[,a,r,s]=n.match(ex)||[];return{context:a,tabId:+r,frameId:s?+s:void 0}};const tx=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],cA=Symbol(".toJSON was called"),ax=n=>{n[cA]=!0;const a=n.toJSON();return delete n[cA],a},Ay=({from:n,seen:a,to_:r,forceEnumerable:s,maxDepth:o,depth:u})=>{const c=r||(Array.isArray(n)?[]:{});if(a.push(n),u>=o)return c;if(typeof n.toJSON=="function"&&n[cA]!==!0)return ax(n);for(const[d,p]of Object.entries(n)){if(typeof Buffer=="function"&&Buffer.isBuffer(p)){c[d]="[object Buffer]";continue}if(p!==null&&typeof p=="object"&&typeof p.pipe=="function"){c[d]="[object Stream]";continue}if(typeof p!="function"){if(!p||typeof p!="object"){c[d]=p;continue}if(!a.includes(n[d])){u++,c[d]=Ay({from:n[d],seen:[...a],forceEnumerable:s,maxDepth:o,depth:u});continue}c[d]="[Circular]"}}for(const{property:d,enumerable:p}of tx)typeof n[d]=="string"&&Object.defineProperty(c,d,{value:n[d],enumerable:!0,configurable:!0,writable:!0});return c};function nx(n,a={}){const{maxDepth:r=Number.POSITIVE_INFINITY}=a;return typeof n=="object"&&n!==null?Ay({from:n,seen:[],forceEnumerable:!0,maxDepth:r,depth:0}):typeof n=="function"?`[Function: ${n.name||"anonymous"}]`:n}let hy=()=>({events:{},emit(n,...a){(this.events[n]||[]).forEach(r=>r(...a))},on(n,a){return(this.events[n]=this.events[n]||[]).push(a),()=>this.events[n]=(this.events[n]||[]).filter(r=>r!==a)}});var rx=(n,a,r)=>{const s=Fu(),o=new Map,u=new Map,c=d=>{if(d.destination.context===n&&!d.destination.frameId&&!d.destination.tabId){const{transactionId:p,messageID:A,messageType:E}=d,v=()=>{const S=o.get(p);if(S){const{err:k,data:D}=d;if(k){const R=k,N=self[R.name],U=new(typeof N=="function"?N:Error)(R.message);for(const j in R)U[j]=R[j];S.reject(U)}else S.resolve(D);o.delete(p)}},C=async()=>{let S,k,D=!1;try{const R=u.get(A);if(typeof R=="function")S=await R({sender:d.origin,id:A,data:d.data,timestamp:d.timestamp});else throw D=!0,new Error(`[webext-bridge] No handler registered in '${n}' to accept messages with id '${A}'`)}catch(R){k=R}finally{if(k&&(d.err=nx(k)),c(dy(cy({},d),{messageType:"reply",data:S,origin:{context:n,tabId:null},destination:d.origin,hops:[]})),k&&!D)throw S}};switch(E){case"reply":return v();case"message":return C()}}return d.hops.push(`${n}::${s}`),a(d)};return{handleMessage:c,endTransaction:d=>{const p=o.get(d);p==null||p.reject("Transaction was ended before it could complete"),o.delete(d)},sendMessage:(d,p,A="background")=>{const E=typeof A=="string"?fy(A):A,v="Bridge#sendMessage ->";if(!E.context)throw new TypeError(`${v} Destination must be any one of known destinations`);return new Promise((C,S)=>{const k={messageID:d,data:p,destination:E,messageType:"message",transactionId:Fu(),origin:{context:n,tabId:null},hops:[],timestamp:Date.now()};o.set(k.transactionId,{resolve:C,reject:S});try{c(k)}catch(D){o.delete(k.transactionId),S(D)}})},onMessage:(d,p)=>(u.set(d,p),()=>u.delete(d))}},Gs=class{constructor(n,a){this.endpointRuntime=n,this.streamInfo=a,this.emitter=hy(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},Gs.initDone||(n.onMessage("__crx_bridge_stream_transfer__",r=>{const{streamId:s,streamTransfer:o,action:u}=r.data,c=Gs.openStreams.get(s);c&&!c.isClosed&&(u==="transfer"&&c.emitter.emit("message",o),u==="close"&&(Gs.openStreams.delete(s),c.handleStreamClose()))}),Gs.initDone=!0),Gs.openStreams.set(this.streamInfo.streamId,this)}get info(){return this.streamInfo}send(n){if(this.isClosed)throw new Error("Attempting to send a message over closed stream. Use stream.onClose(<callback>) to keep an eye on stream status");this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:n,action:"transfer"},this.streamInfo.endpoint)}close(n){n&&this.send(n),this.handleStreamClose(),this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:null,action:"close"},this.streamInfo.endpoint)}onMessage(n){return this.getDisposable("message",n)}onClose(n){return this.getDisposable("closed",n)}getDisposable(n,a){const r=this.emitter.on(n,a);return Object.assign(r,{dispose:r,close:r})}},Vu=Gs;Vu.initDone=!1;Vu.openStreams=new Map;var ix=n=>{const a=new Map,r=new Map,s=hy();n.onMessage("__crx_bridge_stream_open__",c=>new Promise(d=>{const{sender:p,data:A}=c,{channel:E}=A;let v=!1,C=()=>{};const S=()=>{const k=r.get(E);typeof k=="function"?(k(new Vu(n,dy(cy({},A),{endpoint:p}))),v&&C(),d(!0)):v||(v=!0,C=s.on("did-change-stream-callbacks",S))};S()}));async function o(c,d){if(a.has(c))throw new Error("webext-bridge: A Stream is already open at this channel");const p=typeof d=="string"?fy(d):d,A={streamId:Fu(),channel:c,endpoint:p},E=new Vu(n,A);return E.onClose(()=>a.delete(c)),await n.sendMessage("__crx_bridge_stream_open__",A,p),a.set(c,E),E}function u(c,d){if(r.has(c))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");r.set(c,d),s.emit("did-change-stream-callbacks")}return{openStream:o,onOpenStreamChannel:u}},gy=Kw("popup"),TA=rx("popup",n=>gy.postMessage(n));gy.onMessage(TA.handleMessage);var{sendMessage:ta,onMessage:Uf}=TA;ix(TA);const sx=()=>{const[n,a]=Q.useState(!1),r=Q.useRef(null),s=Q.useRef(0),o=(u,c)=>{setTimeout(()=>{if(r.current){const d=u/c*100;r.current.style.transition="none",r.current.style.width=`${d}%`,r.current.offsetHeight,requestAnimationFrame(()=>{r.current&&(r.current.style.transition=`width ${u}s linear`,r.current.style.width="0%")})}},10)};return Q.useEffect(()=>{ta("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(p=>{const A=p;A&&A.remaining>0&&(s.current=A.id,a(!0),o(A.remaining,A.total))}).catch(()=>{});const u=Uf("CLIPBOARD_COUNTDOWN",({data:p})=>{const{remaining:A,total:E,id:v}=p;a(A>0),v!==s.current&&A>0&&(s.current=v,o(A,E))}),c=Uf("CLIPBOARD_CLEARED",()=>{a(!1),s.current=0,r.current&&(r.current.style.transition="none",r.current.style.width="0%")}),d=Uf("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{a(!1),s.current=0,r.current&&(r.current.style.transition="none",r.current.style.width="0%")});return()=>{u(),c(),d()}},[]),n?h.jsx("div",{className:"fixed top-0 left-0 right-0 z-50 h-1 bg-gray-200 dark:bg-gray-700",children:h.jsx("div",{ref:r,className:"h-full bg-orange-500",style:{width:"100%",transition:"none"}})}):null},lx=()=>{const{t:n}=gt(),a=Ua(),r=Yn(),[s,o]=Q.useState("credentials");Q.useEffect(()=>{const E=r.pathname.substring(1),C=["credentials","emails","settings"].find(S=>E===S||E.startsWith(`${S}/`));C&&o(C)},[r]);const u=E=>{o(E),a(`/${E}`)};return["/login","/auth-settings","/unlock","/unlock-success","/upgrade"].includes(r.pathname)||new URLSearchParams(window.location.search).get("mode")==="inline_unlock"?null:h.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700",children:h.jsxs("div",{className:"flex justify-around items-center h-14",children:[h.jsxs("button",{onClick:()=>u("credentials"),className:`flex flex-col items-center justify-center w-1/3 h-full ${s==="credentials"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[h.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),h.jsx("span",{className:"text-xs mt-1",children:n("menu.credentials")})]}),h.jsxs("button",{onClick:()=>u("emails"),className:`flex flex-col items-center justify-center w-1/3 h-full ${s==="emails"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[h.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),h.jsx("span",{className:"text-xs mt-1",children:n("menu.emails")})]}),h.jsxs("button",{onClick:()=>u("settings"),className:`flex flex-col items-center justify-center w-1/3 h-full ${s==="settings"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[h.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),h.jsx("span",{className:"text-xs mt-1",children:n("menu.settings")})]})]})})};var v0=Object.prototype.hasOwnProperty;function dA(n,a){var r,s;if(n===a)return!0;if(n&&a&&(r=n.constructor)===a.constructor){if(r===Date)return n.getTime()===a.getTime();if(r===RegExp)return n.toString()===a.toString();if(r===Array){if((s=n.length)===a.length)for(;s--&&dA(n[s],a[s]););return s===-1}if(!r||typeof n=="object"){s=0;for(r in n)if(v0.call(n,r)&&++s&&!v0.call(a,r)||!(r in a)||!dA(n[r],a[r]))return!1;return Object.keys(a).length===s}}return n!==n&&a!==a}const ox=new Error("request for lock canceled");var ux=function(n,a,r,s){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function d(E){try{A(s.next(E))}catch(v){c(v)}}function p(E){try{A(s.throw(E))}catch(v){c(v)}}function A(E){E.done?u(E.value):o(E.value).then(d,p)}A((s=s.apply(n,a||[])).next())})};class cx{constructor(a,r=ox){this._value=a,this._cancelError=r,this._queue=[],this._weightedWaiters=[]}acquire(a=1,r=0){if(a<=0)throw new Error(`invalid weight ${a}: must be positive`);return new Promise((s,o)=>{const u={resolve:s,reject:o,weight:a,priority:r},c=my(this._queue,d=>r<=d.priority);c===-1&&a<=this._value?this._dispatchItem(u):this._queue.splice(c+1,0,u)})}runExclusive(a){return ux(this,arguments,void 0,function*(r,s=1,o=0){const[u,c]=yield this.acquire(s,o);try{return yield r(u)}finally{c()}})}waitForUnlock(a=1,r=0){if(a<=0)throw new Error(`invalid weight ${a}: must be positive`);return this._couldLockImmediately(a,r)?Promise.resolve():new Promise(s=>{this._weightedWaiters[a-1]||(this._weightedWaiters[a-1]=[]),dx(this._weightedWaiters[a-1],{resolve:s,priority:r})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(a){this._value=a,this._dispatchQueue()}release(a=1){if(a<=0)throw new Error(`invalid weight ${a}: must be positive`);this._value+=a,this._dispatchQueue()}cancel(){this._queue.forEach(a=>a.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(a){const r=this._value;this._value-=a.weight,a.resolve([r,this._newReleaser(a.weight)])}_newReleaser(a){let r=!1;return()=>{r||(r=!0,this.release(a))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let a=this._value;a>0;a--){const r=this._weightedWaiters[a-1];r&&(r.forEach(s=>s.resolve()),this._weightedWaiters[a-1]=[])}else{const a=this._queue[0].priority;for(let r=this._value;r>0;r--){const s=this._weightedWaiters[r-1];if(!s)continue;const o=s.findIndex(u=>u.priority<=a);(o===-1?s:s.splice(0,o)).forEach(u=>u.resolve())}}}_couldLockImmediately(a,r){return(this._queue.length===0||this._queue[0].priority<r)&&a<=this._value}}function dx(n,a){const r=my(n,s=>a.priority<=s.priority);n.splice(r+1,0,a)}function my(n,a){for(let r=n.length-1;r>=0;r--)if(a(n[r]))return r;return-1}var fx=function(n,a,r,s){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function d(E){try{A(s.next(E))}catch(v){c(v)}}function p(E){try{A(s.throw(E))}catch(v){c(v)}}function A(E){E.done?u(E.value):o(E.value).then(d,p)}A((s=s.apply(n,a||[])).next())})};class Ax{constructor(a){this._semaphore=new cx(1,a)}acquire(){return fx(this,arguments,void 0,function*(a=0){const[,r]=yield this._semaphore.acquire(1,a);return r})}runExclusive(a,r=0){return this._semaphore.runExclusive(()=>a(),1,r)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(a=0){return this._semaphore.waitForUnlock(1,a)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var Hp,Gp;const Lu=((Gp=(Hp=globalThis.browser)==null?void 0:Hp.runtime)==null?void 0:Gp.id)==null?globalThis.chrome:globalThis.browser,Ke=hx();function hx(){const n={local:vu("local"),session:vu("session"),sync:vu("sync"),managed:vu("managed")},a=D=>{const R=n[D];if(R==null){const N=Object.keys(n).join(", ");throw Error(`Invalid area "${D}". Options: ${N}`)}return R},r=D=>{const R=D.indexOf(":"),N=D.substring(0,R),U=D.substring(R+1);if(U==null)throw Error(`Storage key should be in the form of "area:key", but received "${D}"`);return{driverArea:N,driverKey:U,driver:a(N)}},s=D=>D+"$",o=(D,R)=>{const N={...D};return Object.entries(R).forEach(([U,j])=>{j==null?delete N[U]:N[U]=j}),N},u=(D,R)=>D??R??null,c=D=>typeof D=="object"&&!Array.isArray(D)?D:{},d=async(D,R,N)=>{const U=await D.getItem(R);return u(U,(N==null?void 0:N.fallback)??(N==null?void 0:N.defaultValue))},p=async(D,R)=>{const N=s(R),U=await D.getItem(N);return c(U)},A=async(D,R,N)=>{await D.setItem(R,N??null)},E=async(D,R,N)=>{const U=s(R),j=c(await D.getItem(U));await D.setItem(U,o(j,N))},v=async(D,R,N)=>{if(await D.removeItem(R),N!=null&&N.removeMeta){const U=s(R);await D.removeItem(U)}},C=async(D,R,N)=>{const U=s(R);if(N==null)await D.removeItem(U);else{const j=c(await D.getItem(U));[N].flat().forEach(P=>delete j[P]),await D.setItem(U,j)}},S=(D,R,N)=>D.watch(R,N);return{getItem:async(D,R)=>{const{driver:N,driverKey:U}=r(D);return await d(N,U,R)},getItems:async D=>{const R=new Map,N=new Map,U=[];D.forEach(P=>{let V,de;typeof P=="string"?V=P:"getValue"in P?(V=P.key,de={fallback:P.fallback}):(V=P.key,de=P.options),U.push(V);const{driverArea:ce,driverKey:Z}=r(V),X=R.get(ce)??[];R.set(ce,X.concat(Z)),N.set(V,de)});const j=new Map;return await Promise.all(Array.from(R.entries()).map(async([P,V])=>{(await n[P].getItems(V)).forEach(ce=>{const Z=`${P}:${ce.key}`,X=N.get(Z),K=u(ce.value,(X==null?void 0:X.fallback)??(X==null?void 0:X.defaultValue));j.set(Z,K)})})),U.map(P=>({key:P,value:j.get(P)}))},getMeta:async D=>{const{driver:R,driverKey:N}=r(D);return await p(R,N)},getMetas:async D=>{const R=D.map(j=>{const P=typeof j=="string"?j:j.key,{driverArea:V,driverKey:de}=r(P);return{key:P,driverArea:V,driverKey:de,driverMetaKey:s(de)}}),N=R.reduce((j,P)=>{var V;return j[V=P.driverArea]??(j[V]=[]),j[P.driverArea].push(P),j},{}),U={};return await Promise.all(Object.entries(N).map(async([j,P])=>{const V=await Lu.storage[j].get(P.map(de=>de.driverMetaKey));P.forEach(de=>{U[de.key]=V[de.driverMetaKey]??{}})})),R.map(j=>({key:j.key,meta:U[j.key]}))},setItem:async(D,R)=>{const{driver:N,driverKey:U}=r(D);await A(N,U,R)},setItems:async D=>{const R={};D.forEach(N=>{const{driverArea:U,driverKey:j}=r("key"in N?N.key:N.item.key);R[U]??(R[U]=[]),R[U].push({key:j,value:N.value})}),await Promise.all(Object.entries(R).map(async([N,U])=>{await a(N).setItems(U)}))},setMeta:async(D,R)=>{const{driver:N,driverKey:U}=r(D);await E(N,U,R)},setMetas:async D=>{const R={};D.forEach(N=>{const{driverArea:U,driverKey:j}=r("key"in N?N.key:N.item.key);R[U]??(R[U]=[]),R[U].push({key:j,properties:N.meta})}),await Promise.all(Object.entries(R).map(async([N,U])=>{const j=a(N),P=U.map(({key:Z})=>s(Z));console.log(N,P);const V=await j.getItems(P),de=Object.fromEntries(V.map(({key:Z,value:X})=>[Z,c(X)])),ce=U.map(({key:Z,properties:X})=>{const K=s(Z);return{key:K,value:o(de[K]??{},X)}});await j.setItems(ce)}))},removeItem:async(D,R)=>{const{driver:N,driverKey:U}=r(D);await v(N,U,R)},removeItems:async D=>{const R={};D.forEach(N=>{let U,j;typeof N=="string"?U=N:"getValue"in N?U=N.key:"item"in N?(U=N.item.key,j=N.options):(U=N.key,j=N.options);const{driverArea:P,driverKey:V}=r(U);R[P]??(R[P]=[]),R[P].push(V),j!=null&&j.removeMeta&&R[P].push(s(V))}),await Promise.all(Object.entries(R).map(async([N,U])=>{await a(N).removeItems(U)}))},clear:async D=>{await a(D).clear()},removeMeta:async(D,R)=>{const{driver:N,driverKey:U}=r(D);await C(N,U,R)},snapshot:async(D,R)=>{var j;const U=await a(D).snapshot();return(j=R==null?void 0:R.excludeKeys)==null||j.forEach(P=>{delete U[P],delete U[s(P)]}),U},restoreSnapshot:async(D,R)=>{await a(D).restoreSnapshot(R)},watch:(D,R)=>{const{driver:N,driverKey:U}=r(D);return S(N,U,R)},unwatch(){Object.values(n).forEach(D=>{D.unwatch()})},defineItem:(D,R)=>{const{driver:N,driverKey:U}=r(D),{version:j=1,migrations:P={}}=R??{};if(j<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const V=async()=>{var Y;const K=s(U),[{value:ee},{value:pe}]=await N.getItems([U,K]);if(ee==null)return;const ge=(pe==null?void 0:pe.v)??1;if(ge>j)throw Error(`Version downgrade detected (v${ge} -> v${j}) for "${D}"`);if(ge===j)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${D}: v${ge} -> v${j}`);const Ne=Array.from({length:j-ge},(ae,xe)=>ge+xe+1);let Ee=ee;for(const ae of Ne)try{Ee=await((Y=P==null?void 0:P[ae])==null?void 0:Y.call(P,Ee))??Ee}catch(xe){throw new gx(D,ae,{cause:xe})}await N.setItems([{key:U,value:Ee},{key:K,value:{...pe,v:j}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${D} v${j}`,{migratedValue:Ee})},de=(R==null?void 0:R.migrations)==null?Promise.resolve():V().catch(K=>{console.error(`[@wxt-dev/storage] Migration failed for ${D}`,K)}),ce=new Ax,Z=()=>(R==null?void 0:R.fallback)??(R==null?void 0:R.defaultValue)??null,X=()=>ce.runExclusive(async()=>{const K=await N.getItem(U);if(K!=null||(R==null?void 0:R.init)==null)return K;const ee=await R.init();return await N.setItem(U,ee),ee});return de.then(X),{key:D,get defaultValue(){return Z()},get fallback(){return Z()},getValue:async()=>(await de,R!=null&&R.init?await X():await d(N,U,R)),getMeta:async()=>(await de,await p(N,U)),setValue:async K=>(await de,await A(N,U,K)),setMeta:async K=>(await de,await E(N,U,K)),removeValue:async K=>(await de,await v(N,U,K)),removeMeta:async K=>(await de,await C(N,U,K)),watch:K=>S(N,U,(ee,pe)=>K(ee??Z(),pe??Z())),migrate:V}}}}function vu(n){const a=()=>{if(Lu.runtime==null)throw Error(["'wxt/storage' must be loaded in a web extension environment",`
 - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371`,` - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html
`].join(`
`));if(Lu.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const s=Lu.storage[n];if(s==null)throw Error(`"browser.storage.${n}" is undefined`);return s},r=new Set;return{getItem:async s=>(await a().get(s))[s],getItems:async s=>{const o=await a().get(s);return s.map(u=>({key:u,value:o[u]??null}))},setItem:async(s,o)=>{o==null?await a().remove(s):await a().set({[s]:o})},setItems:async s=>{const o=s.reduce((u,{key:c,value:d})=>(u[c]=d,u),{});await a().set(o)},removeItem:async s=>{await a().remove(s)},removeItems:async s=>{await a().remove(s)},clear:async()=>{await a().clear()},snapshot:async()=>await a().get(),restoreSnapshot:async s=>{await a().set(s)},watch(s,o){const u=c=>{const d=c[s];d!=null&&(dA(d.newValue,d.oldValue)||o(d.newValue??null,d.oldValue??null))};return a().onChanged.addListener(u),r.add(u),()=>{a().onChanged.removeListener(u),r.delete(u)}},unwatch(){r.forEach(s=>{a().onChanged.removeListener(s)}),r.clear()}}}class gx extends Error{constructor(a,r,s){super(`v${r} migration failed for "${a}"`,s),this.key=a,this.version=r}}var Mf={},ql={},w0;function mx(){if(w0)return ql;w0=1,ql.byteLength=d,ql.toByteArray=A,ql.fromByteArray=C;for(var n=[],a=[],r=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],a[s.charCodeAt(o)]=o;a[45]=62,a[95]=63;function c(S){var k=S.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var D=S.indexOf("=");D===-1&&(D=k);var R=D===k?0:4-D%4;return[D,R]}function d(S){var k=c(S),D=k[0],R=k[1];return(D+R)*3/4-R}function p(S,k,D){return(k+D)*3/4-D}function A(S){var k,D=c(S),R=D[0],N=D[1],U=new r(p(S,R,N)),j=0,P=N>0?R-4:R,V;for(V=0;V<P;V+=4)k=a[S.charCodeAt(V)]<<18|a[S.charCodeAt(V+1)]<<12|a[S.charCodeAt(V+2)]<<6|a[S.charCodeAt(V+3)],U[j++]=k>>16&255,U[j++]=k>>8&255,U[j++]=k&255;return N===2&&(k=a[S.charCodeAt(V)]<<2|a[S.charCodeAt(V+1)]>>4,U[j++]=k&255),N===1&&(k=a[S.charCodeAt(V)]<<10|a[S.charCodeAt(V+1)]<<4|a[S.charCodeAt(V+2)]>>2,U[j++]=k>>8&255,U[j++]=k&255),U}function E(S){return n[S>>18&63]+n[S>>12&63]+n[S>>6&63]+n[S&63]}function v(S,k,D){for(var R,N=[],U=k;U<D;U+=3)R=(S[U]<<16&16711680)+(S[U+1]<<8&65280)+(S[U+2]&255),N.push(E(R));return N.join("")}function C(S){for(var k,D=S.length,R=D%3,N=[],U=16383,j=0,P=D-R;j<P;j+=U)N.push(v(S,j,j+U>P?P:j+U));return R===1?(k=S[D-1],N.push(n[k>>2]+n[k<<4&63]+"==")):R===2&&(k=(S[D-2]<<8)+S[D-1],N.push(n[k>>10]+n[k>>4&63]+n[k<<2&63]+"=")),N.join("")}return ql}var wu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var x0;function px(){return x0||(x0=1,wu.read=function(n,a,r,s,o){var u,c,d=o*8-s-1,p=(1<<d)-1,A=p>>1,E=-7,v=r?o-1:0,C=r?-1:1,S=n[a+v];for(v+=C,u=S&(1<<-E)-1,S>>=-E,E+=d;E>0;u=u*256+n[a+v],v+=C,E-=8);for(c=u&(1<<-E)-1,u>>=-E,E+=s;E>0;c=c*256+n[a+v],v+=C,E-=8);if(u===0)u=1-A;else{if(u===p)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,s),u=u-A}return(S?-1:1)*c*Math.pow(2,u-s)},wu.write=function(n,a,r,s,o,u){var c,d,p,A=u*8-o-1,E=(1<<A)-1,v=E>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=s?0:u-1,k=s?1:-1,D=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(d=isNaN(a)?1:0,c=E):(c=Math.floor(Math.log(a)/Math.LN2),a*(p=Math.pow(2,-c))<1&&(c--,p*=2),c+v>=1?a+=C/p:a+=C*Math.pow(2,1-v),a*p>=2&&(c++,p/=2),c+v>=E?(d=0,c=E):c+v>=1?(d=(a*p-1)*Math.pow(2,o),c=c+v):(d=a*Math.pow(2,v-1)*Math.pow(2,o),c=0));o>=8;n[r+S]=d&255,S+=k,d/=256,o-=8);for(c=c<<o|d,A+=o;A>0;n[r+S]=c&255,S+=k,c/=256,A-=8);n[r+S-k]|=D*128}),wu}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var C0;function yx(){return C0||(C0=1,function(n){const a=mx(),r=px(),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=d,n.SlowBuffer=U,n.INSPECT_MAX_BYTES=50;const o=2147483647;n.kMaxLength=o,d.TYPED_ARRAY_SUPPORT=u(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{const T=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(T,b),T.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function c(T){if(T>o)throw new RangeError('The value "'+T+'" is invalid for option "size"');const b=new Uint8Array(T);return Object.setPrototypeOf(b,d.prototype),b}function d(T,b,w){if(typeof T=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(T)}return p(T,b,w)}d.poolSize=8192;function p(T,b,w){if(typeof T=="string")return C(T,b);if(ArrayBuffer.isView(T))return k(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(ie(T,ArrayBuffer)||T&&ie(T.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ie(T,SharedArrayBuffer)||T&&ie(T.buffer,SharedArrayBuffer)))return D(T,b,w);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const H=T.valueOf&&T.valueOf();if(H!=null&&H!==T)return d.from(H,b,w);const $=R(T);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return d.from(T[Symbol.toPrimitive]("string"),b,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}d.from=function(T,b,w){return p(T,b,w)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function A(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function E(T,b,w){return A(T),T<=0?c(T):b!==void 0?typeof w=="string"?c(T).fill(b,w):c(T).fill(b):c(T)}d.alloc=function(T,b,w){return E(T,b,w)};function v(T){return A(T),c(T<0?0:N(T)|0)}d.allocUnsafe=function(T){return v(T)},d.allocUnsafeSlow=function(T){return v(T)};function C(T,b){if((typeof b!="string"||b==="")&&(b="utf8"),!d.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const w=j(T,b)|0;let H=c(w);const $=H.write(T,b);return $!==w&&(H=H.slice(0,$)),H}function S(T){const b=T.length<0?0:N(T.length)|0,w=c(b);for(let H=0;H<b;H+=1)w[H]=T[H]&255;return w}function k(T){if(ie(T,Uint8Array)){const b=new Uint8Array(T);return D(b.buffer,b.byteOffset,b.byteLength)}return S(T)}function D(T,b,w){if(b<0||T.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(T.byteLength<b+(w||0))throw new RangeError('"length" is outside of buffer bounds');let H;return b===void 0&&w===void 0?H=new Uint8Array(T):w===void 0?H=new Uint8Array(T,b):H=new Uint8Array(T,b,w),Object.setPrototypeOf(H,d.prototype),H}function R(T){if(d.isBuffer(T)){const b=N(T.length)|0,w=c(b);return w.length===0||T.copy(w,0,0,b),w}if(T.length!==void 0)return typeof T.length!="number"||ke(T.length)?c(0):S(T);if(T.type==="Buffer"&&Array.isArray(T.data))return S(T.data)}function N(T){if(T>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return T|0}function U(T){return+T!=T&&(T=0),d.alloc(+T)}d.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==d.prototype},d.compare=function(b,w){if(ie(b,Uint8Array)&&(b=d.from(b,b.offset,b.byteLength)),ie(w,Uint8Array)&&(w=d.from(w,w.offset,w.byteLength)),!d.isBuffer(b)||!d.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===w)return 0;let H=b.length,$=w.length;for(let Ae=0,be=Math.min(H,$);Ae<be;++Ae)if(b[Ae]!==w[Ae]){H=b[Ae],$=w[Ae];break}return H<$?-1:$<H?1:0},d.isEncoding=function(b){switch(String(b).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(b,w){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return d.alloc(0);let H;if(w===void 0)for(w=0,H=0;H<b.length;++H)w+=b[H].length;const $=d.allocUnsafe(w);let Ae=0;for(H=0;H<b.length;++H){let be=b[H];if(ie(be,Uint8Array))Ae+be.length>$.length?(d.isBuffer(be)||(be=d.from(be)),be.copy($,Ae)):Uint8Array.prototype.set.call($,be,Ae);else if(d.isBuffer(be))be.copy($,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=be.length}return $};function j(T,b){if(d.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||ie(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);const w=T.length,H=arguments.length>2&&arguments[2]===!0;if(!H&&w===0)return 0;let $=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Oe(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return F(T).length;default:if($)return H?-1:Oe(T).length;b=(""+b).toLowerCase(),$=!0}}d.byteLength=j;function P(T,b,w){let H=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,b>>>=0,w<=b))return"";for(T||(T="utf8");;)switch(T){case"hex":return Me(this,b,w);case"utf8":case"utf-8":return Ne(this,b,w);case"ascii":return ae(this,b,w);case"latin1":case"binary":return xe(this,b,w);case"base64":return ge(this,b,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,w);default:if(H)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),H=!0}}d.prototype._isBuffer=!0;function V(T,b,w){const H=T[b];T[b]=T[w],T[w]=H}d.prototype.swap16=function(){const b=this.length;if(b%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<b;w+=2)V(this,w,w+1);return this},d.prototype.swap32=function(){const b=this.length;if(b%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<b;w+=4)V(this,w,w+3),V(this,w+1,w+2);return this},d.prototype.swap64=function(){const b=this.length;if(b%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<b;w+=8)V(this,w,w+7),V(this,w+1,w+6),V(this,w+2,w+5),V(this,w+3,w+4);return this},d.prototype.toString=function(){const b=this.length;return b===0?"":arguments.length===0?Ne(this,0,b):P.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(b){if(!d.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:d.compare(this,b)===0},d.prototype.inspect=function(){let b="";const w=n.INSPECT_MAX_BYTES;return b=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(b+=" ... "),"<Buffer "+b+">"},s&&(d.prototype[s]=d.prototype.inspect),d.prototype.compare=function(b,w,H,$,Ae){if(ie(b,Uint8Array)&&(b=d.from(b,b.offset,b.byteLength)),!d.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(w===void 0&&(w=0),H===void 0&&(H=b?b.length:0),$===void 0&&($=0),Ae===void 0&&(Ae=this.length),w<0||H>b.length||$<0||Ae>this.length)throw new RangeError("out of range index");if($>=Ae&&w>=H)return 0;if($>=Ae)return-1;if(w>=H)return 1;if(w>>>=0,H>>>=0,$>>>=0,Ae>>>=0,this===b)return 0;let be=Ae-$,Qe=H-w;const mt=Math.min(be,Qe),ft=this.slice($,Ae),vt=b.slice(w,H);for(let ot=0;ot<mt;++ot)if(ft[ot]!==vt[ot]){be=ft[ot],Qe=vt[ot];break}return be<Qe?-1:Qe<be?1:0};function de(T,b,w,H,$){if(T.length===0)return-1;if(typeof w=="string"?(H=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,ke(w)&&(w=$?0:T.length-1),w<0&&(w=T.length+w),w>=T.length){if($)return-1;w=T.length-1}else if(w<0)if($)w=0;else return-1;if(typeof b=="string"&&(b=d.from(b,H)),d.isBuffer(b))return b.length===0?-1:ce(T,b,w,H,$);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(T,b,w):Uint8Array.prototype.lastIndexOf.call(T,b,w):ce(T,[b],w,H,$);throw new TypeError("val must be string, number or Buffer")}function ce(T,b,w,H,$){let Ae=1,be=T.length,Qe=b.length;if(H!==void 0&&(H=String(H).toLowerCase(),H==="ucs2"||H==="ucs-2"||H==="utf16le"||H==="utf-16le")){if(T.length<2||b.length<2)return-1;Ae=2,be/=2,Qe/=2,w/=2}function mt(vt,ot){return Ae===1?vt[ot]:vt.readUInt16BE(ot*Ae)}let ft;if($){let vt=-1;for(ft=w;ft<be;ft++)if(mt(T,ft)===mt(b,vt===-1?0:ft-vt)){if(vt===-1&&(vt=ft),ft-vt+1===Qe)return vt*Ae}else vt!==-1&&(ft-=ft-vt),vt=-1}else for(w+Qe>be&&(w=be-Qe),ft=w;ft>=0;ft--){let vt=!0;for(let ot=0;ot<Qe;ot++)if(mt(T,ft+ot)!==mt(b,ot)){vt=!1;break}if(vt)return ft}return-1}d.prototype.includes=function(b,w,H){return this.indexOf(b,w,H)!==-1},d.prototype.indexOf=function(b,w,H){return de(this,b,w,H,!0)},d.prototype.lastIndexOf=function(b,w,H){return de(this,b,w,H,!1)};function Z(T,b,w,H){w=Number(w)||0;const $=T.length-w;H?(H=Number(H),H>$&&(H=$)):H=$;const Ae=b.length;H>Ae/2&&(H=Ae/2);let be;for(be=0;be<H;++be){const Qe=parseInt(b.substr(be*2,2),16);if(ke(Qe))return be;T[w+be]=Qe}return be}function X(T,b,w,H){return J(Oe(b,T.length-w),T,w,H)}function K(T,b,w,H){return J(nt(b),T,w,H)}function ee(T,b,w,H){return J(F(b),T,w,H)}function pe(T,b,w,H){return J(lt(b,T.length-w),T,w,H)}d.prototype.write=function(b,w,H,$){if(w===void 0)$="utf8",H=this.length,w=0;else if(H===void 0&&typeof w=="string")$=w,H=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(H)?(H=H>>>0,$===void 0&&($="utf8")):($=H,H=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ae=this.length-w;if((H===void 0||H>Ae)&&(H=Ae),b.length>0&&(H<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");let be=!1;for(;;)switch($){case"hex":return Z(this,b,w,H);case"utf8":case"utf-8":return X(this,b,w,H);case"ascii":case"latin1":case"binary":return K(this,b,w,H);case"base64":return ee(this,b,w,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,b,w,H);default:if(be)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),be=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ge(T,b,w){return b===0&&w===T.length?a.fromByteArray(T):a.fromByteArray(T.slice(b,w))}function Ne(T,b,w){w=Math.min(T.length,w);const H=[];let $=b;for(;$<w;){const Ae=T[$];let be=null,Qe=Ae>239?4:Ae>223?3:Ae>191?2:1;if($+Qe<=w){let mt,ft,vt,ot;switch(Qe){case 1:Ae<128&&(be=Ae);break;case 2:mt=T[$+1],(mt&192)===128&&(ot=(Ae&31)<<6|mt&63,ot>127&&(be=ot));break;case 3:mt=T[$+1],ft=T[$+2],(mt&192)===128&&(ft&192)===128&&(ot=(Ae&15)<<12|(mt&63)<<6|ft&63,ot>2047&&(ot<55296||ot>57343)&&(be=ot));break;case 4:mt=T[$+1],ft=T[$+2],vt=T[$+3],(mt&192)===128&&(ft&192)===128&&(vt&192)===128&&(ot=(Ae&15)<<18|(mt&63)<<12|(ft&63)<<6|vt&63,ot>65535&&ot<1114112&&(be=ot))}}be===null?(be=65533,Qe=1):be>65535&&(be-=65536,H.push(be>>>10&1023|55296),be=56320|be&1023),H.push(be),$+=Qe}return Y(H)}const Ee=4096;function Y(T){const b=T.length;if(b<=Ee)return String.fromCharCode.apply(String,T);let w="",H=0;for(;H<b;)w+=String.fromCharCode.apply(String,T.slice(H,H+=Ee));return w}function ae(T,b,w){let H="";w=Math.min(T.length,w);for(let $=b;$<w;++$)H+=String.fromCharCode(T[$]&127);return H}function xe(T,b,w){let H="";w=Math.min(T.length,w);for(let $=b;$<w;++$)H+=String.fromCharCode(T[$]);return H}function Me(T,b,w){const H=T.length;(!b||b<0)&&(b=0),(!w||w<0||w>H)&&(w=H);let $="";for(let Ae=b;Ae<w;++Ae)$+=Le[T[Ae]];return $}function G(T,b,w){const H=T.slice(b,w);let $="";for(let Ae=0;Ae<H.length-1;Ae+=2)$+=String.fromCharCode(H[Ae]+H[Ae+1]*256);return $}d.prototype.slice=function(b,w){const H=this.length;b=~~b,w=w===void 0?H:~~w,b<0?(b+=H,b<0&&(b=0)):b>H&&(b=H),w<0?(w+=H,w<0&&(w=0)):w>H&&(w=H),w<b&&(w=b);const $=this.subarray(b,w);return Object.setPrototypeOf($,d.prototype),$};function re(T,b,w){if(T%1!==0||T<0)throw new RangeError("offset is not uint");if(T+b>w)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(b,w,H){b=b>>>0,w=w>>>0,H||re(b,w,this.length);let $=this[b],Ae=1,be=0;for(;++be<w&&(Ae*=256);)$+=this[b+be]*Ae;return $},d.prototype.readUintBE=d.prototype.readUIntBE=function(b,w,H){b=b>>>0,w=w>>>0,H||re(b,w,this.length);let $=this[b+--w],Ae=1;for(;w>0&&(Ae*=256);)$+=this[b+--w]*Ae;return $},d.prototype.readUint8=d.prototype.readUInt8=function(b,w){return b=b>>>0,w||re(b,1,this.length),this[b]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(b,w){return b=b>>>0,w||re(b,2,this.length),this[b]|this[b+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(b,w){return b=b>>>0,w||re(b,2,this.length),this[b]<<8|this[b+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(b,w){return b=b>>>0,w||re(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+this[b+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(b,w){return b=b>>>0,w||re(b,4,this.length),this[b]*16777216+(this[b+1]<<16|this[b+2]<<8|this[b+3])},d.prototype.readBigUInt64LE=we(function(b){b=b>>>0,Vt(b,"offset");const w=this[b],H=this[b+7];(w===void 0||H===void 0)&&Ft(b,this.length-8);const $=w+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24,Ae=this[++b]+this[++b]*2**8+this[++b]*2**16+H*2**24;return BigInt($)+(BigInt(Ae)<<BigInt(32))}),d.prototype.readBigUInt64BE=we(function(b){b=b>>>0,Vt(b,"offset");const w=this[b],H=this[b+7];(w===void 0||H===void 0)&&Ft(b,this.length-8);const $=w*2**24+this[++b]*2**16+this[++b]*2**8+this[++b],Ae=this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+H;return(BigInt($)<<BigInt(32))+BigInt(Ae)}),d.prototype.readIntLE=function(b,w,H){b=b>>>0,w=w>>>0,H||re(b,w,this.length);let $=this[b],Ae=1,be=0;for(;++be<w&&(Ae*=256);)$+=this[b+be]*Ae;return Ae*=128,$>=Ae&&($-=Math.pow(2,8*w)),$},d.prototype.readIntBE=function(b,w,H){b=b>>>0,w=w>>>0,H||re(b,w,this.length);let $=w,Ae=1,be=this[b+--$];for(;$>0&&(Ae*=256);)be+=this[b+--$]*Ae;return Ae*=128,be>=Ae&&(be-=Math.pow(2,8*w)),be},d.prototype.readInt8=function(b,w){return b=b>>>0,w||re(b,1,this.length),this[b]&128?(255-this[b]+1)*-1:this[b]},d.prototype.readInt16LE=function(b,w){b=b>>>0,w||re(b,2,this.length);const H=this[b]|this[b+1]<<8;return H&32768?H|4294901760:H},d.prototype.readInt16BE=function(b,w){b=b>>>0,w||re(b,2,this.length);const H=this[b+1]|this[b]<<8;return H&32768?H|4294901760:H},d.prototype.readInt32LE=function(b,w){return b=b>>>0,w||re(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},d.prototype.readInt32BE=function(b,w){return b=b>>>0,w||re(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},d.prototype.readBigInt64LE=we(function(b){b=b>>>0,Vt(b,"offset");const w=this[b],H=this[b+7];(w===void 0||H===void 0)&&Ft(b,this.length-8);const $=this[b+4]+this[b+5]*2**8+this[b+6]*2**16+(H<<24);return(BigInt($)<<BigInt(32))+BigInt(w+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24)}),d.prototype.readBigInt64BE=we(function(b){b=b>>>0,Vt(b,"offset");const w=this[b],H=this[b+7];(w===void 0||H===void 0)&&Ft(b,this.length-8);const $=(w<<24)+this[++b]*2**16+this[++b]*2**8+this[++b];return(BigInt($)<<BigInt(32))+BigInt(this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+H)}),d.prototype.readFloatLE=function(b,w){return b=b>>>0,w||re(b,4,this.length),r.read(this,b,!0,23,4)},d.prototype.readFloatBE=function(b,w){return b=b>>>0,w||re(b,4,this.length),r.read(this,b,!1,23,4)},d.prototype.readDoubleLE=function(b,w){return b=b>>>0,w||re(b,8,this.length),r.read(this,b,!0,52,8)},d.prototype.readDoubleBE=function(b,w){return b=b>>>0,w||re(b,8,this.length),r.read(this,b,!1,52,8)};function ye(T,b,w,H,$,Ae){if(!d.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>$||b<Ae)throw new RangeError('"value" argument is out of bounds');if(w+H>T.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(b,w,H,$){if(b=+b,w=w>>>0,H=H>>>0,!$){const Qe=Math.pow(2,8*H)-1;ye(this,b,w,H,Qe,0)}let Ae=1,be=0;for(this[w]=b&255;++be<H&&(Ae*=256);)this[w+be]=b/Ae&255;return w+H},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(b,w,H,$){if(b=+b,w=w>>>0,H=H>>>0,!$){const Qe=Math.pow(2,8*H)-1;ye(this,b,w,H,Qe,0)}let Ae=H-1,be=1;for(this[w+Ae]=b&255;--Ae>=0&&(be*=256);)this[w+Ae]=b/be&255;return w+H},d.prototype.writeUint8=d.prototype.writeUInt8=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,1,255,0),this[w]=b&255,w+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,2,65535,0),this[w]=b&255,this[w+1]=b>>>8,w+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,2,65535,0),this[w]=b>>>8,this[w+1]=b&255,w+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,4,4294967295,0),this[w+3]=b>>>24,this[w+2]=b>>>16,this[w+1]=b>>>8,this[w]=b&255,w+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,4,4294967295,0),this[w]=b>>>24,this[w+1]=b>>>16,this[w+2]=b>>>8,this[w+3]=b&255,w+4};function Re(T,b,w,H,$){Qt(b,H,$,T,w,7);let Ae=Number(b&BigInt(4294967295));T[w++]=Ae,Ae=Ae>>8,T[w++]=Ae,Ae=Ae>>8,T[w++]=Ae,Ae=Ae>>8,T[w++]=Ae;let be=Number(b>>BigInt(32)&BigInt(4294967295));return T[w++]=be,be=be>>8,T[w++]=be,be=be>>8,T[w++]=be,be=be>>8,T[w++]=be,w}function Ve(T,b,w,H,$){Qt(b,H,$,T,w,7);let Ae=Number(b&BigInt(4294967295));T[w+7]=Ae,Ae=Ae>>8,T[w+6]=Ae,Ae=Ae>>8,T[w+5]=Ae,Ae=Ae>>8,T[w+4]=Ae;let be=Number(b>>BigInt(32)&BigInt(4294967295));return T[w+3]=be,be=be>>8,T[w+2]=be,be=be>>8,T[w+1]=be,be=be>>8,T[w]=be,w+8}d.prototype.writeBigUInt64LE=we(function(b,w=0){return Re(this,b,w,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=we(function(b,w=0){return Ve(this,b,w,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(b,w,H,$){if(b=+b,w=w>>>0,!$){const mt=Math.pow(2,8*H-1);ye(this,b,w,H,mt-1,-mt)}let Ae=0,be=1,Qe=0;for(this[w]=b&255;++Ae<H&&(be*=256);)b<0&&Qe===0&&this[w+Ae-1]!==0&&(Qe=1),this[w+Ae]=(b/be>>0)-Qe&255;return w+H},d.prototype.writeIntBE=function(b,w,H,$){if(b=+b,w=w>>>0,!$){const mt=Math.pow(2,8*H-1);ye(this,b,w,H,mt-1,-mt)}let Ae=H-1,be=1,Qe=0;for(this[w+Ae]=b&255;--Ae>=0&&(be*=256);)b<0&&Qe===0&&this[w+Ae+1]!==0&&(Qe=1),this[w+Ae]=(b/be>>0)-Qe&255;return w+H},d.prototype.writeInt8=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,1,127,-128),b<0&&(b=255+b+1),this[w]=b&255,w+1},d.prototype.writeInt16LE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,2,32767,-32768),this[w]=b&255,this[w+1]=b>>>8,w+2},d.prototype.writeInt16BE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,2,32767,-32768),this[w]=b>>>8,this[w+1]=b&255,w+2},d.prototype.writeInt32LE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,4,2147483647,-2147483648),this[w]=b&255,this[w+1]=b>>>8,this[w+2]=b>>>16,this[w+3]=b>>>24,w+4},d.prototype.writeInt32BE=function(b,w,H){return b=+b,w=w>>>0,H||ye(this,b,w,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[w]=b>>>24,this[w+1]=b>>>16,this[w+2]=b>>>8,this[w+3]=b&255,w+4},d.prototype.writeBigInt64LE=we(function(b,w=0){return Re(this,b,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=we(function(b,w=0){return Ve(this,b,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Je(T,b,w,H,$,Ae){if(w+H>T.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function He(T,b,w,H,$){return b=+b,w=w>>>0,$||Je(T,b,w,4),r.write(T,b,w,H,23,4),w+4}d.prototype.writeFloatLE=function(b,w,H){return He(this,b,w,!0,H)},d.prototype.writeFloatBE=function(b,w,H){return He(this,b,w,!1,H)};function Et(T,b,w,H,$){return b=+b,w=w>>>0,$||Je(T,b,w,8),r.write(T,b,w,H,52,8),w+8}d.prototype.writeDoubleLE=function(b,w,H){return Et(this,b,w,!0,H)},d.prototype.writeDoubleBE=function(b,w,H){return Et(this,b,w,!1,H)},d.prototype.copy=function(b,w,H,$){if(!d.isBuffer(b))throw new TypeError("argument should be a Buffer");if(H||(H=0),!$&&$!==0&&($=this.length),w>=b.length&&(w=b.length),w||(w=0),$>0&&$<H&&($=H),$===H||b.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),b.length-w<$-H&&($=b.length-w+H);const Ae=$-H;return this===b&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,H,$):Uint8Array.prototype.set.call(b,this.subarray(H,$),w),Ae},d.prototype.fill=function(b,w,H,$){if(typeof b=="string"){if(typeof w=="string"?($=w,w=0,H=this.length):typeof H=="string"&&($=H,H=this.length),$!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!d.isEncoding($))throw new TypeError("Unknown encoding: "+$);if(b.length===1){const be=b.charCodeAt(0);($==="utf8"&&be<128||$==="latin1")&&(b=be)}}else typeof b=="number"?b=b&255:typeof b=="boolean"&&(b=Number(b));if(w<0||this.length<w||this.length<H)throw new RangeError("Out of range index");if(H<=w)return this;w=w>>>0,H=H===void 0?this.length:H>>>0,b||(b=0);let Ae;if(typeof b=="number")for(Ae=w;Ae<H;++Ae)this[Ae]=b;else{const be=d.isBuffer(b)?b:d.from(b,$),Qe=be.length;if(Qe===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(Ae=0;Ae<H-w;++Ae)this[Ae+w]=be[Ae%Qe]}return this};const We={};function bt(T,b,w){We[T]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${T}]`,this.stack,delete this.name}get code(){return T}set code($){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:$,writable:!0})}toString(){return`${this.name} [${T}]: ${this.message}`}}}bt("ERR_BUFFER_OUT_OF_BOUNDS",function(T){return T?`${T} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),bt("ERR_INVALID_ARG_TYPE",function(T,b){return`The "${T}" argument must be of type number. Received type ${typeof b}`},TypeError),bt("ERR_OUT_OF_RANGE",function(T,b,w){let H=`The value of "${T}" is out of range.`,$=w;return Number.isInteger(w)&&Math.abs(w)>2**32?$=Kt(String(w)):typeof w=="bigint"&&($=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&($=Kt($)),$+="n"),H+=` It must be ${b}. Received ${$}`,H},RangeError);function Kt(T){let b="",w=T.length;const H=T[0]==="-"?1:0;for(;w>=H+4;w-=3)b=`_${T.slice(w-3,w)}${b}`;return`${T.slice(0,w)}${b}`}function Ta(T,b,w){Vt(b,"offset"),(T[b]===void 0||T[b+w]===void 0)&&Ft(b,T.length-(w+1))}function Qt(T,b,w,H,$,Ae){if(T>w||T<b){const be=typeof b=="bigint"?"n":"";let Qe;throw b===0||b===BigInt(0)?Qe=`>= 0${be} and < 2${be} ** ${(Ae+1)*8}${be}`:Qe=`>= -(2${be} ** ${(Ae+1)*8-1}${be}) and < 2 ** ${(Ae+1)*8-1}${be}`,new We.ERR_OUT_OF_RANGE("value",Qe,T)}Ta(H,$,Ae)}function Vt(T,b){if(typeof T!="number")throw new We.ERR_INVALID_ARG_TYPE(b,"number",T)}function Ft(T,b,w){throw Math.floor(T)!==T?(Vt(T,w),new We.ERR_OUT_OF_RANGE("offset","an integer",T)):b<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${b}`,T)}const va=/[^+/0-9A-Za-z-_]/g;function Te(T){if(T=T.split("=")[0],T=T.trim().replace(va,""),T.length<2)return"";for(;T.length%4!==0;)T=T+"=";return T}function Oe(T,b){b=b||1/0;let w;const H=T.length;let $=null;const Ae=[];for(let be=0;be<H;++be){if(w=T.charCodeAt(be),w>55295&&w<57344){if(!$){if(w>56319){(b-=3)>-1&&Ae.push(239,191,189);continue}else if(be+1===H){(b-=3)>-1&&Ae.push(239,191,189);continue}$=w;continue}if(w<56320){(b-=3)>-1&&Ae.push(239,191,189),$=w;continue}w=($-55296<<10|w-56320)+65536}else $&&(b-=3)>-1&&Ae.push(239,191,189);if($=null,w<128){if((b-=1)<0)break;Ae.push(w)}else if(w<2048){if((b-=2)<0)break;Ae.push(w>>6|192,w&63|128)}else if(w<65536){if((b-=3)<0)break;Ae.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((b-=4)<0)break;Ae.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return Ae}function nt(T){const b=[];for(let w=0;w<T.length;++w)b.push(T.charCodeAt(w)&255);return b}function lt(T,b){let w,H,$;const Ae=[];for(let be=0;be<T.length&&!((b-=2)<0);++be)w=T.charCodeAt(be),H=w>>8,$=w%256,Ae.push($),Ae.push(H);return Ae}function F(T){return a.toByteArray(Te(T))}function J(T,b,w,H){let $;for($=0;$<H&&!($+w>=b.length||$>=T.length);++$)b[$+w]=T[$];return $}function ie(T,b){return T instanceof b||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===b.name}function ke(T){return T!==T}const Le=function(){const T="0123456789abcdef",b=new Array(256);for(let w=0;w<16;++w){const H=w*16;for(let $=0;$<16;++$)b[H+$]=T[w]+T[$]}return b}();function we(T){return typeof BigInt>"u"?Ge:T}function Ge(){throw new Error("BigInt not supported")}}(Mf)),Mf}var Zi=yx(),Ru={exports:{}},Ex=Ru.exports,I0;function bx(){return I0||(I0=1,function(n,a){(function(r,s){n.exports=s()})(Ex,function(){return(()=>{var r,s,o={773:(d,p,A)=>{var E,v=typeof self<"u"&&self.Module!==void 0?self.Module:{},C={};for(E in v)v.hasOwnProperty(E)&&(C[E]=v[E]);var S,k,D,R;S=typeof window=="object",k=typeof importScripts=="function",D=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",R=!S&&!D&&!k;var N,U,j,P,V,de="";D?(de=k?A(967).dirname(de)+"/":"//",N=function(Te,Oe){return P||(P=A(145)),V||(V=A(967)),Te=V.normalize(Te),P.readFileSync(Te,Oe?null:"utf8")},j=function(Te){var Oe=N(Te,!0);return Oe.buffer||(Oe=new Uint8Array(Oe)),ee(Oe.buffer),Oe},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),d.exports=v,process.on("uncaughtException",function(Te){if(!(Te instanceof Ft))throw Te}),process.on("unhandledRejection",ye),v.inspect=function(){return"[Emscripten Module object]"}):R?(typeof read<"u"&&(N=function(Te){return read(Te)}),j=function(Te){var Oe;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Te)):(ee(typeof(Oe=read(Te,"binary"))=="object"),Oe)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(S||k)&&(k?de=self.location.href:typeof document<"u"&&document.currentScript&&(de=document.currentScript.src),de=de.indexOf("blob:")!==0?de.substr(0,de.lastIndexOf("/")+1):"",N=function(Te){var Oe=new XMLHttpRequest;return Oe.open("GET",Te,!1),Oe.send(null),Oe.responseText},k&&(j=function(Te){var Oe=new XMLHttpRequest;return Oe.open("GET",Te,!1),Oe.responseType="arraybuffer",Oe.send(null),new Uint8Array(Oe.response)}),U=function(Te,Oe,nt){var lt=new XMLHttpRequest;lt.open("GET",Te,!0),lt.responseType="arraybuffer",lt.onload=function(){lt.status==200||lt.status==0&&lt.response?Oe(lt.response):nt()},lt.onerror=nt,lt.send(null)}),v.print||console.log.bind(console);var ce,Z,X=v.printErr||console.warn.bind(console);for(E in C)C.hasOwnProperty(E)&&(v[E]=C[E]);C=null,v.arguments&&v.arguments,v.thisProgram&&v.thisProgram,v.quit&&v.quit,v.wasmBinary&&(ce=v.wasmBinary),v.noExitRuntime,typeof WebAssembly!="object"&&ye("no native wasm support detected");var K=!1;function ee(Te,Oe){Te||ye("Assertion failed: "+Oe)}var pe,ge,Ne=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Ee(Te){pe=Te,v.HEAP8=new Int8Array(Te),v.HEAP16=new Int16Array(Te),v.HEAP32=new Int32Array(Te),v.HEAPU8=ge=new Uint8Array(Te),v.HEAPU16=new Uint16Array(Te),v.HEAPU32=new Uint32Array(Te),v.HEAPF32=new Float32Array(Te),v.HEAPF64=new Float64Array(Te)}v.INITIAL_MEMORY;var Y,ae=[],xe=[],Me=[],G=0,re=null;function ye(Te){throw v.onAbort&&v.onAbort(Te),X(Te+=""),K=!0,Te="abort("+Te+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Te)}function Re(Te){return Te.startsWith("data:application/octet-stream;base64,")}function Ve(Te){return Te.startsWith("file://")}v.preloadedImages={},v.preloadedAudios={};var Je,He="argon2.wasm";function Et(Te){try{if(Te==He&&ce)return new Uint8Array(ce);if(j)return j(Te);throw"both async and sync fetching of the wasm failed"}catch(Oe){ye(Oe)}}function We(Te){for(;Te.length>0;){var Oe=Te.shift();if(typeof Oe!="function"){var nt=Oe.func;typeof nt=="number"?Oe.arg===void 0?Y.get(nt)():Y.get(nt)(Oe.arg):nt(Oe.arg===void 0?null:Oe.arg)}else Oe(v)}}function bt(Te){try{return Z.grow(Te-pe.byteLength+65535>>>16),Ee(Z.buffer),1}catch{}}Re(He)||(Je=He,He=v.locateFile?v.locateFile(Je,de):de+Je);var Kt,Ta={a:function(Te,Oe,nt){ge.copyWithin(Te,Oe,Oe+nt)},b:function(Te){var Oe,nt=ge.length,lt=2147418112;if((Te>>>=0)>lt)return!1;for(var F=1;F<=4;F*=2){var J=nt*(1+.2/F);if(J=Math.min(J,Te+100663296),bt(Math.min(lt,((Oe=Math.max(Te,J))%65536>0&&(Oe+=65536-Oe%65536),Oe))))return!0}return!1}},Qt=(function(){var Te={a:Ta};function Oe(F,J){var ie,ke=F.exports;v.asm=ke,Ee((Z=v.asm.c).buffer),Y=v.asm.k,ie=v.asm.d,xe.unshift(ie),function(Le){if(G--,v.monitorRunDependencies&&v.monitorRunDependencies(G),G==0&&re){var we=re;re=null,we()}}()}function nt(F){Oe(F.instance)}function lt(F){return function(){if(!ce&&(S||k)){if(typeof fetch=="function"&&!Ve(He))return fetch(He,{credentials:"same-origin"}).then(function(J){if(!J.ok)throw"failed to load wasm binary file at '"+He+"'";return J.arrayBuffer()}).catch(function(){return Et(He)});if(U)return new Promise(function(J,ie){U(He,function(ke){J(new Uint8Array(ke))},ie)})}return Promise.resolve().then(function(){return Et(He)})}().then(function(J){return WebAssembly.instantiate(J,Te)}).then(F,function(J){X("failed to asynchronously prepare wasm: "+J),ye(J)})}if(G++,v.monitorRunDependencies&&v.monitorRunDependencies(G),v.instantiateWasm)try{return v.instantiateWasm(Te,Oe)}catch(F){return X("Module.instantiateWasm callback failed with error: "+F),!1}ce||typeof WebAssembly.instantiateStreaming!="function"||Re(He)||Ve(He)||typeof fetch!="function"?lt(nt):fetch(He,{credentials:"same-origin"}).then(function(F){return WebAssembly.instantiateStreaming(F,Te).then(nt,function(J){return X("wasm streaming compile failed: "+J),X("falling back to ArrayBuffer instantiation"),lt(nt)})})}(),v.___wasm_call_ctors=function(){return(v.___wasm_call_ctors=v.asm.d).apply(null,arguments)},v._argon2_hash=function(){return(v._argon2_hash=v.asm.e).apply(null,arguments)},v._malloc=function(){return(Qt=v._malloc=v.asm.f).apply(null,arguments)}),Vt=(v._free=function(){return(v._free=v.asm.g).apply(null,arguments)},v._argon2_verify=function(){return(v._argon2_verify=v.asm.h).apply(null,arguments)},v._argon2_error_message=function(){return(v._argon2_error_message=v.asm.i).apply(null,arguments)},v._argon2_encodedlen=function(){return(v._argon2_encodedlen=v.asm.j).apply(null,arguments)},v._argon2_hash_ext=function(){return(v._argon2_hash_ext=v.asm.l).apply(null,arguments)},v._argon2_verify_ext=function(){return(v._argon2_verify_ext=v.asm.m).apply(null,arguments)},v.stackAlloc=function(){return(Vt=v.stackAlloc=v.asm.n).apply(null,arguments)});function Ft(Te){this.name="ExitStatus",this.message="Program terminated with exit("+Te+")",this.status=Te}function va(Te){function Oe(){Kt||(Kt=!0,v.calledRun=!0,K||(We(xe),v.onRuntimeInitialized&&v.onRuntimeInitialized(),function(){if(v.postRun)for(typeof v.postRun=="function"&&(v.postRun=[v.postRun]);v.postRun.length;)nt=v.postRun.shift(),Me.unshift(nt);var nt;We(Me)}()))}G>0||(function(){if(v.preRun)for(typeof v.preRun=="function"&&(v.preRun=[v.preRun]);v.preRun.length;)nt=v.preRun.shift(),ae.unshift(nt);var nt;We(ae)}(),G>0||(v.setStatus?(v.setStatus("Running..."),setTimeout(function(){setTimeout(function(){v.setStatus("")},1),Oe()},1)):Oe()))}if(v.allocate=function(Te,Oe){var nt;return nt=Oe==1?Vt(Te.length):Qt(Te.length),Te.subarray||Te.slice?ge.set(Te,nt):ge.set(new Uint8Array(Te),nt),nt},v.UTF8ToString=function(Te,Oe){return Te?function(nt,lt,F){for(var J=lt+F,ie=lt;nt[ie]&&!(ie>=J);)++ie;if(ie-lt>16&&nt.subarray&&Ne)return Ne.decode(nt.subarray(lt,ie));for(var ke="";lt<ie;){var Le=nt[lt++];if(128&Le){var we=63&nt[lt++];if((224&Le)!=192){var Ge=63&nt[lt++];if((Le=(240&Le)==224?(15&Le)<<12|we<<6|Ge:(7&Le)<<18|we<<12|Ge<<6|63&nt[lt++])<65536)ke+=String.fromCharCode(Le);else{var T=Le-65536;ke+=String.fromCharCode(55296|T>>10,56320|1023&T)}}else ke+=String.fromCharCode((31&Le)<<6|we)}else ke+=String.fromCharCode(Le)}return ke}(ge,Te,Oe):""},v.ALLOC_NORMAL=0,re=function Te(){Kt||va(),Kt||(re=Te)},v.run=va,v.preInit)for(typeof v.preInit=="function"&&(v.preInit=[v.preInit]);v.preInit.length>0;)v.preInit.pop()();va(),d.exports=v,v.unloadRuntime=function(){typeof self<"u"&&delete self.Module,v=Z=Y=pe=ge=void 0,delete d.exports}},631:function(d,p,A){var E,v;(v=typeof(E=function(){const C=typeof self<"u"?self:this,S={Argon2d:0,Argon2i:1,Argon2id:2};function k(j){if(k._promise)return k._promise;if(k._module)return Promise.resolve(k._module);let P;return P=C.process&&C.process.versions&&C.process.versions.node?D().then(V=>new Promise(de=>{V.postRun=()=>de(V)})):(C.loadArgon2WasmBinary?C.loadArgon2WasmBinary():Promise.resolve(A(721)).then(V=>function(de){const ce=atob(de),Z=new Uint8Array(new ArrayBuffer(ce.length));for(let X=0;X<ce.length;X++)Z[X]=ce.charCodeAt(X);return Z}(V))).then(V=>function(de,ce){return new Promise(Z=>(C.Module={wasmBinary:de,wasmMemory:ce,postRun(){Z(Module)}},D()))}(V,j?function(de){const K=Math.min(Math.max(Math.ceil(de*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:K,maximum:32767})}(j):void 0)),k._promise=P,P.then(V=>(k._module=V,delete k._promise,V))}function D(){return C.loadArgon2WasmModule?C.loadArgon2WasmModule():Promise.resolve(A(773))}function R(j,P){return j.allocate(P,"i8",j.ALLOC_NORMAL)}function N(j,P){return R(j,new Uint8Array([...P,0]))}function U(j){if(typeof j!="string")return j;if(typeof TextEncoder=="function")return new TextEncoder().encode(j);if(typeof Buffer=="function")return Buffer.from(j);throw new Error("Don't know how to encode UTF8")}return{ArgonType:S,hash:function(j){const P=j.mem||1024;return k(P).then(V=>{const de=j.time||1,ce=j.parallelism||1,Z=U(j.pass),X=N(V,Z),K=Z.length,ee=U(j.salt),pe=N(V,ee),ge=ee.length,Ne=j.type||S.Argon2d,Ee=V.allocate(new Array(j.hashLen||24),"i8",V.ALLOC_NORMAL),Y=j.secret?R(V,j.secret):0,ae=j.secret?j.secret.byteLength:0,xe=j.ad?R(V,j.ad):0,Me=j.ad?j.ad.byteLength:0,G=j.hashLen||24,re=V._argon2_encodedlen(de,P,ce,ge,G,Ne),ye=V.allocate(new Array(re+1),"i8",V.ALLOC_NORMAL);let Re,Ve,Je;try{Ve=V._argon2_hash_ext(de,P,ce,X,K,pe,ge,Ee,G,ye,re,Ne,Y,ae,xe,Me,19)}catch(He){Re=He}if(Ve!==0||Re){try{Re||(Re=V.UTF8ToString(V._argon2_error_message(Ve)))}catch{}Je={message:Re,code:Ve}}else{let He="";const Et=new Uint8Array(G);for(let We=0;We<G;We++){const bt=V.HEAP8[Ee+We];Et[We]=bt,He+=("0"+(255&bt).toString(16)).slice(-2)}Je={hash:Et,hashHex:He,encoded:V.UTF8ToString(ye)}}try{V._free(X),V._free(pe),V._free(Ee),V._free(ye),xe&&V._free(xe),Y&&V._free(Y)}catch{}if(Re)throw Je;return Je})},verify:function(j){return k().then(P=>{const V=U(j.pass),de=N(P,V),ce=V.length,Z=j.secret?R(P,j.secret):0,X=j.secret?j.secret.byteLength:0,K=j.ad?R(P,j.ad):0,ee=j.ad?j.ad.byteLength:0,pe=N(P,U(j.encoded));let ge,Ne,Ee,Y=j.type;if(Y===void 0){let ae=j.encoded.split("$")[1];ae&&(ae=ae.replace("a","A"),Y=S[ae]||S.Argon2d)}try{Ne=P._argon2_verify_ext(pe,de,ce,Z,X,K,ee,Y)}catch(ae){ge=ae}if(Ne||ge){try{ge||(ge=P.UTF8ToString(P._argon2_error_message(Ne)))}catch{}Ee={message:ge,code:Ne}}try{P._free(de),P._free(pe)}catch{}if(ge)throw Ee;return Ee})},unloadRuntime:function(){k._module&&(k._module.unloadRuntime(),delete k._promise,delete k._module)}}})=="function"?E.apply(p,[]):E)===void 0||(d.exports=v)},721:function(d,p){d.exports=" "},145:()=>{},967:()=>{}},u={};function c(d){var p=u[d];if(p!==void 0)return p.exports;var A=u[d]={exports:{}};return o[d].call(A.exports,A,A.exports,c),A.exports}return s=Object.getPrototypeOf?d=>Object.getPrototypeOf(d):d=>d.__proto__,c.t=function(d,p){if(1&p&&(d=this(d)),8&p||typeof d=="object"&&d&&(4&p&&d.__esModule||16&p&&typeof d.then=="function"))return d;var A=Object.create(null);c.r(A);var E={};r=r||[null,s({}),s([]),s(s)];for(var v=2&p&&d;typeof v=="object"&&!~r.indexOf(v);v=s(v))Object.getOwnPropertyNames(v).forEach(C=>E[C]=()=>d[C]);return E.default=()=>d,c.d(A,E),A},c.d=(d,p)=>{for(var A in p)c.o(p,A)&&!c.o(d,A)&&Object.defineProperty(d,A,{enumerable:!0,get:p[A]})},c.o=(d,p)=>Object.prototype.hasOwnProperty.call(d,p),c.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},c(631)})()})}(Ru)),Ru.exports}var vx=bx();const wx=Ci(vx);class qt{static async deriveKeyFromPassword(a,r,s="Argon2Id",o='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const u=JSON.parse(o);try{if(s!=="Argon2Id")throw new Error("Unsupported encryption type");return(await wx.hash({pass:a,salt:r,time:u.Iterations,mem:u.MemorySize,parallelism:u.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(c){throw console.error("Argon2 hashing failed:",c),c}}static async symmetricEncrypt(a,r){if(!a)return a;const s=await crypto.subtle.importKey("raw",Uint8Array.from(atob(r),A=>A.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["encrypt"]),o=crypto.getRandomValues(new Uint8Array(12)),c=new TextEncoder().encode(a),d=await crypto.subtle.encrypt({name:"AES-GCM",iv:o},s,c),p=new Uint8Array(o.length+d.byteLength);return p.set(o,0),p.set(new Uint8Array(d),o.length),btoa(Array.from(p).map(A=>String.fromCharCode(A)).join(""))}static async symmetricDecrypt(a,r){if(!a)return a;const s=await crypto.subtle.importKey("raw",Uint8Array.from(atob(r),A=>A.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),o=Uint8Array.from(atob(a),A=>A.charCodeAt(0)),u=o.slice(0,12),c=o.slice(12),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:u},s,c);return new TextDecoder().decode(d)}static async symmetricDecryptBytes(a,r){if(!a||a.length===0)return a;const s=await crypto.subtle.importKey("raw",Uint8Array.from(atob(r),d=>d.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),o=a.slice(0,12),u=a.slice(12),c=await crypto.subtle.decrypt({name:"AES-GCM",iv:o},s,u);return new Uint8Array(c)}static async generateRsaKeyPair(){const a=await crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"]),r=await crypto.subtle.exportKey("jwk",a.publicKey),s=await crypto.subtle.exportKey("jwk",a.privateKey);return{publicKey:JSON.stringify(r),privateKey:JSON.stringify(s)}}static async encryptWithPublicKey(a,r){const s=await crypto.subtle.importKey("jwk",JSON.parse(r),{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),o=new TextEncoder().encode(a),u=await crypto.subtle.encrypt({name:"RSA-OAEP"},s,o);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(u))))}static async decryptWithPrivateKey(a,r){try{const s=await crypto.subtle.importKey("jwk",JSON.parse(r),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),o=Uint8Array.from(atob(a),c=>c.charCodeAt(0)),u=await crypto.subtle.decrypt({name:"RSA-OAEP"},s,o);return new Uint8Array(u)}catch(s){throw console.error("RSA decryption failed:",s),new Error(`Failed to decrypt: ${s instanceof Error?s.message:"Unknown error"}`)}}static async decryptEmail(a,r){try{const s=r.find(d=>d.PublicKey===a.encryptionKey);if(!s)throw new Error("Encryption key not found");const o=await qt.decryptWithPrivateKey(a.encryptedSymmetricKey,s.PrivateKey),u=Zi.Buffer.from(o).toString("base64"),c={...a};return c.subject=await qt.symmetricDecrypt(a.subject,u),c.fromDisplay=await qt.symmetricDecrypt(a.fromDisplay,u),c.fromDomain=await qt.symmetricDecrypt(a.fromDomain,u),c.fromLocal=await qt.symmetricDecrypt(a.fromLocal,u),a.messageHtml&&(c.messageHtml=await qt.symmetricDecrypt(a.messageHtml,u)),a.messagePlain&&(c.messagePlain=await qt.symmetricDecrypt(a.messagePlain,u)),c}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt email")}}static async decryptEmailList(a,r){return Promise.all(a.map(async s=>{try{const o=r.find(p=>p.PublicKey===s.encryptionKey);if(!o)throw new Error("Encryption key not found");const u=await qt.decryptWithPrivateKey(s.encryptedSymmetricKey,o.PrivateKey),c=Zi.Buffer.from(u).toString("base64"),d={...s};return d.subject=await qt.symmetricDecrypt(s.subject,c),d.fromDisplay=await qt.symmetricDecrypt(s.fromDisplay,c),d.fromDomain=await qt.symmetricDecrypt(s.fromDomain,c),d.fromLocal=await qt.symmetricDecrypt(s.fromLocal,c),s.messagePreview&&(d.messagePreview=await qt.symmetricDecrypt(s.messagePreview,c)),d}catch(o){throw new Error(o instanceof Error?o.message:"Failed to decrypt email")}}))}static async decryptAttachment(a,r,s){try{const o=s.find(d=>d.PublicKey===r.encryptionKey);if(!o)throw new Error("Encryption key not found");const u=await qt.decryptWithPrivateKey(r.encryptedSymmetricKey,o.PrivateKey),c=Zi.Buffer.from(u).toString("base64");return await qt.symmetricDecryptBytes(a,c)}catch(o){throw new Error(o instanceof Error?o.message:"Failed to decrypt attachment")}}}var _f={exports:{}};const xx={},Cx=Object.freeze(Object.defineProperty({__proto__:null,default:xx},Symbol.toStringTag,{value:"Module"})),B0=Ob(Cx);var S0;function Ix(){return S0||(S0=1,function(n,a){var r=void 0,s=function(o){return r||(r=new Promise(function(u,c){var d=typeof o<"u"?o:{},p=d.onAbort;d.onAbort=function(g){c(new Error(g)),p&&p(g)},d.postRun=d.postRun||[],d.postRun.push(function(){u(d)}),n=void 0;var A;A||(A=typeof d<"u"?d:{});var E=typeof window=="object",v=typeof WorkerGlobalScope<"u",C=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";A.onRuntimeInitialized=function(){function g(se,De){switch(typeof De){case"boolean":Rc(se,De?1:0);break;case"number":Tc(se,De);break;case"string":Dc(se,De,-1,-1);break;case"object":if(De===null)po(se);else if(De.length!=null){var ze=O(De,L);Lc(se,ze,De.length,-1),Wt(ze)}else qr(se,"Wrong API use : tried to return a value of an unknown type ("+De+").",-1);break;default:po(se)}}function y(se,De){for(var ze=[],$e=0;$e<se;$e+=1){var et=Qt(De+4*$e,"i32"),It=mo(et);if(It===1||It===2)et=kc(et);else if(It===3)et=Sc(et);else if(It===4){It=et,et=Bc(It),It=Nc(It);for(var cn=new Uint8Array(et),Za=0;Za<et;Za+=1)cn[Za]=K[It+Za];et=cn}else et=null;ze.push(et)}return ze}function I(se,De){this.Qa=se,this.db=De,this.Oa=1,this.lb=[]}function _(se,De){if(this.db=De,De=Ge(se)+1,this.eb=ha(De),this.eb===null)throw Error("Unable to allocate memory for the SQL string");T(se,ee,this.eb,De),this.kb=this.eb,this.Za=this.pb=null}function q(se){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),se!=null){var De=this.filename,ze="/",$e=De;if(ze&&(ze=typeof ze=="string"?ze:Or(ze),$e=De?lt(ze+"/"+De):ze),De=mt(!0,!0),$e=_n($e,De),se){if(typeof se=="string"){ze=Array(se.length);for(var et=0,It=se.length;et<It;++et)ze[et]=se.charCodeAt(et);se=ze}_a($e,De|146),ze=jn($e,577),os(ze,se,0,se.length,0),wn(ze),_a($e,De)}}this.handleError(Pe(this.filename,le)),this.db=Qt(le,"i32"),yo(this.db),this.fb={},this.Sa={}}var le=Gt(4),me=A.cwrap,Pe=me("sqlite3_open","number",["string","number"]),st=me("sqlite3_close_v2","number",["number"]),rt=me("sqlite3_exec","number",["number","string","number","number","number"]),Pt=me("sqlite3_changes","number",["number"]),xa=me("sqlite3_prepare_v2","number",["number","string","number","number","number"]),cs=me("sqlite3_sql","string",["number"]),Li=me("sqlite3_normalized_sql","string",["number"]),Ri=me("sqlite3_prepare_v2","number",["number","number","number","number","number"]),Ao=me("sqlite3_bind_text","number",["number","number","number","number","number"]),ho=me("sqlite3_bind_blob","number",["number","number","number","number","number"]),Ac=me("sqlite3_bind_double","number",["number","number","number"]),hc=me("sqlite3_bind_int","number",["number","number","number"]),Zs=me("sqlite3_bind_parameter_index","number",["number","string"]),gc=me("sqlite3_step","number",["number"]),mc=me("sqlite3_errmsg","string",["number"]),pc=me("sqlite3_column_count","number",["number"]),yc=me("sqlite3_data_count","number",["number"]),Ec=me("sqlite3_column_double","number",["number","number"]),el=me("sqlite3_column_text","string",["number","number"]),bc=me("sqlite3_column_blob","number",["number","number"]),vc=me("sqlite3_column_bytes","number",["number","number"]),wc=me("sqlite3_column_type","number",["number","number"]),xc=me("sqlite3_column_name","string",["number","number"]),tl=me("sqlite3_reset","number",["number"]),Cc=me("sqlite3_clear_bindings","number",["number"]),Ic=me("sqlite3_finalize","number",["number"]),go=me("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),mo=me("sqlite3_value_type","number",["number"]),Bc=me("sqlite3_value_bytes","number",["number"]),Sc=me("sqlite3_value_text","string",["number"]),Nc=me("sqlite3_value_blob","number",["number"]),kc=me("sqlite3_value_double","number",["number"]),Tc=me("sqlite3_result_double","",["number","number"]),po=me("sqlite3_result_null","",["number"]),Dc=me("sqlite3_result_text","",["number","string","number","number"]),Lc=me("sqlite3_result_blob","",["number","number","number","number"]),Rc=me("sqlite3_result_int","",["number","number"]),qr=me("sqlite3_result_error","",["number","string","number"]),Yr=me("sqlite3_aggregate_context","number",["number","number"]),yo=me("RegisterExtensionFunctions","number",["number"]),al=me("sqlite3_update_hook","number",["number","number","number"]);I.prototype.bind=function(se){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(se)?this.Cb(se):se!=null&&typeof se=="object"?this.Db(se):!0},I.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var se=gc(this.Qa);switch(se){case 100:return!0;case 101:return!1;default:throw this.db.handleError(se)}},I.prototype.wb=function(se){return se==null&&(se=this.Oa,this.Oa+=1),Ec(this.Qa,se)},I.prototype.Gb=function(se){if(se==null&&(se=this.Oa,this.Oa+=1),se=el(this.Qa,se),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(se)},I.prototype.Hb=function(se){return se==null&&(se=this.Oa,this.Oa+=1),el(this.Qa,se)},I.prototype.getBlob=function(se){se==null&&(se=this.Oa,this.Oa+=1);var De=vc(this.Qa,se);se=bc(this.Qa,se);for(var ze=new Uint8Array(De),$e=0;$e<De;$e+=1)ze[$e]=K[se+$e];return ze},I.prototype.get=function(se,De){De=De||{},se!=null&&this.bind(se)&&this.step(),se=[];for(var ze=yc(this.Qa),$e=0;$e<ze;$e+=1)switch(wc(this.Qa,$e)){case 1:var et=De.useBigInt?this.Gb($e):this.wb($e);se.push(et);break;case 2:se.push(this.wb($e));break;case 3:se.push(this.Hb($e));break;case 4:se.push(this.getBlob($e));break;default:se.push(null)}return se},I.prototype.getColumnNames=function(){for(var se=[],De=pc(this.Qa),ze=0;ze<De;ze+=1)se.push(xc(this.Qa,ze));return se},I.prototype.getAsObject=function(se,De){se=this.get(se,De),De=this.getColumnNames();for(var ze={},$e=0;$e<De.length;$e+=1)ze[De[$e]]=se[$e];return ze},I.prototype.getSQL=function(){return cs(this.Qa)},I.prototype.getNormalizedSQL=function(){return Li(this.Qa)},I.prototype.run=function(se){return se!=null&&this.bind(se),this.step(),this.reset()},I.prototype.sb=function(se,De){De==null&&(De=this.Oa,this.Oa+=1),se=b(se);var ze=O(se,L);this.lb.push(ze),this.db.handleError(Ao(this.Qa,De,ze,se.length-1,0))},I.prototype.Bb=function(se,De){De==null&&(De=this.Oa,this.Oa+=1);var ze=O(se,L);this.lb.push(ze),this.db.handleError(ho(this.Qa,De,ze,se.length,0))},I.prototype.rb=function(se,De){De==null&&(De=this.Oa,this.Oa+=1),this.db.handleError((se===(se|0)?hc:Ac)(this.Qa,De,se))},I.prototype.Eb=function(se){se==null&&(se=this.Oa,this.Oa+=1),ho(this.Qa,se,0,0,0)},I.prototype.tb=function(se,De){switch(De==null&&(De=this.Oa,this.Oa+=1),typeof se){case"string":this.sb(se,De);return;case"number":this.rb(se,De);return;case"bigint":this.sb(se.toString(),De);return;case"boolean":this.rb(se+0,De);return;case"object":if(se===null){this.Eb(De);return}if(se.length!=null){this.Bb(se,De);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+se+")."},I.prototype.Db=function(se){var De=this;return Object.keys(se).forEach(function(ze){var $e=Zs(De.Qa,ze);$e!==0&&De.tb(se[ze],$e)}),!0},I.prototype.Cb=function(se){for(var De=0;De<se.length;De+=1)this.tb(se[De],De+1);return!0},I.prototype.reset=function(){return this.freemem(),Cc(this.Qa)===0&&tl(this.Qa)===0},I.prototype.freemem=function(){for(var se;(se=this.lb.pop())!==void 0;)Wt(se)},I.prototype.free=function(){this.freemem();var se=Ic(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,se},_.prototype.next=function(){if(this.eb===null)return{done:!0};if(this.Za!==null&&(this.Za.free(),this.Za=null),!this.db.db)throw this.mb(),Error("Database closed");var se=ja(),De=Gt(4);Ft(le),Ft(De);try{this.db.handleError(Ri(this.db.db,this.kb,-1,le,De)),this.kb=Qt(De,"i32");var ze=Qt(le,"i32");return ze===0?(this.mb(),{done:!0}):(this.Za=new I(ze,this.db),this.db.fb[ze]=this.Za,{value:this.Za,done:!1})}catch($e){throw this.pb=Oe(this.kb),this.mb(),$e}finally{Ut(se)}},_.prototype.mb=function(){Wt(this.eb),this.eb=null},_.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:Oe(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(_.prototype[Symbol.iterator]=function(){return this}),q.prototype.run=function(se,De){if(!this.db)throw"Database closed";if(De){se=this.prepare(se,De);try{se.step()}finally{se.free()}}else this.handleError(rt(this.db,se,0,0,le));return this},q.prototype.exec=function(se,De,ze){if(!this.db)throw"Database closed";var $e=ja(),et=null;try{var It=mr(se),cn=Gt(4);for(se=[];Qt(It,"i8")!==0;){Ft(le),Ft(cn),this.handleError(Ri(this.db,It,-1,le,cn));var Za=Qt(le,"i32");if(It=Qt(cn,"i32"),Za!==0){var Oa=null;for(et=new I(Za,this),De!=null&&et.bind(De);et.step();)Oa===null&&(Oa={columns:et.getColumnNames(),values:[]},se.push(Oa)),Oa.values.push(et.get(null,ze));et.free()}}return se}catch(en){throw et&&et.free(),en}finally{Ut($e)}},q.prototype.each=function(se,De,ze,$e,et){typeof De=="function"&&($e=ze,ze=De,De=void 0),se=this.prepare(se,De);try{for(;se.step();)ze(se.getAsObject(null,et))}finally{se.free()}if(typeof $e=="function")return $e()},q.prototype.prepare=function(se,De){if(Ft(le),this.handleError(xa(this.db,se,-1,le,0)),se=Qt(le,"i32"),se===0)throw"Nothing to prepare";var ze=new I(se,this);return De!=null&&ze.bind(De),this.fb[se]=ze},q.prototype.iterateStatements=function(se){return new _(se,this)},q.prototype.export=function(){Object.values(this.fb).forEach(function(De){De.free()}),Object.values(this.Sa).forEach(Ue),this.Sa={},this.handleError(st(this.db));var se=us(this.filename);return this.handleError(Pe(this.filename,le)),this.db=Qt(le,"i32"),yo(this.db),se},q.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(se){se.free()}),Object.values(this.Sa).forEach(Ue),this.Sa={},this.Ya&&(Ue(this.Ya),this.Ya=void 0),this.handleError(st(this.db)),ls("/"+this.filename),this.db=null)},q.prototype.handleError=function(se){if(se===0)return null;throw se=mc(this.db),Error(se)},q.prototype.getRowsModified=function(){return Pt(this.db)},q.prototype.create_function=function(se,De){Object.prototype.hasOwnProperty.call(this.Sa,se)&&(Ue(this.Sa[se]),delete this.Sa[se]);var ze=Fe(function($e,et,It){et=y(et,It);try{var cn=De.apply(null,et)}catch(Za){qr($e,Za,-1);return}g($e,cn)},"viii");return this.Sa[se]=ze,this.handleError(go(this.db,se,De.length,1,0,ze,0,0,0)),this},q.prototype.create_aggregate=function(se,De){var ze=De.init||function(){return null},$e=De.finalize||function(Oa){return Oa},et=De.step;if(!et)throw"An aggregate function must have a step function in "+se;var It={};Object.hasOwnProperty.call(this.Sa,se)&&(Ue(this.Sa[se]),delete this.Sa[se]),De=se+"__finalize",Object.hasOwnProperty.call(this.Sa,De)&&(Ue(this.Sa[De]),delete this.Sa[De]);var cn=Fe(function(Oa,en,pr){var dn=Yr(Oa,1);Object.hasOwnProperty.call(It,dn)||(It[dn]=ze()),en=y(en,pr),en=[It[dn]].concat(en);try{It[dn]=et.apply(null,en)}catch(Qc){delete It[dn],qr(Oa,Qc,-1)}},"viii"),Za=Fe(function(Oa){var en=Yr(Oa,1);try{var pr=$e(It[en])}catch(dn){delete It[en],qr(Oa,dn,-1);return}g(Oa,pr),delete It[en]},"vi");return this.Sa[se]=cn,this.Sa[De]=Za,this.handleError(go(this.db,se,et.length-1,1,0,0,cn,Za,0)),this},q.prototype.updateHook=function(se){this.Ya&&(al(this.db,0,0),Ue(this.Ya),this.Ya=void 0),se&&(this.Ya=Fe(function(De,ze,$e,et,It){switch(ze){case 18:De="insert";break;case 23:De="update";break;case 9:De="delete";break;default:throw"unknown operationCode in updateHook callback: "+ze}if($e=$e?Te(ee,$e):"",et=et?Te(ee,et):"",It>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";se(De,$e,et,Number(It))},"viiiij"),al(this.db,this.Ya,0))},A.Database=q};var S={...A},k="./this.program",D=(g,y)=>{throw y},R="",N,U;if(C){var j=B0;R=__dirname+"/",U=g=>(g=xe(g)?new URL(g):g,j.readFileSync(g)),N=async g=>(g=xe(g)?new URL(g):g,j.readFileSync(g,void 0)),!A.thisProgram&&1<process.argv.length&&(k=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.exports=A,D=(g,y)=>{throw process.exitCode=g,y}}else(E||v)&&(v?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),R=R.startsWith("blob:")?"":R.slice(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1),v&&(U=g=>{var y=new XMLHttpRequest;return y.open("GET",g,!1),y.responseType="arraybuffer",y.send(null),new Uint8Array(y.response)}),N=async g=>{if(xe(g))return new Promise((I,_)=>{var q=new XMLHttpRequest;q.open("GET",g,!0),q.responseType="arraybuffer",q.onload=()=>{q.status==200||q.status==0&&q.response?I(q.response):_(q.status)},q.onerror=_,q.send(null)});var y=await fetch(g,{credentials:"same-origin"});if(y.ok)return y.arrayBuffer();throw Error(y.status+" : "+y.url)});var P=A.print||console.log.bind(console),V=A.printErr||console.error.bind(console);Object.assign(A,S),S=null,A.thisProgram&&(k=A.thisProgram);var de=A.wasmBinary,ce,Z=!1,X,K,ee,pe,ge,Ne,Ee,Y,ae,xe=g=>g.startsWith("file://");function Me(){var g=ce.buffer;A.HEAP8=K=new Int8Array(g),A.HEAP16=pe=new Int16Array(g),A.HEAPU8=ee=new Uint8Array(g),A.HEAPU16=new Uint16Array(g),A.HEAP32=ge=new Int32Array(g),A.HEAPU32=Ne=new Uint32Array(g),A.HEAPF32=Ee=new Float32Array(g),A.HEAPF64=ae=new Float64Array(g),A.HEAP64=Y=new BigInt64Array(g),A.HEAPU64=new BigUint64Array(g)}var G=0,re=null;function ye(g){var y;throw(y=A.onAbort)==null||y.call(A,g),g="Aborted("+g+")",V(g),Z=!0,new WebAssembly.RuntimeError(g+". Build with -sASSERTIONS for more info.")}var Re;async function Ve(g){if(!de)try{var y=await N(g);return new Uint8Array(y)}catch{}if(g==Re&&de)g=new Uint8Array(de);else if(U)g=U(g);else throw"both async and sync fetching of the wasm failed";return g}async function Je(g,y){try{var I=await Ve(g);return await WebAssembly.instantiate(I,y)}catch(_){V(`failed to asynchronously prepare wasm: ${_}`),ye(_)}}async function He(g){var y=Re;if(!de&&typeof WebAssembly.instantiateStreaming=="function"&&!xe(y)&&!C)try{var I=fetch(y,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(I,g)}catch(_){V(`wasm streaming compile failed: ${_}`),V("falling back to ArrayBuffer instantiation")}return Je(y,g)}class Et{constructor(y){Sa(this,"name","ExitStatus");this.message=`Program terminated with exit(${y})`,this.status=y}}var We=g=>{for(;0<g.length;)g.shift()(A)},bt=[],Kt=[],Ta=()=>{var g=A.preRun.shift();Kt.unshift(g)};function Qt(g,y="i8"){switch(y.endsWith("*")&&(y="*"),y){case"i1":return K[g];case"i8":return K[g];case"i16":return pe[g>>1];case"i32":return ge[g>>2];case"i64":return Y[g>>3];case"float":return Ee[g>>2];case"double":return ae[g>>3];case"*":return Ne[g>>2];default:ye(`invalid type for getValue: ${y}`)}}var Vt=A.noExitRuntime||!0;function Ft(g){var y="i32";switch(y.endsWith("*")&&(y="*"),y){case"i1":K[g]=0;break;case"i8":K[g]=0;break;case"i16":pe[g>>1]=0;break;case"i32":ge[g>>2]=0;break;case"i64":Y[g>>3]=BigInt(0);break;case"float":Ee[g>>2]=0;break;case"double":ae[g>>3]=0;break;case"*":Ne[g>>2]=0;break;default:ye(`invalid type for setValue: ${y}`)}}var va=typeof TextDecoder<"u"?new TextDecoder:void 0,Te=(g,y=0,I=NaN)=>{var _=y+I;for(I=y;g[I]&&!(I>=_);)++I;if(16<I-y&&g.buffer&&va)return va.decode(g.subarray(y,I));for(_="";y<I;){var q=g[y++];if(q&128){var le=g[y++]&63;if((q&224)==192)_+=String.fromCharCode((q&31)<<6|le);else{var me=g[y++]&63;q=(q&240)==224?(q&15)<<12|le<<6|me:(q&7)<<18|le<<12|me<<6|g[y++]&63,65536>q?_+=String.fromCharCode(q):(q-=65536,_+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else _+=String.fromCharCode(q)}return _},Oe=(g,y)=>g?Te(ee,g,y):"",nt=(g,y)=>{for(var I=0,_=g.length-1;0<=_;_--){var q=g[_];q==="."?g.splice(_,1):q===".."?(g.splice(_,1),I++):I&&(g.splice(_,1),I--)}if(y)for(;I;I--)g.unshift("..");return g},lt=g=>{var y=g.charAt(0)==="/",I=g.slice(-1)==="/";return(g=nt(g.split("/").filter(_=>!!_),!y).join("/"))||y||(g="."),g&&I&&(g+="/"),(y?"/":"")+g},F=g=>{var y=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(g).slice(1);return g=y[0],y=y[1],!g&&!y?".":(y&&(y=y.slice(0,-1)),g+y)},J=g=>g&&g.match(/([^\/]+|\/)\/*$/)[1],ie=()=>{if(C){var g=B0;return y=>g.randomFillSync(y)}return y=>crypto.getRandomValues(y)},ke=g=>{(ke=ie())(g)},Le=(...g)=>{for(var y="",I=!1,_=g.length-1;-1<=_&&!I;_--){if(I=0<=_?g[_]:"/",typeof I!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!I)return"";y=I+"/"+y,I=I.charAt(0)==="/"}return y=nt(y.split("/").filter(q=>!!q),!I).join("/"),(I?"/":"")+y||"."},we=[],Ge=g=>{for(var y=0,I=0;I<g.length;++I){var _=g.charCodeAt(I);127>=_?y++:2047>=_?y+=2:55296<=_&&57343>=_?(y+=4,++I):y+=3}return y},T=(g,y,I,_)=>{if(!(0<_))return 0;var q=I;_=I+_-1;for(var le=0;le<g.length;++le){var me=g.charCodeAt(le);if(55296<=me&&57343>=me){var Pe=g.charCodeAt(++le);me=65536+((me&1023)<<10)|Pe&1023}if(127>=me){if(I>=_)break;y[I++]=me}else{if(2047>=me){if(I+1>=_)break;y[I++]=192|me>>6}else{if(65535>=me){if(I+2>=_)break;y[I++]=224|me>>12}else{if(I+3>=_)break;y[I++]=240|me>>18,y[I++]=128|me>>12&63}y[I++]=128|me>>6&63}y[I++]=128|me&63}}return y[I]=0,I-q},b=(g,y)=>{var I=Array(Ge(g)+1);return g=T(g,I,0,I.length),y&&(I.length=g),I},w=[];function H(g,y){w[g]={input:[],output:[],cb:y},Ht(g,$)}var $={open(g){var y=w[g.node.rdev];if(!y)throw new _e(43);g.tty=y,g.seekable=!1},close(g){g.tty.cb.fsync(g.tty)},fsync(g){g.tty.cb.fsync(g.tty)},read(g,y,I,_){if(!g.tty||!g.tty.cb.xb)throw new _e(60);for(var q=0,le=0;le<_;le++){try{var me=g.tty.cb.xb(g.tty)}catch{throw new _e(29)}if(me===void 0&&q===0)throw new _e(6);if(me==null)break;q++,y[I+le]=me}return q&&(g.node.atime=Date.now()),q},write(g,y,I,_){if(!g.tty||!g.tty.cb.qb)throw new _e(60);try{for(var q=0;q<_;q++)g.tty.cb.qb(g.tty,y[I+q])}catch{throw new _e(29)}return _&&(g.node.mtime=g.node.ctime=Date.now()),q}},Ae={xb(){e:{if(!we.length){var g=null;if(C){var y=Buffer.alloc(256),I=0,_=process.stdin.fd;try{I=j.readSync(_,y,0,256)}catch(q){if(q.toString().includes("EOF"))I=0;else throw q}0<I&&(g=y.slice(0,I).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(g=window.prompt("Input: "),g!==null&&(g+=`
`));if(!g){g=null;break e}we=b(g,!0)}g=we.shift()}return g},qb(g,y){y===null||y===10?(P(Te(g.output)),g.output=[]):y!=0&&g.output.push(y)},fsync(g){var y;0<((y=g.output)==null?void 0:y.length)&&(P(Te(g.output)),g.output=[])},Tb(){return{Ob:25856,Qb:5,Nb:191,Pb:35387,Mb:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ub(){return 0},Vb(){return[24,80]}},be={qb(g,y){y===null||y===10?(V(Te(g.output)),g.output=[]):y!=0&&g.output.push(y)},fsync(g){var y;0<((y=g.output)==null?void 0:y.length)&&(V(Te(g.output)),g.output=[])}},Qe={Wa:null,Xa(){return Qe.createNode(null,"/",16895,0)},createNode(g,y,I,_){if((I&61440)===24576||(I&61440)===4096)throw new _e(63);return Qe.Wa||(Qe.Wa={dir:{node:{Ta:Qe.La.Ta,Ua:Qe.La.Ua,lookup:Qe.La.lookup,hb:Qe.La.hb,rename:Qe.La.rename,unlink:Qe.La.unlink,rmdir:Qe.La.rmdir,readdir:Qe.La.readdir,symlink:Qe.La.symlink},stream:{Va:Qe.Ma.Va}},file:{node:{Ta:Qe.La.Ta,Ua:Qe.La.Ua},stream:{Va:Qe.Ma.Va,read:Qe.Ma.read,write:Qe.Ma.write,ib:Qe.Ma.ib,jb:Qe.Ma.jb}},link:{node:{Ta:Qe.La.Ta,Ua:Qe.La.Ua,readlink:Qe.La.readlink},stream:{}},ub:{node:{Ta:Qe.La.Ta,Ua:Qe.La.Ua},stream:Mn}}),I=fa(g,y,I,_),Jt(I.mode)?(I.La=Qe.Wa.dir.node,I.Ma=Qe.Wa.dir.stream,I.Na={}):(I.mode&61440)===32768?(I.La=Qe.Wa.file.node,I.Ma=Qe.Wa.file.stream,I.Ra=0,I.Na=null):(I.mode&61440)===40960?(I.La=Qe.Wa.link.node,I.Ma=Qe.Wa.link.stream):(I.mode&61440)===8192&&(I.La=Qe.Wa.ub.node,I.Ma=Qe.Wa.ub.stream),I.atime=I.mtime=I.ctime=Date.now(),g&&(g.Na[y]=I,g.atime=g.mtime=g.ctime=I.atime),I},Sb(g){return g.Na?g.Na.subarray?g.Na.subarray(0,g.Ra):new Uint8Array(g.Na):new Uint8Array(0)},La:{Ta(g){var y={};return y.dev=(g.mode&61440)===8192?g.id:1,y.ino=g.id,y.mode=g.mode,y.nlink=1,y.uid=0,y.gid=0,y.rdev=g.rdev,Jt(g.mode)?y.size=4096:(g.mode&61440)===32768?y.size=g.Ra:(g.mode&61440)===40960?y.size=g.link.length:y.size=0,y.atime=new Date(g.atime),y.mtime=new Date(g.mtime),y.ctime=new Date(g.ctime),y.blksize=4096,y.blocks=Math.ceil(y.size/y.blksize),y},Ua(g,y){for(var I of["mode","atime","mtime","ctime"])y[I]!=null&&(g[I]=y[I]);y.size!==void 0&&(y=y.size,g.Ra!=y&&(y==0?(g.Na=null,g.Ra=0):(I=g.Na,g.Na=new Uint8Array(y),I&&g.Na.set(I.subarray(0,Math.min(y,g.Ra))),g.Ra=y)))},lookup(){throw Qe.vb},hb(g,y,I,_){return Qe.createNode(g,y,I,_)},rename(g,y,I){try{var _=_t(y,I)}catch{}if(_){if(Jt(g.mode))for(var q in _.Na)throw new _e(55);$a(_)}delete g.parent.Na[g.name],y.Na[I]=g,g.name=I,y.ctime=y.mtime=g.parent.ctime=g.parent.mtime=Date.now()},unlink(g,y){delete g.Na[y],g.ctime=g.mtime=Date.now()},rmdir(g,y){var I=_t(g,y),_;for(_ in I.Na)throw new _e(55);delete g.Na[y],g.ctime=g.mtime=Date.now()},readdir(g){return[".","..",...Object.keys(g.Na)]},symlink(g,y,I){return g=Qe.createNode(g,y,41471,0),g.link=I,g},readlink(g){if((g.mode&61440)!==40960)throw new _e(28);return g.link}},Ma:{read(g,y,I,_,q){var le=g.node.Na;if(q>=g.node.Ra)return 0;if(g=Math.min(g.node.Ra-q,_),8<g&&le.subarray)y.set(le.subarray(q,q+g),I);else for(_=0;_<g;_++)y[I+_]=le[q+_];return g},write(g,y,I,_,q,le){if(y.buffer===K.buffer&&(le=!1),!_)return 0;if(g=g.node,g.mtime=g.ctime=Date.now(),y.subarray&&(!g.Na||g.Na.subarray)){if(le)return g.Na=y.subarray(I,I+_),g.Ra=_;if(g.Ra===0&&q===0)return g.Na=y.slice(I,I+_),g.Ra=_;if(q+_<=g.Ra)return g.Na.set(y.subarray(I,I+_),q),_}le=q+_;var me=g.Na?g.Na.length:0;if(me>=le||(le=Math.max(le,me*(1048576>me?2:1.125)>>>0),me!=0&&(le=Math.max(le,256)),me=g.Na,g.Na=new Uint8Array(le),0<g.Ra&&g.Na.set(me.subarray(0,g.Ra),0)),g.Na.subarray&&y.subarray)g.Na.set(y.subarray(I,I+_),q);else for(le=0;le<_;le++)g.Na[q+le]=y[I+le];return g.Ra=Math.max(g.Ra,q+_),_},Va(g,y,I){if(I===1?y+=g.position:I===2&&(g.node.mode&61440)===32768&&(y+=g.node.Ra),0>y)throw new _e(28);return y},ib(g,y,I,_,q){if((g.node.mode&61440)!==32768)throw new _e(43);if(g=g.node.Na,q&2||!g||g.buffer!==K.buffer){q=!0,_=65536*Math.ceil(y/65536);var le=za(65536,_);if(le&&ee.fill(0,le,le+_),_=le,!_)throw new _e(48);g&&((0<I||I+y<g.length)&&(g.subarray?g=g.subarray(I,I+y):g=Array.prototype.slice.call(g,I,I+y)),K.set(g,_))}else q=!1,_=g.byteOffset;return{Kb:_,Ab:q}},jb(g,y,I,_){return Qe.Ma.write(g,y,0,_,I,!1),0}}},mt=(g,y)=>{var I=0;return g&&(I|=365),y&&(I|=146),I},ft=null,vt={},ot=[],ns=1,on=null,jr=!1,Jn=!0,rs={},_e=class{constructor(g){Sa(this,"name","ErrnoError");this.Pa=g}},is=class{constructor(){Sa(this,"gb",{});Sa(this,"node",null)}get flags(){return this.gb.flags}set flags(g){this.gb.flags=g}get position(){return this.gb.position}set position(g){this.gb.position=g}},Ii=class{constructor(g,y,I,_){Sa(this,"La",{});Sa(this,"Ma",{});Sa(this,"ab",null);g||(g=this),this.parent=g,this.Xa=g.Xa,this.id=ns++,this.name=y,this.mode=I,this.rdev=_,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(g){g?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(g){g?this.mode|=146:this.mode&=-147}};function wa(g,y={}){if(!g)throw new _e(44);y.nb??(y.nb=!0),g.charAt(0)==="/"||(g="//"+g);var I=0;e:for(;40>I;I++){g=g.split("/").filter(Pe=>!!Pe);for(var _=ft,q="/",le=0;le<g.length;le++){var me=le===g.length-1;if(me&&y.parent)break;if(g[le]!==".")if(g[le]==="..")q=F(q),_=_.parent;else{q=lt(q+"/"+g[le]);try{_=_t(_,g[le])}catch(Pe){if((Pe==null?void 0:Pe.Pa)===44&&me&&y.Jb)return{path:q};throw Pe}if(!_.ab||me&&!y.nb||(_=_.ab.root),(_.mode&61440)===40960&&(!me||y.$a)){if(!_.La.readlink)throw new _e(52);_=_.La.readlink(_),_.charAt(0)==="/"||(_=F(q)+"/"+_),g=_+"/"+g.slice(le+1).join("/");continue e}}}return{path:q,node:_}}throw new _e(32)}function Or(g){for(var y;;){if(g===g.parent)return g=g.Xa.zb,y?g[g.length-1]!=="/"?`${g}/${y}`:g+y:g;y=y?`${g.name}/${y}`:g.name,g=g.parent}}function Bi(g,y){for(var I=0,_=0;_<y.length;_++)I=(I<<5)-I+y.charCodeAt(_)|0;return(g+I>>>0)%on.length}function $a(g){var y=Bi(g.parent.id,g.name);if(on[y]===g)on[y]=g.bb;else for(y=on[y];y;){if(y.bb===g){y.bb=g.bb;break}y=y.bb}}function _t(g,y){var I=Jt(g.mode)?(I=Xn(g,"x"))?I:g.La.lookup?0:2:54;if(I)throw new _e(I);for(I=on[Bi(g.id,y)];I;I=I.bb){var _=I.name;if(I.parent.id===g.id&&_===y)return I}return g.La.lookup(g,y)}function fa(g,y,I,_){return g=new Ii(g,y,I,_),y=Bi(g.parent.id,g.name),g.bb=on[y],on[y]=g}function Jt(g){return(g&61440)===16384}function Fr(g){var y=["r","w","rw"][g&3];return g&512&&(y+="w"),y}function Xn(g,y){if(Jn)return 0;if(!y.includes("r")||g.mode&292){if(y.includes("w")&&!(g.mode&146)||y.includes("x")&&!(g.mode&73))return 2}else return 2;return 0}function ss(g,y){if(!Jt(g.mode))return 54;try{return _t(g,y),20}catch{}return Xn(g,"wx")}function Si(g,y,I){try{var _=_t(g,y)}catch(q){return q.Pa}if(g=Xn(g,"wx"))return g;if(I){if(!Jt(_.mode))return 54;if(_===_.parent||Or(_)==="/")return 10}else if(Jt(_.mode))return 31;return 0}function bn(g){if(!g)throw new _e(63);return g}function aa(g){if(g=ot[g],!g)throw new _e(8);return g}function Un(g,y=-1){if(g=Object.assign(new is,g),y==-1)e:{for(y=0;4096>=y;y++)if(!ot[y])break e;throw new _e(33)}return g.fd=y,ot[y]=g}function $n(g,y=-1){var I,_;return g=Un(g,y),(_=(I=g.Ma)==null?void 0:I.Rb)==null||_.call(I,g),g}function Pa(g,y,I){var _=g==null?void 0:g.Ma.Ua;g=_?g:y,_??(_=y.La.Ua),bn(_),_(g,I)}var Mn={open(g){var y,I;g.Ma=vt[g.node.rdev].Ma,(I=(y=g.Ma).open)==null||I.call(y,g)},Va(){throw new _e(70)}};function Ht(g,y){vt[g]={Ma:y}}function Ni(g,y){var I=y==="/";if(I&&ft)throw new _e(10);if(!I&&y){var _=wa(y,{nb:!1});if(y=_.path,_=_.node,_.ab)throw new _e(10);if(!Jt(_.mode))throw new _e(54)}y={type:g,Wb:{},zb:y,Ib:[]},g=g.Xa(y),g.Xa=y,y.root=g,I?ft=g:_&&(_.ab=y,_.Xa&&_.Xa.Ib.push(y))}function Ar(g,y,I){var _=wa(g,{parent:!0}).node;if(g=J(g),!g)throw new _e(28);if(g==="."||g==="..")throw new _e(20);var q=ss(_,g);if(q)throw new _e(q);if(!_.La.hb)throw new _e(63);return _.La.hb(_,g,y,I)}function _n(g,y=438){return Ar(g,y&4095|32768,0)}function Aa(g,y=511){return Ar(g,y&1023|16384,0)}function Wa(g,y,I){typeof I>"u"&&(I=y,y=438),Ar(g,y|8192,I)}function Vr(g,y){if(!Le(g))throw new _e(44);var I=wa(y,{parent:!0}).node;if(!I)throw new _e(44);y=J(y);var _=ss(I,y);if(_)throw new _e(_);if(!I.La.symlink)throw new _e(63);I.La.symlink(I,y,g)}function ki(g){var y=wa(g,{parent:!0}).node;g=J(g);var I=_t(y,g),_=Si(y,g,!0);if(_)throw new _e(_);if(!y.La.rmdir)throw new _e(63);if(I.ab)throw new _e(10);y.La.rmdir(y,g),$a(I)}function ls(g){var y=wa(g,{parent:!0}).node;if(!y)throw new _e(44);g=J(g);var I=_t(y,g),_=Si(y,g,!1);if(_)throw new _e(_);if(!y.La.unlink)throw new _e(63);if(I.ab)throw new _e(10);y.La.unlink(y,g),$a(I)}function vn(g,y){return g=wa(g,{$a:!y}).node,bn(g.La.Ta)(g)}function hr(g,y,I,_){Pa(g,y,{mode:I&4095|y.mode&-4096,ctime:Date.now(),Fb:_})}function _a(g,y){g=typeof g=="string"?wa(g,{$a:!0}).node:g,hr(null,g,y)}function Hr(g,y,I){if(Jt(y.mode))throw new _e(31);if((y.mode&61440)!==32768)throw new _e(28);var _=Xn(y,"w");if(_)throw new _e(_);Pa(g,y,{size:I,timestamp:Date.now()})}function jn(g,y,I=438){if(g==="")throw new _e(44);if(typeof y=="string"){var _={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[y];if(typeof _>"u")throw Error(`Unknown file open mode: ${y}`);y=_}if(I=y&64?I&4095|32768:0,typeof g=="object")_=g;else{var q=g.endsWith("/");g=wa(g,{$a:!(y&131072),Jb:!0}),_=g.node,g=g.path}var le=!1;if(y&64)if(_){if(y&128)throw new _e(20)}else{if(q)throw new _e(31);_=Ar(g,I|511,0),le=!0}if(!_)throw new _e(44);if((_.mode&61440)===8192&&(y&=-513),y&65536&&!Jt(_.mode))throw new _e(54);if(!le&&(q=_?(_.mode&61440)===40960?32:Jt(_.mode)&&(Fr(y)!=="r"||y&576)?31:Xn(_,Fr(y)):44))throw new _e(q);return y&512&&!le&&(q=_,q=typeof q=="string"?wa(q,{$a:!0}).node:q,Hr(null,q,0)),y&=-131713,q=Un({node:_,path:Or(_),flags:y,seekable:!0,position:0,Ma:_.Ma,Lb:[],error:!1}),q.Ma.open&&q.Ma.open(q),le&&_a(_,I&511),!A.logReadFiles||y&1||g in rs||(rs[g]=1),q}function wn(g){if(g.fd===null)throw new _e(8);g.ob&&(g.ob=null);try{g.Ma.close&&g.Ma.close(g)}catch(y){throw y}finally{ot[g.fd]=null}g.fd=null}function $t(g,y,I){if(g.fd===null)throw new _e(8);if(!g.seekable||!g.Ma.Va)throw new _e(70);if(I!=0&&I!=1&&I!=2)throw new _e(28);g.position=g.Ma.Va(g,y,I),g.Lb=[]}function Gr(g,y,I,_,q){if(0>_||0>q)throw new _e(28);if(g.fd===null)throw new _e(8);if((g.flags&2097155)===1)throw new _e(8);if(Jt(g.node.mode))throw new _e(31);if(!g.Ma.read)throw new _e(28);var le=typeof q<"u";if(!le)q=g.position;else if(!g.seekable)throw new _e(70);return y=g.Ma.read(g,y,I,_,q),le||(g.position+=y),y}function os(g,y,I,_,q){if(0>_||0>q)throw new _e(28);if(g.fd===null)throw new _e(8);if((g.flags&2097155)===0)throw new _e(8);if(Jt(g.node.mode))throw new _e(31);if(!g.Ma.write)throw new _e(28);g.seekable&&g.flags&1024&&$t(g,0,2);var le=typeof q<"u";if(!le)q=g.position;else if(!g.seekable)throw new _e(70);return y=g.Ma.write(g,y,I,_,q,void 0),le||(g.position+=y),y}function us(g){var y,I=jn(g,I||0);g=vn(g).size;var _=new Uint8Array(g);return Gr(I,_,0,g,0),y=_,wn(I),y}function jt(g,y,I){g=lt("/dev/"+g);var _=mt(!!y,!!I);jt.yb??(jt.yb=64);var q=jt.yb++<<8|0;Ht(q,{open(le){le.seekable=!1},close(){var le;(le=I==null?void 0:I.buffer)!=null&&le.length&&I(10)},read(le,me,Pe,st){for(var rt=0,Pt=0;Pt<st;Pt++){try{var xa=y()}catch{throw new _e(29)}if(xa===void 0&&rt===0)throw new _e(6);if(xa==null)break;rt++,me[Pe+Pt]=xa}return rt&&(le.node.atime=Date.now()),rt},write(le,me,Pe,st){for(var rt=0;rt<st;rt++)try{I(me[Pe+rt])}catch{throw new _e(29)}return st&&(le.node.mtime=le.node.ctime=Date.now()),rt}}),Wa(g,_,q)}var ut={};function kt(g,y,I){if(y.charAt(0)==="/")return y;if(g=g===-100?"/":aa(g).path,y.length==0){if(!I)throw new _e(44);return g}return g+"/"+y}function On(g,y){ge[g>>2]=y.dev,ge[g+4>>2]=y.mode,Ne[g+8>>2]=y.nlink,ge[g+12>>2]=y.uid,ge[g+16>>2]=y.gid,ge[g+20>>2]=y.rdev,Y[g+24>>3]=BigInt(y.size),ge[g+32>>2]=4096,ge[g+36>>2]=y.blocks;var I=y.atime.getTime(),_=y.mtime.getTime(),q=y.ctime.getTime();return Y[g+40>>3]=BigInt(Math.floor(I/1e3)),Ne[g+48>>2]=I%1e3*1e6,Y[g+56>>3]=BigInt(Math.floor(_/1e3)),Ne[g+64>>2]=_%1e3*1e6,Y[g+72>>3]=BigInt(Math.floor(q/1e3)),Ne[g+80>>2]=q%1e3*1e6,Y[g+88>>3]=BigInt(y.ino),0}var Wn=void 0,na=()=>{var g=ge[+Wn>>2];return Wn+=4,g},Pr=0,Da=[0,31,60,91,121,152,182,213,244,274,305,335],Ti=[0,31,59,90,120,151,181,212,243,273,304,334],Zn={},gr=g=>{var y;X=g,Vt||0<Pr||((y=A.onExit)==null||y.call(A,g),Z=!0),D(g,new Et(g))},xn=g=>{if(!Z)try{if(g(),!(Vt||0<Pr))try{X=g=X,gr(g)}catch(y){y instanceof Et||y=="unwind"||D(1,y)}}catch(y){y instanceof Et||y=="unwind"||D(1,y)}},zr={},Di=()=>{if(!Cn){var g={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:k||"./this.program"},y;for(y in zr)zr[y]===void 0?delete g[y]:g[y]=zr[y];var I=[];for(y in g)I.push(`${y}=${g[y]}`);Cn=I}return Cn},Cn,mr=g=>{var y=Ge(g)+1,I=Gt(y);return T(g,ee,I,y),I},B=(g,y,I,_)=>{var q={string:rt=>{var Pt=0;return rt!=null&&rt!==0&&(Pt=mr(rt)),Pt},array:rt=>{var Pt=Gt(rt.length);return K.set(rt,Pt),Pt}};g=A["_"+g];var le=[],me=0;if(_)for(var Pe=0;Pe<_.length;Pe++){var st=q[I[Pe]];st?(me===0&&(me=ja()),le[Pe]=st(_[Pe])):le[Pe]=_[Pe]}return I=g(...le),I=function(rt){return me!==0&&Ut(me),y==="string"?rt?Te(ee,rt):"":y==="boolean"?!!rt:rt}(I)},L=0,O=(g,y)=>(y=y==1?Gt(g.length):ha(g.length),g.subarray||g.slice||(g=new Uint8Array(g)),ee.set(g,y),y),te,Ie=[],Be,Ue=g=>{te.delete(Be.get(g)),Be.set(g,null),Ie.push(g)},Fe=(g,y)=>{if(!te){te=new WeakMap;var I=Be.length;if(te)for(var _=0;_<0+I;_++){var q=Be.get(_);q&&te.set(q,_)}}if(I=te.get(g)||0)return I;if(Ie.length)I=Ie.pop();else{try{Be.grow(1)}catch(st){throw st instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":st}I=Be.length-1}try{Be.set(I,g)}catch(st){if(!(st instanceof TypeError))throw st;if(typeof WebAssembly.Function=="function"){var le=WebAssembly.Function;_={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},q={parameters:[],results:y[0]=="v"?[]:[_[y[0]]]};for(var me=1;me<y.length;++me)q.parameters.push(_[y[me]]);y=new le(q,g)}else{_=[1],q=y.slice(0,1),y=y.slice(1),me={i:127,p:127,j:126,f:125,d:124,e:111},_.push(96);var Pe=y.length;128>Pe?_.push(Pe):_.push(Pe%128|128,Pe>>7);for(le of y)_.push(me[le]);q=="v"?_.push(0):_.push(1,me[q]),y=[0,97,115,109,1,0,0,0,1],le=_.length,128>le?y.push(le):y.push(le%128|128,le>>7),y.push(..._),y.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),y=new WebAssembly.Module(new Uint8Array(y)),y=new WebAssembly.Instance(y,{e:{f:g}}).exports.f}Be.set(I,y)}return te.set(g,I),I};on=Array(4096),Ni(Qe,"/"),Aa("/tmp"),Aa("/home"),Aa("/home/web_user"),function(){Aa("/dev"),Ht(259,{read:()=>0,write:(_,q,le,me)=>me,Va:()=>0}),Wa("/dev/null",259),H(1280,Ae),H(1536,be),Wa("/dev/tty",1280),Wa("/dev/tty1",1536);var g=new Uint8Array(1024),y=0,I=()=>(y===0&&(ke(g),y=g.byteLength),g[--y]);jt("random",I),jt("urandom",I),Aa("/dev/shm"),Aa("/dev/shm/tmp")}(),function(){Aa("/proc");var g=Aa("/proc/self");Aa("/proc/self/fd"),Ni({Xa(){var y=fa(g,"fd",16895,73);return y.Ma={Va:Qe.Ma.Va},y.La={lookup(I,_){I=+_;var q=aa(I);return I={parent:null,Xa:{zb:"fake"},La:{readlink:()=>q.path},id:I+1},I.parent=I},readdir(){return Array.from(ot.entries()).filter(([,I])=>I).map(([I])=>I.toString())}},y}},"/proc/self/fd")}(),Qe.vb=new _e(44),Qe.vb.stack="<generic error, no stack>";var wt={a:(g,y,I,_)=>ye(`Assertion failed: ${g?Te(ee,g):""}, at: `+[y?y?Te(ee,y):"":"unknown filename",I,_?_?Te(ee,_):"":"unknown function"]),i:function(g,y){try{return g=g?Te(ee,g):"",_a(g,y),0}catch(I){if(typeof ut>"u"||I.name!=="ErrnoError")throw I;return-I.Pa}},L:function(g,y,I){try{if(y=y?Te(ee,y):"",y=kt(g,y),I&-8)return-28;var _=wa(y,{$a:!0}).node;return _?(g="",I&4&&(g+="r"),I&2&&(g+="w"),I&1&&(g+="x"),g&&Xn(_,g)?-2:0):-44}catch(q){if(typeof ut>"u"||q.name!=="ErrnoError")throw q;return-q.Pa}},j:function(g,y){try{var I=aa(g);return hr(I,I.node,y,!1),0}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},h:function(g){try{var y=aa(g);return Pa(y,y.node,{timestamp:Date.now(),Fb:!1}),0}catch(I){if(typeof ut>"u"||I.name!=="ErrnoError")throw I;return-I.Pa}},b:function(g,y,I){Wn=I;try{var _=aa(g);switch(y){case 0:var q=na();if(0>q)break;for(;ot[q];)q++;return $n(_,q).fd;case 1:case 2:return 0;case 3:return _.flags;case 4:return q=na(),_.flags|=q,0;case 12:return q=na(),pe[q+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(le){if(typeof ut>"u"||le.name!=="ErrnoError")throw le;return-le.Pa}},g:function(g,y){try{var I=aa(g),_=I.node,q=I.Ma.Ta;g=q?I:_,q??(q=_.La.Ta),bn(q);var le=q(g);return On(y,le)}catch(me){if(typeof ut>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},H:function(g,y){y=-9007199254740992>y||9007199254740992<y?NaN:Number(y);try{if(isNaN(y))return 61;var I=aa(g);if(0>y||(I.flags&2097155)===0)throw new _e(28);return Hr(I,I.node,y),0}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},G:function(g,y){try{if(y===0)return-28;var I=Ge("/")+1;return y<I?-68:(T("/",ee,g,y),I)}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},K:function(g,y){try{return g=g?Te(ee,g):"",On(y,vn(g,!0))}catch(I){if(typeof ut>"u"||I.name!=="ErrnoError")throw I;return-I.Pa}},C:function(g,y,I){try{return y=y?Te(ee,y):"",y=kt(g,y),Aa(y,I),0}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},J:function(g,y,I,_){try{y=y?Te(ee,y):"";var q=_&256;return y=kt(g,y,_&4096),On(I,q?vn(y,!0):vn(y))}catch(le){if(typeof ut>"u"||le.name!=="ErrnoError")throw le;return-le.Pa}},x:function(g,y,I,_){Wn=_;try{y=y?Te(ee,y):"",y=kt(g,y);var q=_?na():0;return jn(y,I,q).fd}catch(le){if(typeof ut>"u"||le.name!=="ErrnoError")throw le;return-le.Pa}},v:function(g,y,I,_){try{if(y=y?Te(ee,y):"",y=kt(g,y),0>=_)return-28;var q=wa(y).node;if(!q)throw new _e(44);if(!q.La.readlink)throw new _e(28);var le=q.La.readlink(q),me=Math.min(_,Ge(le)),Pe=K[I+me];return T(le,ee,I,_+1),K[I+me]=Pe,me}catch(st){if(typeof ut>"u"||st.name!=="ErrnoError")throw st;return-st.Pa}},u:function(g){try{return g=g?Te(ee,g):"",ki(g),0}catch(y){if(typeof ut>"u"||y.name!=="ErrnoError")throw y;return-y.Pa}},f:function(g,y){try{return g=g?Te(ee,g):"",On(y,vn(g))}catch(I){if(typeof ut>"u"||I.name!=="ErrnoError")throw I;return-I.Pa}},r:function(g,y,I){try{return y=y?Te(ee,y):"",y=kt(g,y),I===0?ls(y):I===512?ki(y):ye("Invalid flags passed to unlinkat"),0}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return-_.Pa}},q:function(g,y,I){try{y=y?Te(ee,y):"",y=kt(g,y,!0);var _=Date.now(),q,le;if(I){var me=Ne[I>>2]+4294967296*ge[I+4>>2],Pe=ge[I+8>>2];Pe==1073741823?q=_:Pe==1073741822?q=null:q=1e3*me+Pe/1e6,I+=16,me=Ne[I>>2]+4294967296*ge[I+4>>2],Pe=ge[I+8>>2],Pe==1073741823?le=_:Pe==1073741822?le=null:le=1e3*me+Pe/1e6}else le=q=_;if((le??q)!==null){g=q;var st=wa(y,{$a:!0}).node;bn(st.La.Ua)(st,{atime:g,mtime:le})}return 0}catch(rt){if(typeof ut>"u"||rt.name!=="ErrnoError")throw rt;return-rt.Pa}},m:()=>ye(""),l:()=>{Vt=!1,Pr=0},A:function(g,y){g=-9007199254740992>g||9007199254740992<g?NaN:Number(g),g=new Date(1e3*g),ge[y>>2]=g.getSeconds(),ge[y+4>>2]=g.getMinutes(),ge[y+8>>2]=g.getHours(),ge[y+12>>2]=g.getDate(),ge[y+16>>2]=g.getMonth(),ge[y+20>>2]=g.getFullYear()-1900,ge[y+24>>2]=g.getDay();var I=g.getFullYear();ge[y+28>>2]=(I%4!==0||I%100===0&&I%400!==0?Ti:Da)[g.getMonth()]+g.getDate()-1|0,ge[y+36>>2]=-(60*g.getTimezoneOffset()),I=new Date(g.getFullYear(),6,1).getTimezoneOffset();var _=new Date(g.getFullYear(),0,1).getTimezoneOffset();ge[y+32>>2]=(I!=_&&g.getTimezoneOffset()==Math.min(_,I))|0},y:function(g,y,I,_,q,le,me){q=-9007199254740992>q||9007199254740992<q?NaN:Number(q);try{if(isNaN(q))return 61;var Pe=aa(_);if((y&2)!==0&&(I&2)===0&&(Pe.flags&2097155)!==2)throw new _e(2);if((Pe.flags&2097155)===1)throw new _e(2);if(!Pe.Ma.ib)throw new _e(43);if(!g)throw new _e(28);var st=Pe.Ma.ib(Pe,g,q,y,I),rt=st.Kb;return ge[le>>2]=st.Ab,Ne[me>>2]=rt,0}catch(Pt){if(typeof ut>"u"||Pt.name!=="ErrnoError")throw Pt;return-Pt.Pa}},z:function(g,y,I,_,q,le){le=-9007199254740992>le||9007199254740992<le?NaN:Number(le);try{var me=aa(q);if(I&2){if(I=le,(me.node.mode&61440)!==32768)throw new _e(43);if(!(_&2)){var Pe=ee.slice(g,g+y);me.Ma.jb&&me.Ma.jb(me,Pe,I,y,_)}}}catch(st){if(typeof ut>"u"||st.name!=="ErrnoError")throw st;return-st.Pa}},n:(g,y)=>{if(Zn[g]&&(clearTimeout(Zn[g].id),delete Zn[g]),!y)return 0;var I=setTimeout(()=>{delete Zn[g],xn(()=>un(g,performance.now()))},y);return Zn[g]={id:I,Xb:y},0},B:(g,y,I,_)=>{var q=new Date().getFullYear(),le=new Date(q,0,1).getTimezoneOffset();q=new Date(q,6,1).getTimezoneOffset(),Ne[g>>2]=60*Math.max(le,q),ge[y>>2]=+(le!=q),y=me=>{var Pe=Math.abs(me);return`UTC${0<=me?"-":"+"}${String(Math.floor(Pe/60)).padStart(2,"0")}${String(Pe%60).padStart(2,"0")}`},g=y(le),y=y(q),q<le?(T(g,ee,I,17),T(y,ee,_,17)):(T(g,ee,_,17),T(y,ee,I,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:g=>{var y=ee.length;if(g>>>=0,2147483648<g)return!1;for(var I=1;4>=I;I*=2){var _=y*(1+.2/I);_=Math.min(_,g+100663296);e:{_=(Math.min(2147483648,65536*Math.ceil(Math.max(g,_)/65536))-ce.buffer.byteLength+65535)/65536|0;try{ce.grow(_),Me();var q=1;break e}catch{}q=void 0}if(q)return!0}return!1},E:(g,y)=>{var I=0;return Di().forEach((_,q)=>{var le=y+I;for(q=Ne[g+4*q>>2]=le,le=0;le<_.length;++le)K[q++]=_.charCodeAt(le);K[q]=0,I+=_.length+1}),0},F:(g,y)=>{var I=Di();Ne[g>>2]=I.length;var _=0;return I.forEach(q=>_+=q.length+1),Ne[y>>2]=_,0},e:function(g){try{var y=aa(g);return wn(y),0}catch(I){if(typeof ut>"u"||I.name!=="ErrnoError")throw I;return I.Pa}},p:function(g,y){try{var I=aa(g);return K[y]=I.tty?2:Jt(I.mode)?3:(I.mode&61440)===40960?7:4,pe[y+2>>1]=0,Y[y+8>>3]=BigInt(0),Y[y+16>>3]=BigInt(0),0}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return _.Pa}},w:function(g,y,I,_){try{e:{var q=aa(g);g=y;for(var le,me=y=0;me<I;me++){var Pe=Ne[g>>2],st=Ne[g+4>>2];g+=8;var rt=Gr(q,K,Pe,st,le);if(0>rt){var Pt=-1;break e}if(y+=rt,rt<st)break;typeof le<"u"&&(le+=rt)}Pt=y}return Ne[_>>2]=Pt,0}catch(xa){if(typeof ut>"u"||xa.name!=="ErrnoError")throw xa;return xa.Pa}},D:function(g,y,I,_){y=-9007199254740992>y||9007199254740992<y?NaN:Number(y);try{if(isNaN(y))return 61;var q=aa(g);return $t(q,y,I),Y[_>>3]=BigInt(q.position),q.ob&&y===0&&I===0&&(q.ob=null),0}catch(le){if(typeof ut>"u"||le.name!=="ErrnoError")throw le;return le.Pa}},I:function(g){var I;try{var y=aa(g);return(I=y.Ma)!=null&&I.fsync?y.Ma.fsync(y):0}catch(_){if(typeof ut>"u"||_.name!=="ErrnoError")throw _;return _.Pa}},t:function(g,y,I,_){try{e:{var q=aa(g);g=y;for(var le,me=y=0;me<I;me++){var Pe=Ne[g>>2],st=Ne[g+4>>2];g+=8;var rt=os(q,K,Pe,st,le);if(0>rt){var Pt=-1;break e}if(y+=rt,rt<st)break;typeof le<"u"&&(le+=rt)}Pt=y}return Ne[_>>2]=Pt,0}catch(xa){if(typeof ut>"u"||xa.name!=="ErrnoError")throw xa;return xa.Pa}},k:gr},je;(async function(){var I;function g(_){var q;return je=_.exports,ce=je.M,Me(),Be=je.O,G--,(q=A.monitorRunDependencies)==null||q.call(A,G),G==0&&re&&(_=re,re=null,_()),je}G++,(I=A.monitorRunDependencies)==null||I.call(A,G);var y={a:wt};return A.instantiateWasm?new Promise(_=>{A.instantiateWasm(y,(q,le)=>{g(q),_(q.exports)})}):(Re??(Re=A.locateFile?A.locateFile("sql-wasm.wasm",R):R+"sql-wasm.wasm"),g((await He(y)).instance))})(),A._sqlite3_free=g=>(A._sqlite3_free=je.P)(g),A._sqlite3_value_text=g=>(A._sqlite3_value_text=je.Q)(g),A._sqlite3_prepare_v2=(g,y,I,_,q)=>(A._sqlite3_prepare_v2=je.R)(g,y,I,_,q),A._sqlite3_step=g=>(A._sqlite3_step=je.S)(g),A._sqlite3_reset=g=>(A._sqlite3_reset=je.T)(g),A._sqlite3_exec=(g,y,I,_,q)=>(A._sqlite3_exec=je.U)(g,y,I,_,q),A._sqlite3_finalize=g=>(A._sqlite3_finalize=je.V)(g),A._sqlite3_column_name=(g,y)=>(A._sqlite3_column_name=je.W)(g,y),A._sqlite3_column_text=(g,y)=>(A._sqlite3_column_text=je.X)(g,y),A._sqlite3_column_type=(g,y)=>(A._sqlite3_column_type=je.Y)(g,y),A._sqlite3_errmsg=g=>(A._sqlite3_errmsg=je.Z)(g),A._sqlite3_clear_bindings=g=>(A._sqlite3_clear_bindings=je._)(g),A._sqlite3_value_blob=g=>(A._sqlite3_value_blob=je.$)(g),A._sqlite3_value_bytes=g=>(A._sqlite3_value_bytes=je.aa)(g),A._sqlite3_value_double=g=>(A._sqlite3_value_double=je.ba)(g),A._sqlite3_value_int=g=>(A._sqlite3_value_int=je.ca)(g),A._sqlite3_value_type=g=>(A._sqlite3_value_type=je.da)(g),A._sqlite3_result_blob=(g,y,I,_)=>(A._sqlite3_result_blob=je.ea)(g,y,I,_),A._sqlite3_result_double=(g,y)=>(A._sqlite3_result_double=je.fa)(g,y),A._sqlite3_result_error=(g,y,I)=>(A._sqlite3_result_error=je.ga)(g,y,I),A._sqlite3_result_int=(g,y)=>(A._sqlite3_result_int=je.ha)(g,y),A._sqlite3_result_int64=(g,y)=>(A._sqlite3_result_int64=je.ia)(g,y),A._sqlite3_result_null=g=>(A._sqlite3_result_null=je.ja)(g),A._sqlite3_result_text=(g,y,I,_)=>(A._sqlite3_result_text=je.ka)(g,y,I,_),A._sqlite3_aggregate_context=(g,y)=>(A._sqlite3_aggregate_context=je.la)(g,y),A._sqlite3_column_count=g=>(A._sqlite3_column_count=je.ma)(g),A._sqlite3_data_count=g=>(A._sqlite3_data_count=je.na)(g),A._sqlite3_column_blob=(g,y)=>(A._sqlite3_column_blob=je.oa)(g,y),A._sqlite3_column_bytes=(g,y)=>(A._sqlite3_column_bytes=je.pa)(g,y),A._sqlite3_column_double=(g,y)=>(A._sqlite3_column_double=je.qa)(g,y),A._sqlite3_bind_blob=(g,y,I,_,q)=>(A._sqlite3_bind_blob=je.ra)(g,y,I,_,q),A._sqlite3_bind_double=(g,y,I)=>(A._sqlite3_bind_double=je.sa)(g,y,I),A._sqlite3_bind_int=(g,y,I)=>(A._sqlite3_bind_int=je.ta)(g,y,I),A._sqlite3_bind_text=(g,y,I,_,q)=>(A._sqlite3_bind_text=je.ua)(g,y,I,_,q),A._sqlite3_bind_parameter_index=(g,y)=>(A._sqlite3_bind_parameter_index=je.va)(g,y),A._sqlite3_sql=g=>(A._sqlite3_sql=je.wa)(g),A._sqlite3_normalized_sql=g=>(A._sqlite3_normalized_sql=je.xa)(g),A._sqlite3_changes=g=>(A._sqlite3_changes=je.ya)(g),A._sqlite3_close_v2=g=>(A._sqlite3_close_v2=je.za)(g),A._sqlite3_create_function_v2=(g,y,I,_,q,le,me,Pe,st)=>(A._sqlite3_create_function_v2=je.Aa)(g,y,I,_,q,le,me,Pe,st),A._sqlite3_update_hook=(g,y,I)=>(A._sqlite3_update_hook=je.Ba)(g,y,I),A._sqlite3_open=(g,y)=>(A._sqlite3_open=je.Ca)(g,y);var ha=A._malloc=g=>(ha=A._malloc=je.Da)(g),Wt=A._free=g=>(Wt=A._free=je.Ea)(g);A._RegisterExtensionFunctions=g=>(A._RegisterExtensionFunctions=je.Fa)(g);var za=(g,y)=>(za=je.Ga)(g,y),un=(g,y)=>(un=je.Ha)(g,y),Ut=g=>(Ut=je.Ia)(g),Gt=g=>(Gt=je.Ja)(g),ja=()=>(ja=je.Ka)();A.stackSave=()=>ja(),A.stackRestore=g=>Ut(g),A.stackAlloc=g=>Gt(g),A.cwrap=(g,y,I,_)=>{var q=!I||I.every(le=>le==="number"||le==="boolean");return y!=="string"&&q&&!_?A["_"+g]:(...le)=>B(g,y,I,le)},A.addFunction=Fe,A.removeFunction=Ue,A.UTF8ToString=Oe,A.ALLOC_NORMAL=L,A.allocate=O,A.allocateUTF8OnStack=mr;function ra(){function g(){var q;if(A.calledRun=!0,!Z){if(!A.noFSInit&&!jr){var y,I;jr=!0,_??(_=A.stdin),y??(y=A.stdout),I??(I=A.stderr),_?jt("stdin",_):Vr("/dev/tty","/dev/stdin"),y?jt("stdout",null,y):Vr("/dev/tty","/dev/stdout"),I?jt("stderr",null,I):Vr("/dev/tty1","/dev/stderr"),jn("/dev/stdin",0),jn("/dev/stdout",1),jn("/dev/stderr",1)}if(je.N(),Jn=!1,(q=A.onRuntimeInitialized)==null||q.call(A),A.postRun)for(typeof A.postRun=="function"&&(A.postRun=[A.postRun]);A.postRun.length;){var _=A.postRun.shift();bt.unshift(_)}We(bt)}}if(0<G)re=ra;else{if(A.preRun)for(typeof A.preRun=="function"&&(A.preRun=[A.preRun]);A.preRun.length;)Ta();We(Kt),0<G?re=ra:A.setStatus?(A.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>A.setStatus(""),1),g()},1)):g()}}if(A.preInit)for(typeof A.preInit=="function"&&(A.preInit=[A.preInit]);0<A.preInit.length;)A.preInit.pop()();return ra(),d}),r)};n.exports=s,n.exports.default=s}(_f)),_f.exports}var Bx=Ix();const Sx=Ci(Bx);var N0=`
\uFEFFCREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    "ProductVersion" TEXT NOT NULL
);

BEGIN TRANSACTION;
CREATE TABLE "Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "Gender" VARCHAR NULL,
    "FirstName" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "BirthDate" TEXT NOT NULL,
    "AddressStreet" VARCHAR NULL,
    "AddressCity" VARCHAR NULL,
    "AddressState" VARCHAR NULL,
    "AddressZipCode" VARCHAR NULL,
    "AddressCountry" VARCHAR NULL,
    "Hobbies" TEXT NULL,
    "EmailPrefix" TEXT NULL,
    "PhoneMobile" TEXT NULL,
    "BankAccountIBAN" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

CREATE TABLE "Services" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Services" PRIMARY KEY,
    "Name" TEXT NULL,
    "Url" TEXT NULL,
    "Logo" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

CREATE TABLE "Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "Username" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "ServiceId" TEXT NOT NULL,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Attachment" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachment" PRIMARY KEY,
    "Filename" TEXT NOT NULL,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    CONSTRAINT "FK_Attachment_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Passwords" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passwords" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    CONSTRAINT "FK_Passwords_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_Attachment_CredentialId" ON "Attachment" ("CredentialId");

CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");

CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");

CREATE INDEX "IX_Passwords_CredentialId" ON "Passwords" ("CredentialId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240708094944_1.0.0-InitialMigration', '9.0.4');

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240708224522_1.0.1-EmptyTestMigration', '9.0.4');

ALTER TABLE "Aliases" RENAME COLUMN "EmailPrefix" TO "Email";

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240711204207_1.0.2-ChangeEmailColumn', '9.0.4');

CREATE TABLE "EncryptionKeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_EncryptionKeys" PRIMARY KEY,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "IsPrimary" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240729105618_1.1.0-AddPkiTables', '9.0.4');

CREATE TABLE "Settings" (
    "Key" TEXT NOT NULL CONSTRAINT "PK_Settings" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805073413_1.2.0-AddSettingsTable', '9.0.4');

CREATE TABLE "ef_temp_Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "BirthDate" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Email" TEXT NULL,
    "FirstName" VARCHAR NULL,
    "Gender" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "ef_temp_Aliases" ("Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt")
SELECT "Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt"
FROM "Aliases";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Aliases";

ALTER TABLE "ef_temp_Aliases" RENAME TO "Aliases";

COMMIT;

PRAGMA foreign_keys = 1;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805122422_1.3.0-UpdateIdentityStructure', '9.0.4');

BEGIN TRANSACTION;
CREATE TABLE "ef_temp_Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "ServiceId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "Username" TEXT NULL,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Credentials" ("Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username")
SELECT "Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username"
FROM "Credentials";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Credentials";

ALTER TABLE "ef_temp_Credentials" RENAME TO "Credentials";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");

CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240812141727_1.3.1-MakeUsernameOptional', '9.0.4');

BEGIN TRANSACTION;
ALTER TABLE "Settings" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Services" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Passwords" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "EncryptionKeys" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Credentials" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Attachment" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Aliases" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240916105320_1.4.0-AddSyncSupport', '9.0.4');

ALTER TABLE "Attachment" RENAME TO "Attachments";

CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Attachments" ("Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt")
SELECT "Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt"
FROM "Attachments";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240917191243_1.4.1-RenameAttachmentsPlural', '9.0.4');

BEGIN TRANSACTION;
CREATE TABLE "TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20250310131554_1.5.0-AddTotpCodes', '9.0.4');

COMMIT;
`,k0={1:`\uFEFFBEGIN TRANSACTION;
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240708224522_1.0.1-EmptyTestMigration', '9.0.4');

COMMIT;`,2:`\uFEFFBEGIN TRANSACTION;
ALTER TABLE "Aliases" RENAME COLUMN "EmailPrefix" TO "Email";

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240711204207_1.0.2-ChangeEmailColumn', '9.0.4');

COMMIT;`,3:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "EncryptionKeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_EncryptionKeys" PRIMARY KEY,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "IsPrimary" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240729105618_1.1.0-AddPkiTables', '9.0.4');

COMMIT;`,4:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "Settings" (
    "Key" TEXT NOT NULL CONSTRAINT "PK_Settings" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805073413_1.2.0-AddSettingsTable', '9.0.4');

COMMIT;`,5:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "ef_temp_Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "BirthDate" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Email" TEXT NULL,
    "FirstName" VARCHAR NULL,
    "Gender" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "ef_temp_Aliases" ("Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt")
SELECT "Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt"
FROM "Aliases";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Aliases";

ALTER TABLE "ef_temp_Aliases" RENAME TO "Aliases";

COMMIT;

PRAGMA foreign_keys = 1;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805122422_1.3.0-UpdateIdentityStructure', '9.0.4');`,6:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "ef_temp_Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "ServiceId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "Username" TEXT NULL,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Credentials" ("Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username")
SELECT "Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username"
FROM "Credentials";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Credentials";

ALTER TABLE "ef_temp_Credentials" RENAME TO "Credentials";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");

CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240812141727_1.3.1-MakeUsernameOptional', '9.0.4');`,7:`\uFEFFBEGIN TRANSACTION;
ALTER TABLE "Settings" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Services" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Passwords" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "EncryptionKeys" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Credentials" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Attachment" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Aliases" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240916105320_1.4.0-AddSyncSupport', '9.0.4');

COMMIT;`,8:`\uFEFFBEGIN TRANSACTION;
ALTER TABLE "Attachment" RENAME TO "Attachments";

CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Attachments" ("Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt")
SELECT "Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt"
FROM "Attachments";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240917191243_1.4.1-RenameAttachmentsPlural', '9.0.4');`,9:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20250310131554_1.5.0-AddTotpCodes', '9.0.4');

COMMIT;`},Ya=[{revision:1,version:"1.0.0",description:"Initial Migration",releaseVersion:"0.1.0"},{revision:2,version:"1.0.1",description:"Empty Test Migration",releaseVersion:"0.2.0"},{revision:3,version:"1.0.2",description:"Change Email Column",releaseVersion:"0.3.0"},{revision:4,version:"1.1.0",description:"Add Pki Tables",releaseVersion:"0.4.0"},{revision:5,version:"1.2.0",description:"Add Settings Table",releaseVersion:"0.4.0"},{revision:6,version:"1.3.0",description:"Update Identity Structure",releaseVersion:"0.5.0"},{revision:7,version:"1.3.1",description:"Make Username Optional",releaseVersion:"0.5.0"},{revision:8,version:"1.4.0",description:"Add Sync Support",releaseVersion:"0.6.0"},{revision:9,version:"1.4.1",description:"Rename Attachments Plural",releaseVersion:"0.6.0"},{revision:10,version:"1.5.0",description:"Add 2FA Tokens to credentials",releaseVersion:"0.14.0"}],fA=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[N0],version:Ya[Ya.length-1].version,migrationNumber:Ya[Ya.length-1].revision}}catch(n){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:n instanceof Error?n.message:"Unknown error creating vault SQL"}}}getUpgradeVaultSql(n,a){try{const r=a??Ya[Ya.length-1].revision,s=Ya.find(c=>c.revision===r);if(!s)return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target migration number ${r} not found`};if(n>=r)return{success:!0,sqlCommands:[],version:s.version,migrationNumber:r};const o=Ya.filter(c=>c.revision>n&&c.revision<=r),u=[];for(const c of o){const d=c.revision-1,p=k0[d];p&&u.push(p)}return{success:!0,sqlCommands:u,version:s.version,migrationNumber:r}}catch(r){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:r instanceof Error?r.message:"Unknown error generating upgrade SQL"}}}getUpgradeToLatestSql(n){return this.getUpgradeVaultSql(n)}getUpgradeToVersionSql(n,a){const r=Ya.find(s=>s.version===a);return r?this.getUpgradeVaultSql(n,r.revision):{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target version ${a} not found`}}getVersionCheckSql(){return["SELECT name FROM sqlite_master WHERE type='table' AND name='Settings';","SELECT Value FROM Settings WHERE Key = 'vault_version' AND IsDeleted = 0 LIMIT 1;","SELECT Value FROM Settings WHERE Key = 'vault_migration_number' AND IsDeleted = 0 LIMIT 1;"]}getVaultValidationSql(){return`SELECT name FROM sqlite_master WHERE type='table' AND name IN
            ('Aliases', 'Services', 'Credentials', 'Passwords', 'Attachments', 'EncryptionKeys', 'Settings', 'TotpCodes');`}parseVaultVersionInfo(n,a,r){let s="0.0.0",o=0;n&&(a?s=a:(s="1.0.0",o=1),r&&(o=parseInt(r,10)));const u=Ya[Ya.length-1],c=o<u.revision,d=Ya.filter(p=>p.revision>o);return{currentVersion:s,currentMigrationNumber:o,targetVersion:u.version,targetMigrationNumber:u.revision,needsUpgrade:c,availableUpgrades:d}}validateVaultStructure(n){const a=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return n.filter(s=>a.includes(s)).length>=5}getAllVersions(){return[...Ya]}getLatestVersion(){return Ya[Ya.length-1]}getMigrationSql(n){return k0[n]}getCompleteSchemaSql(){return N0}};const T0="UklGRjoEAABXRUJQVlA4IC4EAAAwFwCdASqAAIAAPpFCm0olo6Ihp5IraLASCWUA0eb/0s56RrLtCnYfLPiBshdXWMx8j1Ez65f169iA4xUDBTEV6ylMQeCIj2b7RngGi7gKZ9WjKdSoy9R8JcgOmjCMlDmLG20KhNo/i/Dc/Ah5GAvGfm8kfniV3AkR6fxN6eKwjDc6xrDgSfS48G5uGV6WzQt24YAVlLSK9BMwndzfHnePK1KFchFrL7O3ulB8cGNCeomu4o+l0SrS/JKblJ4WTzj0DAD++lCUEouSfgRKdiV2TiYCD+H+l3tANKSPQFPQuzi7rbvxqGeRmXB9kDwURaoSTTpYjA9REMUi9uA6aV7PWtBNXgUzMLowYMZeos6Xvyhb34GmufswMHA5ZyYpxzjTphOak4ZjNOiz8aScO5ygiTx99SqwX/uL+HSeVOSraHw8IymrMwm+jLxqN8BS8dGcItLlm/ioulqH2j4V8glDgSut+ExkxiD7m8TGPrrjCQNJbRDzpOFsyCyfBZupvp8QjGKW2KGziSZeIWes4aTB9tRmeEBhnUrmTDZQuXcc67Fg82KHrSfaeeOEq6jjuUjQ8wUnzM4Zz3dhrwSyslVz/WvnKqYkr4V/TTXPFF5EjF4rM1bHZ8bK63EfTnK41+n3n4gEFoYP4mXkNH0hntnYcdTqiE7Gn+q0BpRRxnkpBSZlA6Wa70jpW0FGqkw5e591A5/H+OV+60WAo+4Mi+NlsKrvLZ9EiVaPnoEFZlJQx1fA777AJ2MjXJ4KSsrWDWJi1lE8yPs8V6XvcC0chDTYt8456sKXAagCZyY+fzQriFMaddXyKQdG8qBqcdYjAsiIcjzaRFBBoOK9sU+sFY7N6B6+xtrlu3c37rQKkI3O2EoiJOris54EjJ5OFuumA0M6riNUuBf/MEPFBVx1JRcUEs+upEBsCnwYski7FT3TTqHrx7v5AjgFN97xhPTkmVpu6sxRnWBi1fxIRp8eWZeFM6mUcGgVk1WeVb1yhdV9hoMo2TsNEPE0tHo/wvuSJSzbZo7wibeXM9v/rRfKcx7X93rfiXVnyQ9f/5CaAQ4lxedPp/6uzLtOS4FyL0bCNeZ6L5w+AiuyWCTDFIYaUzhwfG+/YTQpWyeZCdQIKzhV+3GeXI2cxoP0ER/DlOKymf1gm+zRU3sqf1lBVQ0y+mK/Awl9bS3uaaQmI0FUyUwHUKP7PKuXnO+LcwDv4OfPT6hph8smc1EtMe5ib/apar/qZ9dyaEaElALJ1KKxnHziuvVl8atk1fINSQh7OtXDyqbPw9o/nGIpTnv5iFmwmWJLis2oyEgPkJqyx0vYI8rjkVEzKc8eQavAJBYSpjMwM193Swt+yJyjvaGYWPnqExxKiNarpB2WSO7soCAZXhS1uEYHryrK47BH6W1dRiruqT0xpLih3MXiwU3VDwAAAA==";class Hu{constructor(){Sa(this,"db",null);Sa(this,"isInTransaction",!1)}async initializeFromBase64(a){try{const r=atob(a),s=new Uint8Array(r.length);for(let u=0;u<r.length;u++)s[u]=r.charCodeAt(u);const o=await Sx({locateFile:u=>`src/${u}`});this.db=new o.Database(s)}catch(r){throw console.error("Error initializing SQLite database:",r),r}}beginTransaction(){if(!this.db)throw new Error("Database not initialized");if(this.isInTransaction)throw new Error("Transaction already in progress");try{this.db.run("BEGIN TRANSACTION"),this.isInTransaction=!0}catch(a){throw console.error("Error beginning transaction:",a),a}}async commitTransaction(){if(!this.db)throw new Error("Database not initialized");if(!this.isInTransaction)throw new Error("No transaction in progress");try{this.db.run("COMMIT"),this.isInTransaction=!1}catch(a){throw console.error("Error committing transaction:",a),a}}rollbackTransaction(){if(!this.db)throw new Error("Database not initialized");if(!this.isInTransaction)throw new Error("No transaction in progress");try{this.db.run("ROLLBACK"),this.isInTransaction=!1}catch(a){throw console.error("Error rolling back transaction:",a),a}}exportToBase64(){if(!this.db)throw new Error("Database not initialized");try{const a=this.db.export();let r="";for(let s=0;s<a.length;s++)r+=String.fromCharCode(a[s]);return btoa(r)}catch(a){throw console.error("Error exporting SQLite database:",a),a}}executeQuery(a,r=[]){if(!this.db)throw new Error("Database not initialized");try{const s=this.db.prepare(a);s.bind(r);const o=[];for(;s.step();)o.push(s.getAsObject());return s.free(),o}catch(s){throw console.error("Error executing query:",s),s}}executeUpdate(a,r=[]){if(!this.db)throw new Error("Database not initialized");try{const s=this.db.prepare(a);s.bind(r),s.step();const o=this.db.getRowsModified();return s.free(),o}catch(s){throw console.error("Error executing update:",s),s}}close(){this.db&&(this.db.close(),this.db=null)}getCredentialById(a){const s=this.executeQuery(`
        SELECT DISTINCT
            c.Id,
            c.Username,
            c.Notes,
            c.ServiceId,
            s.Name as ServiceName,
            s.Url as ServiceUrl,
            s.Logo as Logo,
            a.FirstName,
            a.LastName,
            a.NickName,
            a.BirthDate,
            a.Gender,
            a.Email,
            p.Value as Password
        FROM Credentials c
        LEFT JOIN Services s ON c.ServiceId = s.Id
        LEFT JOIN Aliases a ON c.AliasId = a.Id
        LEFT JOIN Passwords p ON p.CredentialId = c.Id
        WHERE c.IsDeleted = 0
        AND c.Id = ?`,[a]);if(s.length===0)return null;const o=s[0];return{Id:o.Id,Username:o.Username,Password:o.Password,ServiceName:o.ServiceName,ServiceUrl:o.ServiceUrl,Logo:o.Logo,Notes:o.Notes,Alias:{FirstName:o.FirstName,LastName:o.LastName,NickName:o.NickName,BirthDate:o.BirthDate,Gender:o.Gender,Email:o.Email}}}getAllCredentials(){return this.executeQuery(`
            SELECT DISTINCT
                c.Id,
                c.Username,
                c.Notes,
                c.ServiceId,
                s.Name as ServiceName,
                s.Url as ServiceUrl,
                s.Logo as Logo,
                a.FirstName,
                a.LastName,
                a.NickName,
                a.BirthDate,
                a.Gender,
                a.Email,
                p.Value as Password
            FROM Credentials c
            LEFT JOIN Services s ON c.ServiceId = s.Id
            LEFT JOIN Aliases a ON c.AliasId = a.Id
            LEFT JOIN Passwords p ON p.CredentialId = c.Id
            WHERE c.IsDeleted = 0
            ORDER BY c.CreatedAt DESC`).map(s=>({Id:s.Id,Username:s.Username,Password:s.Password,ServiceName:s.ServiceName,ServiceUrl:s.ServiceUrl,Logo:s.Logo,Notes:s.Notes,Alias:{FirstName:s.FirstName,LastName:s.LastName,NickName:s.NickName,BirthDate:s.BirthDate,Gender:s.Gender,Email:s.Email}}))}getAllEmailAddresses(){return this.executeQuery(`
      SELECT DISTINCT
        a.Email
      FROM Credentials c
      LEFT JOIN Aliases a ON c.AliasId = a.Id
      WHERE a.Email IS NOT NULL AND a.Email != '' AND c.IsDeleted = 0
    `).map(s=>s.Email)}getAllEncryptionKeys(){return this.executeQuery(`SELECT
                x.PublicKey,
                x.PrivateKey,
                x.IsPrimary
            FROM EncryptionKeys x`)}getSetting(a,r=""){const s=this.executeQuery(`SELECT
                s.Value
            FROM Settings s
            WHERE s.Key = ?`,[a]);return s.length>0?s[0].Value:r}getDefaultEmailDomain(a,r){const s=this.getSetting("DefaultEmailDomain"),o=d=>!!(d&&d!=="DISABLED.TLD"&&d!==""&&(a.includes(d)||r.includes(d)));if(s&&o(s))return s;const u=a.find(o);if(u)return u;const c=r.find(o);return c||null}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage","en")}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getPasswordSettings(){const a=this.getSetting("PasswordGenerationSettings"),r={Length:18,UseLowercase:!0,UseUppercase:!0,UseNumbers:!0,UseSpecialChars:!0,UseNonAmbiguousChars:!1};try{if(a)return{...r,...JSON.parse(a)}}catch(s){console.warn("Failed to parse password settings:",s)}return r}async createCredential(a,r){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();let s=null;try{if(a.Logo)if(typeof a.Logo=="object"&&!ArrayBuffer.isView(a.Logo)){const v=Object.values(a.Logo);s=new Uint8Array(v)}else(Array.isArray(a.Logo)||a.Logo instanceof ArrayBuffer||a.Logo instanceof Uint8Array)&&(s=new Uint8Array(a.Logo))}catch(v){console.warn("Failed to convert logo to Uint8Array:",v),s=null}const o=`
                INSERT INTO Services (Id, Name, Url, Logo, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?)`,u=crypto.randomUUID().toUpperCase(),c=new Date().toISOString().replace("T"," ").replace("Z","").substring(0,23);this.executeUpdate(o,[u,a.ServiceName,a.ServiceUrl??null,s,c,c,0]);const d=`
                INSERT INTO Aliases (Id, FirstName, LastName, NickName, BirthDate, Gender, Email, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,p=crypto.randomUUID().toUpperCase();this.executeUpdate(d,[p,a.Alias.FirstName??null,a.Alias.LastName??null,a.Alias.NickName??null,a.Alias.BirthDate??null,a.Alias.Gender??null,a.Alias.Email??null,c,c,0]);const A=`
                INSERT INTO Credentials (Id, Username, Notes, ServiceId, AliasId, CreatedAt, UpdatedAt, IsDeleted)
                VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,E=crypto.randomUUID().toUpperCase();if(this.executeUpdate(A,[E,a.Username??null,a.Notes??null,u,p,c,c,0]),a.Password){const v=`
                    INSERT INTO Passwords (Id, Value, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
                    VALUES (?, ?, ?, ?, ?, ?)`,C=crypto.randomUUID().toUpperCase();this.executeUpdate(v,[C,a.Password,E,c,c,0])}if(r)for(const v of r){const C=`
            INSERT INTO Attachments (Id, Filename, Blob, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
            VALUES (?, ?, ?, ?, ?, ?, ?)`,S=crypto.randomUUID().toUpperCase();this.executeUpdate(C,[S,v.Filename,v.Blob,E,c,c,0])}return await this.commitTransaction(),E}catch(s){throw this.rollbackTransaction(),console.error("Error creating credential:",s),s}}getDatabaseVersion(){if(!this.db)throw new Error("Database not initialized");try{const a=this.executeQuery(`
        SELECT MigrationId
        FROM __EFMigrationsHistory
        ORDER BY MigrationId DESC
        LIMIT 1`);if(a.length===0)throw new Error("No migrations found in the database.");const r=a[0].MigrationId,o=/_(\d+\.\d+\.\d+)-/.exec(r);let u=null;o!=null&&o[1]&&(u=o[1]);const p=new fA().getAllVersions().find(A=>A.version===u);if(!p)throw new Error("This browser extension is outdated and cannot be used to access this vault. Please update this browser extension to continue.");return p}catch(a){throw console.error("Error getting database version:",a),a}}async getLatestDatabaseVersion(){const r=new fA().getAllVersions();return r[r.length-1]}async hasPendingMigrations(){try{const a=this.getDatabaseVersion(),r=await this.getLatestDatabaseVersion();return a.revision<r.revision}catch(a){throw console.error("Error checking pending migrations:",a),a}}getTotpCodesForCredential(a){if(!this.db)throw new Error("Database not initialized");try{return this.tableExists("TotpCodes")?this.executeQuery(`
        SELECT
          Id,
          Name,
          SecretKey,
          CredentialId
        FROM TotpCodes
        WHERE CredentialId = ? AND IsDeleted = 0`,[a]):[]}catch(r){return console.error("Error getting TOTP codes:",r),[]}}getAttachmentsForCredential(a){if(!this.db)throw new Error("Database not initialized");try{return this.tableExists("Attachments")?this.executeQuery(`
        SELECT
          Id,
          Filename,
          Blob,
          CredentialId,
          CreatedAt,
          UpdatedAt,
          IsDeleted
        FROM Attachments
        WHERE CredentialId = ? AND IsDeleted = 0`,[a]):[]}catch(r){return console.error("Error getting attachments:",r),[]}}async deleteCredentialById(a){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const r=new Date().toISOString().replace("T"," ").replace("Z","").substring(0,23),s=`
        UPDATE Credentials
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = ?`,o=`
        UPDATE Aliases
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = (
          SELECT AliasId
          FROM Credentials
          WHERE Id = ?
        )`,u=`
        UPDATE Services
        SET IsDeleted = 1,
            UpdatedAt = ?
        WHERE Id = (
          SELECT ServiceId
          FROM Credentials
          WHERE Id = ?
        )`,c=this.executeUpdate(s,[r,a]);return this.executeUpdate(o,[r,a]),this.executeUpdate(u,[r,a]),await this.commitTransaction(),c}catch(r){throw this.rollbackTransaction(),console.error("Error deleting credential:",r),r}}async updateCredentialById(a,r,s){if(!this.db)throw new Error("Database not initialized");try{this.beginTransaction();const o=new Date().toISOString().replace("T"," ").replace("Z","").substring(0,23),u=this.getCredentialById(a.Id);if(!u)throw new Error("Credential not found");const c=`
        UPDATE Services
        SET Name = ?,
            Url = ?,
            Logo = COALESCE(?, Logo),
            UpdatedAt = ?
        WHERE Id = (
          SELECT ServiceId
          FROM Credentials
          WHERE Id = ?
        )`;let d=null;try{if(a.Logo)if(typeof a.Logo=="object"&&!ArrayBuffer.isView(a.Logo)){const v=Object.values(a.Logo);d=new Uint8Array(v)}else(Array.isArray(a.Logo)||a.Logo instanceof ArrayBuffer||a.Logo instanceof Uint8Array)&&(d=new Uint8Array(a.Logo))}catch(v){console.warn("Failed to convert logo to Uint8Array:",v),d=null}this.executeUpdate(c,[a.ServiceName,a.ServiceUrl??null,d,o,a.Id]);const p=`
        UPDATE Aliases
        SET FirstName = ?,
            LastName = ?,
            NickName = ?,
            BirthDate = ?,
            Gender = ?,
            Email = ?,
            UpdatedAt = ?
        WHERE Id = (
          SELECT AliasId
          FROM Credentials
          WHERE Id = ?
        )`;let A=a.Alias.BirthDate;if(A&&u.Alias.BirthDate){const v=new Date(A),C=new Date(u.Alias.BirthDate);v.getTime()===C.getTime()&&(A=u.Alias.BirthDate)}if(this.executeUpdate(p,[a.Alias.FirstName??null,a.Alias.LastName??null,a.Alias.NickName??null,A??null,a.Alias.Gender??null,a.Alias.Email??null,o,a.Id]),this.executeUpdate(`
        UPDATE Credentials
        SET Username = ?,
            Notes = ?,
            UpdatedAt = ?
        WHERE Id = ?`,[a.Username??null,a.Notes??null,o,a.Id]),a.Password!==u.Password&&(this.executeQuery(`
          SELECT Id
          FROM Passwords
          WHERE CredentialId = ?`,[a.Id]).length===0?this.executeUpdate(`
            INSERT INTO Passwords (Id, Value, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
            VALUES (?, ?, ?, ?, ?, ?)`,[crypto.randomUUID().toUpperCase(),a.Password,a.Id,o,o,0]):this.executeUpdate(`
            UPDATE Passwords
            SET Value = ?, UpdatedAt = ?
            WHERE CredentialId = ?`,[a.Password,o,a.Id])),s){const v=s.map(S=>S.Id),C=r.filter(S=>!v.includes(S));for(const S of C)this.executeUpdate(`
            UPDATE Attachments
            SET IsDeleted = 1,
                UpdatedAt = ?
            WHERE Id = ?`,[o,S]);for(const S of s)r.includes(S.Id)||this.executeUpdate(`
              INSERT INTO Attachments (Id, Filename, Blob, CredentialId, CreatedAt, UpdatedAt, IsDeleted)
              VALUES (?, ?, ?, ?, ?, ?, ?)`,[S.Id,S.Filename,S.Blob,a.Id,o,o,0])}return await this.commitTransaction(),1}catch(o){throw this.rollbackTransaction(),console.error("Error updating credential:",o),o}}static imgSrcFromBytes(a){if(a)try{const r=this.toUint8Array(a),s=this.base64Encode(r);return`data:${this.detectMimeType(r)};base64,${s}`}catch(r){return console.error("Error setting logo:",r),`data:image/x-icon;base64,${T0}`}else return`data:image/x-icon;base64,${T0}`}static detectMimeType(a){const r=()=>{const u=new TextDecoder().decode(a.slice(0,5)).toLowerCase();return u.includes("<?xml")||u.includes("<svg")},s=()=>a[0]===0&&a[1]===0&&a[2]===1&&a[3]===0,o=()=>a[0]===137&&a[1]===80&&a[2]===78&&a[3]===71;return r()?"image/svg+xml":s()?"image/x-icon":o()?"image/png":"image/x-icon"}static toUint8Array(a){if(a instanceof Uint8Array)return a;if(Array.isArray(a))return new Uint8Array(a);const r=Object.keys(a).length,s=new Uint8Array(r);for(let o=0;o<r;o++)s[o]=a[o];return s}static base64Encode(a){try{const r=Array.from(this.toUint8Array(a));return btoa(r.reduce((s,o)=>s+String.fromCharCode(o),""))}catch(r){return console.error("Error encoding to base64:",r),null}}tableExists(a){if(!this.db)throw new Error("Database not initialized");try{return this.executeQuery(`
        SELECT name FROM sqlite_master
        WHERE type='table' AND name=?`,[a]).length>0}catch(r){return console.error(`Error checking if table ${a} exists:`,r),!1}}executeRaw(a){if(!this.db)throw new Error("Database not initialized");try{const r=a.split(";");for(const s of r){const o=s.trim();o.length===0||o.toUpperCase().startsWith("BEGIN TRANSACTION")||o.toUpperCase().startsWith("COMMIT")||o.toUpperCase().startsWith("ROLLBACK")||this.db.run(o)}}catch(r){throw console.error("Error executing raw SQL:",r),r}}}const py=Q.createContext(void 0),Nx=({children:n})=>{const[a,r]=Q.useState(null),[s,o]=Q.useState(!1),[u,c]=Q.useState(!1),[d,p]=Q.useState(null),A=Q.useCallback(async(U,j)=>{const P=await qt.symmetricDecrypt(U.vault.blob,j),V=new Hu;await V.initializeFromBase64(P),r(V),o(!0),c(!0),p({publicEmailDomains:U.vault.publicEmailDomainList,privateEmailDomains:U.vault.privateEmailDomainList,vaultRevisionNumber:U.vault.currentRevisionNumber});const de={vaultBlob:U.vault.blob,publicEmailDomainList:U.vault.publicEmailDomainList,privateEmailDomainList:U.vault.privateEmailDomainList,vaultRevisionNumber:U.vault.currentRevisionNumber};return await ta("STORE_VAULT",de,"background"),V},[]),E=Q.useCallback(async()=>{try{const U=await ta("GET_VAULT",{},"background");if(U!=null&&U.vault){const j=new Hu;await j.initializeFromBase64(U.vault),r(j),o(!0),c(!0),p({publicEmailDomains:U.publicEmailDomains??[],privateEmailDomains:U.privateEmailDomains??[],vaultRevisionNumber:U.vaultRevisionNumber??0})}else o(!0),c(!1)}catch(U){console.error("Error retrieving vault from background:",U),o(!0),c(!1)}},[]),v=Q.useCallback(async()=>d,[d]),C=Q.useCallback(async U=>{p({publicEmailDomains:(d==null?void 0:d.publicEmailDomains)??[],privateEmailDomains:(d==null?void 0:d.privateEmailDomains)??[],vaultRevisionNumber:U})},[d]),S=Q.useCallback(async()=>a?await a.hasPendingMigrations():!1,[a]);Q.useEffect(()=>{s||E()},[s,E]);const k=Q.useCallback(async U=>{await ta("STORE_ENCRYPTION_KEY",U,"background")},[]),D=Q.useCallback(async U=>{await ta("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",U,"background")},[]),R=Q.useCallback(()=>{r(null),o(!1),c(!1),ta("CLEAR_VAULT",{},"background")},[]),N=Q.useMemo(()=>({sqliteClient:a,dbInitialized:s,dbAvailable:u,initializeDatabase:A,storeEncryptionKey:k,storeEncryptionKeyDerivationParams:D,clearDatabase:R,getVaultMetadata:v,setCurrentVaultRevisionNumber:C,hasPendingMigrations:S}),[a,s,u,A,k,D,R,v,C,S]);return h.jsx(py.Provider,{value:N,children:n})},ka=()=>{const n=Q.useContext(py);if(n===void 0)throw new Error("useDb must be used within a DbProvider");return n},Qu="local:aliasvault_disabled_sites",Gu="local:aliasvault_global_autofill_popup_enabled",D0="local:aliasvault_global_context_menu_enabled",Pu="local:aliasvault_vault_locked_dismiss_until",xu="local:aliasvault_temporary_disabled_sites",L0="local:aliasvault_clipboard_clear_timeout",R0="local:aliasvault_auto_lock_timeout",Q0="local:aliasvault_autofill_matching_mode",yy=Q.createContext(void 0),kx=({children:n})=>{const[a,r]=Q.useState(!1),[s,o]=Q.useState(!1),[u,c]=Q.useState(null),[d,p]=Q.useState(null),A=ka(),E=Q.useCallback(async()=>{let R=!1;const N=await Ke.getItem("local:accessToken"),U=await Ke.getItem("local:refreshToken"),j=await Ke.getItem("local:username");return N&&U&&j&&(c(j),r(!0),R=!0),o(!0),{isLoggedIn:R}},[c,r]);Q.useEffect(()=>{E()},[E]);const v=Q.useCallback(async(R,N,U)=>{await Ke.setItem("local:username",R),await Ke.setItem("local:accessToken",N),await Ke.setItem("local:refreshToken",U),c(R)},[]),C=Q.useCallback(async()=>{r(!0),await Ke.setItem(Pu,0)},[]),S=Q.useCallback(async R=>{await ta("CLEAR_VAULT",{},"background"),await Ke.removeItems(["local:username","local:accessToken","local:refreshToken"]),A==null||A.clearDatabase(),R&&p(R),c(null),r(!1)},[A]),k=Q.useCallback(()=>{p(null)},[]),D=Q.useMemo(()=>({isLoggedIn:a,isInitialized:s,username:u,initializeAuth:E,setAuthTokens:v,login:C,logout:S,globalMessage:d,clearGlobalMessage:k}),[a,s,u,E,d,v,C,S,k]);return h.jsx(yy.Provider,{value:D,children:n})},Kn=()=>{const n=Q.useContext(yy);if(n===void 0)throw new Error("useAuth must be used within an AuthProvider");return n},Tx=({routes:n=[],rightButtons:a})=>{const{t:r}=gt(),s=Kn(),o=Ua(),u=Yn(),c=n==null?void 0:n.find(A=>{const E=A.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${E}$`).test(u.pathname)}),d=()=>{o("/auth-settings")},p=()=>{u.pathname==="/upgrade"||u.pathname==="/login"||u.pathname==="/unlock"||(s.isLoggedIn?o("/credentials"):o("/"))};return h.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:h.jsxs("div",{className:"flex items-center h-16 px-4",children:[c!=null&&c.showBackButton?h.jsx("button",{id:"back",onClick:()=>o(-1),className:"flex items-center gap-2 hover:bg-gray-100 dark:hover:bg-gray-700 pr-2 pt-1.5 pb-1.5 rounded-lg group",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx("svg",{className:"w-5 h-5 text-gray-500 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),c.title&&h.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:c.title})]})}):h.jsx("div",{className:"flex items-center",children:h.jsxs("button",{onClick:()=>p(),className:"flex items-center hover:opacity-80 transition-opacity",children:[h.jsx("img",{src:"/assets/images/logo.svg",alt:"AliasVault",className:"h-8 w-8 mr-2"}),h.jsx("h1",{className:"text-gray-900 dark:text-white text-xl font-bold",children:r("common.appName")}),h.jsx("span",{className:"text-primary-500 text-[10px] ml-1 font-normal",children:"BETA"})]})}),h.jsx("div",{className:"flex-grow"}),h.jsx("div",{className:"flex items-center gap-2",children:s.isLoggedIn?a:h.jsxs(h.Fragment,{children:[a,h.jsxs("button",{id:"settings",onClick:d,className:"p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700",children:[h.jsx("span",{className:"sr-only",children:r("common.settings")}),h.jsx("svg",{className:"w-5 h-5","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"})})]})]})})]})})},$s=()=>{const n={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},a=h.jsxs(h.Fragment,{children:[h.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),h.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:n})]});return h.jsx("div",{className:"inline-flex items-center",children:a})},Ey=Q.createContext(void 0),Dx=({children:n})=>{const[a,r]=Q.useState(null),s=Q.useCallback(u=>{r(u)},[]),o=Q.useMemo(()=>({setHeaderButtons:s,headerButtons:a}),[s,a]);return h.jsx(Ey.Provider,{value:o,children:n})},dr=()=>{const n=Q.useContext(Ey);if(n===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return n},Lx=()=>{const{isLoading:n}=Ma();if(!n)return null;const a={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},r=h.jsxs(h.Fragment,{children:[h.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),h.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:a})]});return h.jsx("div",{className:"fixed inset-0 w-full h-full z-50 bg-gray-200 dark:bg-gray-500 bg-opacity-90 flex items-center justify-center",children:h.jsx("div",{className:"relative",children:r})})},by=Q.createContext(void 0),Rx=({children:n})=>{const[a,r]=Q.useState(!0),[s,o]=Q.useState(!1),[u,c]=Q.useState(void 0),d=E=>{o(!0),c(E)},p=()=>{o(!1),c(void 0)},A=Q.useMemo(()=>({isLoading:s,loadingMessage:u,showLoading:d,hideLoading:p,isInitialLoading:a,setIsInitialLoading:r}),[s,u,a]);return h.jsxs(by.Provider,{value:A,children:[h.jsx(Lx,{message:u}),n]})},Ma=()=>{const n=Q.useContext(by);if(n===void 0)throw new Error("useLoading must be used within a LoadingProvider");return n},Qx="session:lastVisitedPage",Ux="session:lastVisitedTime",Mx="session:navigationHistory",vy=Q.createContext(void 0),_x=({children:n})=>{const a=Yn(),{isInitialized:r,isLoggedIn:s}=Kn(),{dbInitialized:o,dbAvailable:u,upgradeRequired:c}=ka(),d=r&&o,p=d&&(!s||!u&&!c),A=Q.useCallback(async()=>{if(d&&!p&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/logout"].includes(a.pathname)){const C=a.pathname.split("/").filter(Boolean),S=[];let k="";for(const D of C)k+="/"+D,S.push({pathname:k,search:a.search,hash:a.hash});await Promise.all([Ke.setItem(Qx,a.pathname),Ke.setItem(Ux,Date.now()),Ke.setItem(Mx,S)])}},[a,d,p]);Q.useEffect(()=>{d&&A()},[a.pathname,a.search,a.hash,d,A]);const E=Q.useMemo(()=>({storeCurrentPage:A,isFullyInitialized:d,requiresAuth:p}),[A,d,p]);return h.jsx(vy.Provider,{value:E,children:n})},jx=()=>{const n=Q.useContext(vy);if(n===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return n};var jf,U0;function Ox(){if(U0)return jf;U0=1;function n(N){this._maxSize=N,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(N){return this._values[N]},n.prototype.set=function(N,U){return this._size>=this._maxSize&&this.clear(),N in this._values||this._size++,this._values[N]=U};var a=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,s=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,u=/^\s*(['"]?)(.*?)(\1)\s*$/,c=512,d=new n(c),p=new n(c),A=new n(c);jf={Cache:n,split:v,normalizePath:E,setter:function(N){var U=E(N);return p.get(N)||p.set(N,function(P,V){for(var de=0,ce=U.length,Z=P;de<ce-1;){var X=U[de];if(X==="__proto__"||X==="constructor"||X==="prototype")return P;Z=Z[U[de++]]}Z[U[de]]=V})},getter:function(N,U){var j=E(N);return A.get(N)||A.set(N,function(V){for(var de=0,ce=j.length;de<ce;)if(V!=null||!U)V=V[j[de++]];else return;return V})},join:function(N){return N.reduce(function(U,j){return U+(S(j)||r.test(j)?"["+j+"]":(U?".":"")+j)},"")},forEach:function(N,U,j){C(Array.isArray(N)?N:v(N),U,j)}};function E(N){return d.get(N)||d.set(N,v(N).map(function(U){return U.replace(u,"$2")}))}function v(N){return N.match(a)||[""]}function C(N,U,j){var P=N.length,V,de,ce,Z;for(de=0;de<P;de++)V=N[de],V&&(R(V)&&(V='"'+V+'"'),Z=S(V),ce=!Z&&/^\d+$/.test(V),U.call(j,V,Z,ce,de,N))}function S(N){return typeof N=="string"&&N&&["'",'"'].indexOf(N.charAt(0))!==-1}function k(N){return N.match(s)&&!N.match(r)}function D(N){return o.test(N)}function R(N){return!S(N)&&(k(N)||D(N))}return jf}var es=Ox(),Of,M0;function Fx(){if(M0)return Of;M0=1;const n=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,a=E=>E.match(n)||[],r=E=>E[0].toUpperCase()+E.slice(1),s=(E,v)=>a(E).join(v).toLowerCase(),o=E=>a(E).reduce((v,C)=>`${v}${v?C[0].toUpperCase()+C.slice(1).toLowerCase():C.toLowerCase()}`,"");return Of={words:a,upperFirst:r,camelCase:o,pascalCase:E=>r(o(E)),snakeCase:E=>s(E,"_"),kebabCase:E=>s(E,"-"),sentenceCase:E=>r(s(E," ")),titleCase:E=>a(E).map(r).join(" ")},Of}var Ff=Fx(),Cu={exports:{}},_0;function Vx(){if(_0)return Cu.exports;_0=1,Cu.exports=function(o){return n(a(o),o)},Cu.exports.array=n;function n(o,u){var c=o.length,d=new Array(c),p={},A=c,E=r(u),v=s(o);for(u.forEach(function(S){if(!v.has(S[0])||!v.has(S[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});A--;)p[A]||C(o[A],A,new Set);return d;function C(S,k,D){if(D.has(S)){var R;try{R=", node was:"+JSON.stringify(S)}catch{R=""}throw new Error("Cyclic dependency"+R)}if(!v.has(S))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(S));if(!p[k]){p[k]=!0;var N=E.get(S)||new Set;if(N=Array.from(N),k=N.length){D.add(S);do{var U=N[--k];C(U,v.get(U),D)}while(k);D.delete(S)}d[--c]=S}}}function a(o){for(var u=new Set,c=0,d=o.length;c<d;c++){var p=o[c];u.add(p[0]),u.add(p[1])}return Array.from(u)}function r(o){for(var u=new Map,c=0,d=o.length;c<d;c++){var p=o[c];u.has(p[0])||u.set(p[0],new Set),u.has(p[1])||u.set(p[1],new Set),u.get(p[0]).add(p[1])}return u}function s(o){for(var u=new Map,c=0,d=o.length;c<d;c++)u.set(o[c],c);return u}return Cu.exports}var Hx=Vx();const Gx=Ci(Hx),Px=Object.prototype.toString,zx=Error.prototype.toString,qx=RegExp.prototype.toString,Yx=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Kx=/^Symbol\((.*)\)(.*)$/;function Jx(n){return n!=+n?"NaN":n===0&&1/n<0?"-0":""+n}function j0(n,a=!1){if(n==null||n===!0||n===!1)return""+n;const r=typeof n;if(r==="number")return Jx(n);if(r==="string")return a?`"${n}"`:n;if(r==="function")return"[Function "+(n.name||"anonymous")+"]";if(r==="symbol")return Yx.call(n).replace(Kx,"Symbol($1)");const s=Px.call(n).slice(8,-1);return s==="Date"?isNaN(n.getTime())?""+n:n.toISOString(n):s==="Error"||n instanceof Error?"["+zx.call(n)+"]":s==="RegExp"?qx.call(n):null}function xi(n,a){let r=j0(n,a);return r!==null?r:JSON.stringify(n,function(s,o){let u=j0(this[s],a);return u!==null?u:o},2)}function wy(n){return n==null?[]:[].concat(n)}let xy,Cy,Iy,Xx=/\$\{\s*(\w+)\s*\}/g;xy=Symbol.toStringTag;class O0{constructor(a,r,s,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[xy]="Error",this.name="ValidationError",this.value=r,this.path=s,this.type=o,this.errors=[],this.inner=[],wy(a).forEach(u=>{if(Ga.isError(u)){this.errors.push(...u.errors);const c=u.inner.length?u.inner:[u];this.inner.push(...c)}else this.errors.push(u)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Cy=Symbol.hasInstance;Iy=Symbol.toStringTag;class Ga extends Error{static formatError(a,r){const s=r.label||r.path||"this";return r=Object.assign({},r,{path:s,originalPath:r.path}),typeof a=="string"?a.replace(Xx,(o,u)=>xi(r[u])):typeof a=="function"?a(r):a}static isError(a){return a&&a.name==="ValidationError"}constructor(a,r,s,o,u){const c=new O0(a,r,s,o);if(u)return c;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Iy]="Error",this.name=c.name,this.message=c.message,this.type=c.type,this.value=c.value,this.path=c.path,this.errors=c.errors,this.inner=c.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ga)}static[Cy](a){return O0[Symbol.hasInstance](a)||super[Symbol.hasInstance](a)}}let sr={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:n,type:a,value:r,originalValue:s})=>{const o=s!=null&&s!==r?` (cast from the value \`${xi(s,!0)}\`).`:".";return a!=="mixed"?`${n} must be a \`${a}\` type, but the final value was: \`${xi(r,!0)}\``+o:`${n} must match the configured type. The validated value was: \`${xi(r,!0)}\``+o}},rn={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},$x={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},AA={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Wx={isValue:"${path} field must be ${value}"},Uu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Zx={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},eC={notType:n=>{const{path:a,value:r,spec:s}=n,o=s.types.length;if(Array.isArray(r)){if(r.length<o)return`${a} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${xi(r,!0)}\``;if(r.length>o)return`${a} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${xi(r,!0)}\``}return Ga.formatError(sr.notType,n)}};Object.assign(Object.create(null),{mixed:sr,string:rn,number:$x,date:AA,object:Uu,array:Zx,boolean:Wx,tuple:eC});const DA=n=>n&&n.__isYupSchema__;class zu{static fromOptions(a,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:o,otherwise:u}=r,c=typeof s=="function"?s:(...d)=>d.every(p=>p===s);return new zu(a,(d,p)=>{var A;let E=c(...d)?o:u;return(A=E==null?void 0:E(p))!=null?A:p})}constructor(a,r){this.fn=void 0,this.refs=a,this.refs=a,this.fn=r}resolve(a,r){let s=this.refs.map(u=>u.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(s,a,r);if(o===void 0||o===a)return a;if(!DA(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Iu={context:"$",value:"."};class as{constructor(a,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof a!="string")throw new TypeError("ref must be a string, got: "+a);if(this.key=a.trim(),a==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Iu.context,this.isValue=this.key[0]===Iu.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?Iu.context:this.isValue?Iu.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&es.getter(this.path,!0),this.map=r.map}getValue(a,r,s){let o=this.isContext?s:this.isValue?a:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(a,r){return this.getValue(a,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(a){return a&&a.__isYupRef}}as.prototype.__isYupRef=!0;const Xi=n=>n==null;function Os(n){function a({value:r,path:s="",options:o,originalValue:u,schema:c},d,p){const{name:A,test:E,params:v,message:C,skipAbsent:S}=n;let{parent:k,context:D,abortEarly:R=c.spec.abortEarly,disableStackTrace:N=c.spec.disableStackTrace}=o;function U(ee){return as.isRef(ee)?ee.getValue(r,k,D):ee}function j(ee={}){const pe=Object.assign({value:r,originalValue:u,label:c.spec.label,path:ee.path||s,spec:c.spec,disableStackTrace:ee.disableStackTrace||N},v,ee.params);for(const Ne of Object.keys(pe))pe[Ne]=U(pe[Ne]);const ge=new Ga(Ga.formatError(ee.message||C,pe),r,pe.path,ee.type||A,pe.disableStackTrace);return ge.params=pe,ge}const P=R?d:p;let V={path:s,parent:k,type:A,from:o.from,createError:j,resolve:U,options:o,originalValue:u,schema:c};const de=ee=>{Ga.isError(ee)?P(ee):ee?p(null):P(j())},ce=ee=>{Ga.isError(ee)?P(ee):d(ee)};if(S&&Xi(r))return de(!0);let X;try{var K;if(X=E.call(V,r,V),typeof((K=X)==null?void 0:K.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${V.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(X).then(de,ce)}}catch(ee){ce(ee);return}de(X)}return a.OPTIONS=n,a}function tC(n,a,r,s=r){let o,u,c;return a?(es.forEach(a,(d,p,A)=>{let E=p?d.slice(1,d.length-1):d;n=n.resolve({context:s,parent:o,value:r});let v=n.type==="tuple",C=A?parseInt(E,10):0;if(n.innerType||v){if(v&&!A)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${c}" must contain an index to the tuple element, e.g. "${c}[0]"`);if(r&&C>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${d}, in the path: ${a}. because there is no value at that index. `);o=r,r=r&&r[C],n=v?n.spec.types[C]:n.innerType}if(!A){if(!n.fields||!n.fields[E])throw new Error(`The schema does not contain the path: ${a}. (failed at: ${c} which is a type: "${n.type}")`);o=r,r=r&&r[E],n=n.fields[E]}u=E,c=p?"["+d+"]":"."+d}),{schema:n,parent:o,parentPath:u}):{parent:o,parentPath:a,schema:n}}class qu extends Set{describe(){const a=[];for(const r of this.values())a.push(as.isRef(r)?r.describe():r);return a}resolveAll(a){let r=[];for(const s of this.values())r.push(a(s));return r}clone(){return new qu(this.values())}merge(a,r){const s=this.clone();return a.forEach(o=>s.add(o)),r.forEach(o=>s.delete(o)),s}}function qs(n,a=new Map){if(DA(n)||!n||typeof n!="object")return n;if(a.has(n))return a.get(n);let r;if(n instanceof Date)r=new Date(n.getTime()),a.set(n,r);else if(n instanceof RegExp)r=new RegExp(n),a.set(n,r);else if(Array.isArray(n)){r=new Array(n.length),a.set(n,r);for(let s=0;s<n.length;s++)r[s]=qs(n[s],a)}else if(n instanceof Map){r=new Map,a.set(n,r);for(const[s,o]of n.entries())r.set(s,qs(o,a))}else if(n instanceof Set){r=new Set,a.set(n,r);for(const s of n)r.add(qs(s,a))}else if(n instanceof Object){r={},a.set(n,r);for(const[s,o]of Object.entries(n))r[s]=qs(o,a)}else throw Error(`Unable to clone ${n}`);return r}class cr{constructor(a){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new qu,this._blacklist=new qu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(sr.notType)}),this.type=a.type,this._typeCheck=a.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},a==null?void 0:a.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(a){if(this._mutate)return a&&Object.assign(this.spec,a),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=qs(Object.assign({},this.spec,a)),r}label(a){let r=this.clone();return r.spec.label=a,r}meta(...a){if(a.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},a[0]),r}withMutation(a){let r=this._mutate;this._mutate=!0;let s=a(this);return this._mutate=r,s}concat(a){if(!a||a===this)return this;if(a.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${a.type}`);let r=this,s=a.clone();const o=Object.assign({},r.spec,s.spec);return s.spec=o,s.internalTests=Object.assign({},r.internalTests,s.internalTests),s._whitelist=r._whitelist.merge(a._whitelist,a._blacklist),s._blacklist=r._blacklist.merge(a._blacklist,a._whitelist),s.tests=r.tests,s.exclusiveTests=r.exclusiveTests,s.withMutation(u=>{a.tests.forEach(c=>{u.test(c.OPTIONS)})}),s.transforms=[...r.transforms,...s.transforms],s}isType(a){return a==null?!!(this.spec.nullable&&a===null||this.spec.optional&&a===void 0):this._typeCheck(a)}resolve(a){let r=this;if(r.conditions.length){let s=r.conditions;r=r.clone(),r.conditions=[],r=s.reduce((o,u)=>u.resolve(o,a),r),r=r.resolve(a)}return r}resolveOptions(a){var r,s,o,u;return Object.assign({},a,{from:a.from||[],strict:(r=a.strict)!=null?r:this.spec.strict,abortEarly:(s=a.abortEarly)!=null?s:this.spec.abortEarly,recursive:(o=a.recursive)!=null?o:this.spec.recursive,disableStackTrace:(u=a.disableStackTrace)!=null?u:this.spec.disableStackTrace})}cast(a,r={}){let s=this.resolve(Object.assign({value:a},r)),o=r.assert==="ignore-optionality",u=s._cast(a,r);if(r.assert!==!1&&!s.isType(u)){if(o&&Xi(u))return u;let c=xi(a),d=xi(u);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". 

attempted value: ${c} 
`+(d!==c?`result of cast: ${d}`:""))}return u}_cast(a,r){let s=a===void 0?a:this.transforms.reduce((o,u)=>u.call(this,o,a,this),a);return s===void 0&&(s=this.getDefault(r)),s}_validate(a,r={},s,o){let{path:u,originalValue:c=a,strict:d=this.spec.strict}=r,p=a;d||(p=this._cast(p,Object.assign({assert:!1},r)));let A=[];for(let E of Object.values(this.internalTests))E&&A.push(E);this.runTests({path:u,value:p,originalValue:c,options:r,tests:A},s,E=>{if(E.length)return o(E,p);this.runTests({path:u,value:p,originalValue:c,options:r,tests:this.tests},s,o)})}runTests(a,r,s){let o=!1,{tests:u,value:c,originalValue:d,path:p,options:A}=a,E=D=>{o||(o=!0,r(D,c))},v=D=>{o||(o=!0,s(D,c))},C=u.length,S=[];if(!C)return v([]);let k={value:c,originalValue:d,path:p,options:A,schema:this};for(let D=0;D<u.length;D++){const R=u[D];R(k,E,function(U){U&&(Array.isArray(U)?S.push(...U):S.push(U)),--C<=0&&v(S)})}}asNestedTest({key:a,index:r,parent:s,parentPath:o,originalParent:u,options:c}){const d=a??r;if(d==null)throw TypeError("Must include `key` or `index` for nested validations");const p=typeof d=="number";let A=s[d];const E=Object.assign({},c,{strict:!0,parent:s,value:A,originalValue:u[d],key:void 0,[p?"index":"key"]:d,path:p||d.includes(".")?`${o||""}[${p?d:`"${d}"`}]`:(o?`${o}.`:"")+a});return(v,C,S)=>this.resolve(E)._validate(A,E,C,S)}validate(a,r){var s;let o=this.resolve(Object.assign({},r,{value:a})),u=(s=r==null?void 0:r.disableStackTrace)!=null?s:o.spec.disableStackTrace;return new Promise((c,d)=>o._validate(a,r,(p,A)=>{Ga.isError(p)&&(p.value=A),d(p)},(p,A)=>{p.length?d(new Ga(p,A,void 0,void 0,u)):c(A)}))}validateSync(a,r){var s;let o=this.resolve(Object.assign({},r,{value:a})),u,c=(s=r==null?void 0:r.disableStackTrace)!=null?s:o.spec.disableStackTrace;return o._validate(a,Object.assign({},r,{sync:!0}),(d,p)=>{throw Ga.isError(d)&&(d.value=p),d},(d,p)=>{if(d.length)throw new Ga(d,a,void 0,void 0,c);u=p}),u}isValid(a,r){return this.validate(a,r).then(()=>!0,s=>{if(Ga.isError(s))return!1;throw s})}isValidSync(a,r){try{return this.validateSync(a,r),!0}catch(s){if(Ga.isError(s))return!1;throw s}}_getDefault(a){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,a):qs(r)}getDefault(a){return this.resolve(a||{})._getDefault(a)}default(a){return arguments.length===0?this._getDefault():this.clone({default:a})}strict(a=!0){return this.clone({strict:a})}nullability(a,r){const s=this.clone({nullable:a});return s.internalTests.nullable=Os({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),s}optionality(a,r){const s=this.clone({optional:a});return s.internalTests.optionality=Os({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(a=sr.defined){return this.optionality(!1,a)}nullable(){return this.nullability(!0)}nonNullable(a=sr.notNull){return this.nullability(!1,a)}required(a=sr.required){return this.clone().withMutation(r=>r.nonNullable(a).defined(a))}notRequired(){return this.clone().withMutation(a=>a.nullable().optional())}transform(a){let r=this.clone();return r.transforms.push(a),r}test(...a){let r;if(a.length===1?typeof a[0]=="function"?r={test:a[0]}:r=a[0]:a.length===2?r={name:a[0],test:a[1]}:r={name:a[0],message:a[1],test:a[2]},r.message===void 0&&(r.message=sr.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),o=Os(r),u=r.exclusive||r.name&&s.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(s.exclusiveTests[r.name]=!!r.exclusive),s.tests=s.tests.filter(c=>!(c.OPTIONS.name===r.name&&(u||c.OPTIONS.test===o.OPTIONS.test))),s.tests.push(o),s}when(a,r){!Array.isArray(a)&&typeof a!="string"&&(r=a,a=".");let s=this.clone(),o=wy(a).map(u=>new as(u));return o.forEach(u=>{u.isSibling&&s.deps.push(u.key)}),s.conditions.push(typeof r=="function"?new zu(o,r):zu.fromOptions(o,r)),s}typeError(a){let r=this.clone();return r.internalTests.typeError=Os({message:a,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(a,r=sr.oneOf){let s=this.clone();return a.forEach(o=>{s._whitelist.add(o),s._blacklist.delete(o)}),s.internalTests.whiteList=Os({message:r,name:"oneOf",skipAbsent:!0,test(o){let u=this.schema._whitelist,c=u.resolveAll(this.resolve);return c.includes(o)?!0:this.createError({params:{values:Array.from(u).join(", "),resolved:c}})}}),s}notOneOf(a,r=sr.notOneOf){let s=this.clone();return a.forEach(o=>{s._blacklist.add(o),s._whitelist.delete(o)}),s.internalTests.blacklist=Os({message:r,name:"notOneOf",test(o){let u=this.schema._blacklist,c=u.resolveAll(this.resolve);return c.includes(o)?this.createError({params:{values:Array.from(u).join(", "),resolved:c}}):!0}}),s}strip(a=!0){let r=this.clone();return r.spec.strip=a,r}describe(a){const r=(a?this.resolve(a):this).clone(),{label:s,meta:o,optional:u,nullable:c}=r.spec;return{meta:o,label:s,optional:u,nullable:c,default:r.getDefault(a),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(p=>({name:p.OPTIONS.name,params:p.OPTIONS.params})).filter((p,A,E)=>E.findIndex(v=>v.name===p.name)===A)}}}cr.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])cr.prototype[`${n}At`]=function(a,r,s={}){const{parent:o,parentPath:u,schema:c}=tC(this,a,r,s.context);return c[n](o&&o[u],Object.assign({},s,{parent:o,path:a}))};for(const n of["equals","is"])cr.prototype[n]=cr.prototype.oneOf;for(const n of["not","nope"])cr.prototype[n]=cr.prototype.notOneOf;const aC=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function nC(n){const a=hA(n);if(!a)return Date.parse?Date.parse(n):Number.NaN;if(a.z===void 0&&a.plusMinus===void 0)return new Date(a.year,a.month,a.day,a.hour,a.minute,a.second,a.millisecond).valueOf();let r=0;return a.z!=="Z"&&a.plusMinus!==void 0&&(r=a.hourOffset*60+a.minuteOffset,a.plusMinus==="+"&&(r=0-r)),Date.UTC(a.year,a.month,a.day,a.hour,a.minute+r,a.second,a.millisecond)}function hA(n){var a,r;const s=aC.exec(n);return s?{year:Dr(s[1]),month:Dr(s[2],1)-1,day:Dr(s[3],1),hour:Dr(s[4]),minute:Dr(s[5]),second:Dr(s[6]),millisecond:s[7]?Dr(s[7].substring(0,3)):0,precision:(a=(r=s[7])==null?void 0:r.length)!=null?a:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Dr(s[10]),minuteOffset:Dr(s[11])}:null}function Dr(n,a=0){return Number(n)||a}let rC=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,iC=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,sC=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,lC="^\\d{4}-\\d{2}-\\d{2}",oC="\\d{2}:\\d{2}:\\d{2}",uC="(([+-]\\d{2}(:?\\d{2})?)|Z)",cC=new RegExp(`${lC}T${oC}(\\.\\d+)?${uC}$`),dC=n=>Xi(n)||n===n.trim(),fC={}.toString();function Ka(){return new By}class By extends cr{constructor(){super({type:"string",check(a){return a instanceof String&&(a=a.valueOf()),typeof a=="string"}}),this.withMutation(()=>{this.transform((a,r,s)=>{if(!s.spec.coerce||s.isType(a)||Array.isArray(a))return a;const o=a!=null&&a.toString?a.toString():a;return o===fC?a:o})})}required(a){return super.required(a).withMutation(r=>r.test({message:a||sr.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(a=>(a.tests=a.tests.filter(r=>r.OPTIONS.name!=="required"),a))}length(a,r=rn.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:a},skipAbsent:!0,test(s){return s.length===this.resolve(a)}})}min(a,r=rn.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:a},skipAbsent:!0,test(s){return s.length>=this.resolve(a)}})}max(a,r=rn.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:a},skipAbsent:!0,test(s){return s.length<=this.resolve(a)}})}matches(a,r){let s=!1,o,u;return r&&(typeof r=="object"?{excludeEmptyString:s=!1,message:o,name:u}=r:o=r),this.test({name:u||"matches",message:o||rn.matches,params:{regex:a},skipAbsent:!0,test:c=>c===""&&s||c.search(a)!==-1})}email(a=rn.email){return this.matches(rC,{name:"email",message:a,excludeEmptyString:!0})}url(a=rn.url){return this.matches(iC,{name:"url",message:a,excludeEmptyString:!0})}uuid(a=rn.uuid){return this.matches(sC,{name:"uuid",message:a,excludeEmptyString:!1})}datetime(a){let r="",s,o;return a&&(typeof a=="object"?{message:r="",allowOffset:s=!1,precision:o=void 0}=a:r=a),this.matches(cC,{name:"datetime",message:r||rn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||rn.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:u=>{if(!u||s)return!0;const c=hA(u);return c?!!c.z:!1}}).test({name:"datetime_precision",message:r||rn.datetime_precision,params:{precision:o},skipAbsent:!0,test:u=>{if(!u||o==null)return!0;const c=hA(u);return c?c.precision===o:!1}})}ensure(){return this.default("").transform(a=>a===null?"":a)}trim(a=rn.trim){return this.transform(r=>r!=null?r.trim():r).test({message:a,name:"trim",test:dC})}lowercase(a=rn.lowercase){return this.transform(r=>Xi(r)?r:r.toLowerCase()).test({message:a,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Xi(r)||r===r.toLowerCase()})}uppercase(a=rn.uppercase){return this.transform(r=>Xi(r)?r:r.toUpperCase()).test({message:a,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Xi(r)||r===r.toUpperCase()})}}Ka.prototype=By.prototype;let AC=new Date(""),hC=n=>Object.prototype.toString.call(n)==="[object Date]";class LA extends cr{constructor(){super({type:"date",check(a){return hC(a)&&!isNaN(a.getTime())}}),this.withMutation(()=>{this.transform((a,r,s)=>!s.spec.coerce||s.isType(a)||a===null?a:(a=nC(a),isNaN(a)?LA.INVALID_DATE:new Date(a)))})}prepareParam(a,r){let s;if(as.isRef(a))s=a;else{let o=this.cast(a);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);s=o}return s}min(a,r=AA.min){let s=this.prepareParam(a,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:a},skipAbsent:!0,test(o){return o>=this.resolve(s)}})}max(a,r=AA.max){let s=this.prepareParam(a,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:a},skipAbsent:!0,test(o){return o<=this.resolve(s)}})}}LA.INVALID_DATE=AC;function gC(n,a=[]){let r=[],s=new Set,o=new Set(a.map(([c,d])=>`${c}-${d}`));function u(c,d){let p=es.split(c)[0];s.add(p),o.has(`${d}-${p}`)||r.push([d,p])}for(const c of Object.keys(n)){let d=n[c];s.add(c),as.isRef(d)&&d.isSibling?u(d.path,c):DA(d)&&"deps"in d&&d.deps.forEach(p=>u(p,c))}return Gx.array(Array.from(s),r).reverse()}function F0(n,a){let r=1/0;return n.some((s,o)=>{var u;if((u=a.path)!=null&&u.includes(s))return r=o,!0}),r}function Sy(n){return(a,r)=>F0(n,a)-F0(n,r)}const mC=(n,a,r)=>{if(typeof n!="string")return n;let s=n;try{s=JSON.parse(n)}catch{}return r.isType(s)?s:n};function Mu(n){if("fields"in n){const a={};for(const[r,s]of Object.entries(n.fields))a[r]=Mu(s);return n.setFields(a)}if(n.type==="array"){const a=n.optional();return a.innerType&&(a.innerType=Mu(a.innerType)),a}return n.type==="tuple"?n.optional().clone({types:n.spec.types.map(Mu)}):"optional"in n?n.optional():n}const pC=(n,a)=>{const r=[...es.normalizePath(a)];if(r.length===1)return r[0]in n;let s=r.pop(),o=es.getter(es.join(r),!0)(n);return!!(o&&s in o)};let V0=n=>Object.prototype.toString.call(n)==="[object Object]";function H0(n,a){let r=Object.keys(n.fields);return Object.keys(a).filter(s=>r.indexOf(s)===-1)}const yC=Sy([]);function Yu(n){return new Ny(n)}class Ny extends cr{constructor(a){super({type:"object",check(r){return V0(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=yC,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{a&&this.shape(a)})}_cast(a,r={}){var s;let o=super._cast(a,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let u=this.fields,c=(s=r.stripUnknown)!=null?s:this.spec.noUnknown,d=[].concat(this._nodes,Object.keys(o).filter(v=>!this._nodes.includes(v))),p={},A=Object.assign({},r,{parent:p,__validating:r.__validating||!1}),E=!1;for(const v of d){let C=u[v],S=v in o;if(C){let k,D=o[v];A.path=(r.path?`${r.path}.`:"")+v,C=C.resolve({value:D,context:r.context,parent:p});let R=C instanceof cr?C.spec:void 0,N=R==null?void 0:R.strict;if(R!=null&&R.strip){E=E||v in o;continue}k=!r.__validating||!N?C.cast(o[v],A):o[v],k!==void 0&&(p[v]=k)}else S&&!c&&(p[v]=o[v]);(S!==v in p||p[v]!==o[v])&&(E=!0)}return E?p:o}_validate(a,r={},s,o){let{from:u=[],originalValue:c=a,recursive:d=this.spec.recursive}=r;r.from=[{schema:this,value:c},...u],r.__validating=!0,r.originalValue=c,super._validate(a,r,s,(p,A)=>{if(!d||!V0(A)){o(p,A);return}c=c||A;let E=[];for(let v of this._nodes){let C=this.fields[v];!C||as.isRef(C)||E.push(C.asNestedTest({options:r,key:v,parent:A,parentPath:r.path,originalParent:c}))}this.runTests({tests:E,value:A,originalValue:c,options:r},s,v=>{o(v.sort(this._sortErrors).concat(p),A)})})}clone(a){const r=super.clone(a);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(a){let r=super.concat(a),s=r.fields;for(let[o,u]of Object.entries(this.fields)){const c=s[o];s[o]=c===void 0?u:c}return r.withMutation(o=>o.setFields(s,[...this._excludedEdges,...a._excludedEdges]))}_getDefault(a){if("default"in this.spec)return super._getDefault(a);if(!this._nodes.length)return;let r={};return this._nodes.forEach(s=>{var o;const u=this.fields[s];let c=a;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),r[s]=u&&"getDefault"in u?u.getDefault(c):void 0}),r}setFields(a,r){let s=this.clone();return s.fields=a,s._nodes=gC(a,r),s._sortErrors=Sy(Object.keys(a)),r&&(s._excludedEdges=r),s}shape(a,r=[]){return this.clone().withMutation(s=>{let o=s._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...s._excludedEdges,...r]),s.setFields(Object.assign(s.fields,a),o)})}partial(){const a={};for(const[r,s]of Object.entries(this.fields))a[r]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(a)}deepPartial(){return Mu(this)}pick(a){const r={};for(const s of a)this.fields[s]&&(r[s]=this.fields[s]);return this.setFields(r,this._excludedEdges.filter(([s,o])=>a.includes(s)&&a.includes(o)))}omit(a){const r=[];for(const s of Object.keys(this.fields))a.includes(s)||r.push(s);return this.pick(r)}from(a,r,s){let o=es.getter(a,!0);return this.transform(u=>{if(!u)return u;let c=u;return pC(u,a)&&(c=Object.assign({},u),s||delete c[a],c[r]=o(u)),c})}json(){return this.transform(mC)}exact(a){return this.test({name:"exact",exclusive:!0,message:a||Uu.exact,test(r){if(r==null)return!0;const s=H0(this.schema,r);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(a=!0,r=Uu.noUnknown){typeof a!="boolean"&&(r=a,a=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const u=H0(this.schema,o);return!a||u.length===0||this.createError({params:{unknown:u.join(", ")}})}});return s.spec.noUnknown=a,s}unknown(a=!0,r=Uu.noUnknown){return this.noUnknown(!a,r)}transformKeys(a){return this.transform(r=>{if(!r)return r;const s={};for(const o of Object.keys(r))s[a(o)]=r[o];return s})}camelCase(){return this.transformKeys(Ff.camelCase)}snakeCase(){return this.transformKeys(Ff.snakeCase)}constantCase(){return this.transformKeys(a=>Ff.snakeCase(a).toUpperCase())}describe(a){const r=(a?this.resolve(a):this).clone(),s=super.describe(a);s.fields={};for(const[u,c]of Object.entries(r.fields)){var o;let d=a;(o=d)!=null&&o.value&&(d=Object.assign({},d,{parent:d.value,value:d.value[u]})),s.fields[u]=c.describe(d)}return s}}Yu.prototype=Ny.prototype;const EC={loginTitle:"Bei AliasVault anmelden",username:"Benutzername oder E-Mail-Adresse",usernamePlaceholder:"Name / name@unternehmen.com",password:"Passwort",passwordPlaceholder:"Gib Dein Passwort ein",rememberMe:"Angemeldet bleiben",loginButton:"Anmelden",noAccount:"Noch kein Konto?",createVault:"Neuen Tresor erstellen",twoFactorTitle:"Bitte gib den Sicherheits-Code aus Deiner Authentifizierungs-App ein.",authCode:"Sicherheits-Code",authCodePlaceholder:"Gib den 6-stelligen Sicherheits-Code ein.",verify:"Bestätige",cancel:"Abbrechen",twoFactorNote:"Hinweis: Wenn Du keinen Zugriff auf Dein Authentifizierungsgerät hast, kannst Du Deine Zwei-Faktor-Authentifizierung (2FA) mit einem Wiederherstellungscode zurücksetzen, indem Du Dich über die Website anmeldest.",masterPassword:"Master-Passwort",unlockVault:"Tresor entsperren",unlockTitle:"Entsperre Deinen Tresor",unlockDescription:"Bitte gib Dein Master-Passwort zum Entsperren des Tresors ein.",logout:"Abmelden",logoutConfirm:"Bist Du sicher, dass Du Dich abmelden möchtest?",sessionExpired:"Deine Sitzung ist abgelaufen. Bitte melde Dich erneut an.",unlockSuccess:"Tresor erfolgreich entsperrt!",unlockSuccessTitle:"Ihr Tresor wurde erfolgreich entsperrt",unlockSuccessDescription:"Du kannst jetzt die Autofill-Funktion in Anmeldeformularen in Deinem Browser nutzen.",closePopup:"Popup schließen",browseVault:"Tresor durchsuchen",connectingTo:"Verbinde zu",switchAccounts:"Konto wechseln?",loggedIn:"Angemeldet",errors:{invalidCode:"Bitte gib einen gültigen 6-stelligen Sicherheits-Code ein.",serverError:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",noToken:"Anmeldung fehlgeschlagen -- es wurde kein Token zurückgegeben",migrationError:"Beim Prüfen auf ausstehende Migrationen ist ein Fehler aufgetreten.",wrongPassword:"Falsches Passwort. Bitte versuche es erneut.",accountLocked:"Das Konto wurde wegen zu vieler fehlgeschlagener Anmeldeversuche vorübergehend gesperrt.",networkError:"Netzwerkfehler. Bitte überprüfe Deine Verbindung und versuche es erneut.",loginDataMissing:"Deine Anmelde-Sitzung ist abgelaufen. Bitte versuche es erneut."}},bC={credentials:"Zugangsdaten",emails:"E-Mails",settings:"Einstellungen"},vC={appName:"AliasVault",loading:"Laden...",error:"Fehler",success:"Aktion erfolgreich",cancel:"Abbrechen",use:"Benutzen",delete:"Löschen",close:"Schließen",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",language:"Sprache",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",copyToClipboard:"In die Zwischenablage kopieren",loadingEmails:"E-Mails werden geladen...",loadingTotpCodes:"TOTP-Codes werden geladen...",attachments:"Anhänge",loadingAttachments:"Anhänge werden geladen...",settings:"Einstellungen",recentEmails:"Neueste E-Mails",loginCredentials:"Zugangsdaten",twoFactorAuthentication:"Zwei-Faktor-Authentifizierung",alias:"Alias",notes:"Notizen",fullName:"Vor- und Nachname",firstName:"Vorname",lastName:"Nachname",birthDate:"Geburtsdatum",nickname:"Spitzname",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",syncingVault:"Tresor wird synchronisiert",savingChangesToVault:"Änderungen werden gespeichert",uploadingVaultToServer:"Tresor wird auf den Server hochgeladen",checkingVaultUpdates:"Prüfe auf Tresor-Updates",syncingUpdatedVault:"Aktualisierter Tresor wird synchronisiert",executingOperation:"Vorgang wird ausgeführt...",loadMore:"Mehr laden",errors:{VaultOutdated:"Dein Tresor ist veraltet. Bitte melde Dich auf der AliasVault-Webseite an und folge den Anweisungen.",serverNotAvailable:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",clientVersionNotSupported:"Diese Version der AliasVault-Browser-Erweiterung wird vom Server nicht mehr unterstützt. Bitte aktualisiere Deine Browser-Erweiterung auf die neueste Version.",serverVersionNotSupported:"Der AliasVault-Server muss auf eine neuere Version aktualisiert werden, um diese Browser-Erweiterung nutzen zu können. Bitte kontaktiere den Support, falls Du Hilfe benötigst.",unknownError:"Ein unbekannter Fehler ist aufgetreten",failedToStoreVault:"Fehler beim Speichern des Tresors",vaultNotAvailable:"Tresor nicht verfügbar",failedToRetrieveData:"Abruf der Daten fehlgeschlagen",vaultIsLocked:"Der Tresor ist gesperrt.",failedToUploadVault:"Das Hochladen des Tresors ist fehlgeschlagen",passwordChanged:"Dein Passwort hat sich seit Deiner letzten Anmeldung geändert. Bitte melden Dich aus Sicherheitsgründen erneut an."},apiErrors:{UNKNOWN_ERROR:"Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.",ACCOUNT_LOCKED:"Das Konto wurde wegen zu vieler fehlgeschlagener Anmeldeversuche vorübergehend gesperrt. Bitte versuche es später erneut.",ACCOUNT_BLOCKED:"Dein Konto wurde deaktiviert. Wenn Du glaubst, dass dies ein Fehler ist, kontaktiere bitte den Support.",USER_NOT_FOUND:"Ungültiger Benutzername oder Passwort. Bitte versuche es erneut.",INVALID_AUTHENTICATOR_CODE:"Ungültiger Sicherheits-Code. Bitte versuche es erneut.",INVALID_RECOVERY_CODE:"Ungültiger Wiederherstellungscode. Bitte versuche es erneut.",REFRESH_TOKEN_REQUIRED:"Aktualisierungstoken ist erforderlich.",INVALID_REFRESH_TOKEN:"Ungültiger Aktualisierungstoken.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Aktualisierungstoken wurde erfolgreich widerrufen.",PUBLIC_REGISTRATION_DISABLED:"Die Registrierung eines neuen Kontos ist auf diesem Server derzeit deaktiviert. Bitte kontaktiere den Administrator.",USERNAME_REQUIRED:"Der Benutzername ist erforderlich.",USERNAME_ALREADY_IN_USE:"Benutzername ist bereits vergeben.",USERNAME_AVAILABLE:"Der Benutzername ist verfügbar.",USERNAME_MISMATCH:"Der Benutzername stimmt nicht mit dem aktuellen Benutzer überein.",PASSWORD_MISMATCH:"Das angegebene Passwort stimmt nicht mit Deinem aktuellen Passwort überein.",ACCOUNT_SUCCESSFULLY_DELETED:"Konto erfolgreich gelöscht.",USERNAME_EMPTY_OR_WHITESPACE:"Der Benutzername darf nicht leer sein.",USERNAME_TOO_SHORT:"Der Benutzername ist zu kurz. Er muss mindestens 3 Zeichen lang sein.",USERNAME_TOO_LONG:"Der Benutzername ist zu lang. Er darf höchstens 40 Zeichen lang sein.",USERNAME_INVALID_EMAIL:"Ungültige E-Mail-Adresse.",USERNAME_INVALID_CHARACTERS:"Der Benutzername ist ungültig. Er darf nur aus Buchstaben oder Ziffern bestehen.",VAULT_NOT_UP_TO_DATE:"Dein Tresor ist nicht aktuell. Bitte synchronisiere Deinen Tresor und versuche es erneut.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"Der lokale Tresor ist nicht aktuell. Bitte synchronisiere Deinen Tresor, indem Du die Seite aktualisierst, und versuche es erneut."}},wC={or:"oder",new:"Neu",cancel:"Abbrechen",search:"Suche",vaultLocked:"AliasVault ist gesperrt.",creatingNewAlias:"Neuen Alias erstellen...",noMatchesFound:"Keine Treffer gefunden",searchVault:"Tresor durchsuchen...",serviceName:"Name des Dienstes",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",enterServiceName:"Name des Dienstes eingeben",enterEmailAddress:"E-Mail-Adresse eingeben",enterUsername:"Benutzername eingeben",hideFor1Hour:"Für 1 Stunde ausblenden (aktuelle Seite)",hidePermanently:"Dauerhaft ausblenden (aktuelle Seite)",createRandomAlias:"Zufälligen Alias generieren",createUsernamePassword:"Benutzername/Passwort erstellen",randomAlias:"Zufälliger Alias",usernamePassword:"Benutzername/Passwort",createAndSaveAlias:"Alias erstellen und speichern",createAndSaveCredential:"Zugang erstellen und speichern",randomIdentityDescription:"Generiere eine zufällige Identität mit einer zufälligen E-Mail-Adresse von AliasVault.",randomIdentityDescriptionDropdown:"Zufällige Identität mit zufälliger E-Mail-Adresse",manualCredentialDescription:"Gebe Deine eigene E-Mail-Adresse und Benutzernamen an.",manualCredentialDescriptionDropdown:"Manueller Benutzername und Passwort",failedToCreateIdentity:"Das Erstellen der Identität ist fehlgeschlagen. Bitte versuche es erneut.",enterEmailAndOrUsername:"E-Mail-Adresse und/oder Benutzername eingeben",autofillWithAliasVault:"Autofill mit AliasVault",generateRandomPassword:"Zufälliges Passwort erzeugen (wird in die Zwischenablage kopiert)",generateNewPassword:"Neues Passwort erzeugen",togglePasswordVisibility:"Passwort ein-/ausblenden",passwordCopiedToClipboard:"Passwort in die Zwischenablage kopiert",enterEmailAndOrUsernameError:"E-Mail-Adresse und/oder Benutzername eingeben",openAliasVaultToUpgrade:"Zum Aktualisieren AliasVault öffnen ",vaultUpgradeRequired:"Aktualisierung des Tresors erforderlich.",dismissPopup:"Popup schliessen"},xC={title:"Zugangsdaten",addCredential:"Zugang hinzufügen",editCredential:"Zugang bearbeiten",deleteCredential:"Zugang löschen",credentialDetails:"Details zum Zugang",serviceName:"Name des Dienstes",serviceNamePlaceholder:"z. B. Gmail, Facebook, Bank",website:"Webseite",websitePlaceholder:"https://example.com",username:"Benutzername",usernamePlaceholder:"Benutzername eingeben",password:"Passwort",passwordPlaceholder:"Passwort eingeben",generatePassword:"Passwort generieren",copyPassword:"Passwort kopieren",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",notes:"Notizen",notesPlaceholder:"Zusätzliche Notizen...",totp:"Zwei-Faktor-Authentifizierung",totpCode:"TOTP-Code",copyTotp:"TOTP kopieren",totpSecret:"TOTP-Geheimcode",totpSecretPlaceholder:"TOTP-Geheimcode eingeben",noCredentials:"Keine Zugangsdaten gefunden",noCredentialsDescription:"Erstelle Deinen ersten Zugang, um loszulegen",searchPlaceholder:"Zugangsdaten suchen...",welcomeTitle:"Willkommen bei AliasVault!",welcomeDescription:"Du möchtest die AliasVault-Browser-Erweiterung verwenden? Navigiere zu einer Website und verwende das AliasVault-Popup-Fenster um einen neuen Zugang zu erstellen.",createdAt:"Erstellt",updatedAt:"Zuletzt aktualisiert",autofill:"Autofill",fillForm:"Formular ausfüllen",deleteConfirm:"Bist Du sicher, dass Du diesen Zugang löschen möchtest?",saveSuccess:"Zugang erfolgreich gespeichert.",tags:"Schlagwörter",addTag:"Schlagwort hinzufügen",removeTag:"Schlagwort entfernen",folder:"Ordner",selectFolder:"Ordner auswählen",createFolder:"Ordner erstellen",saveCredential:"Zugang speichern",deleteCredentialTitle:"Zugang löschen",deleteCredentialConfirm:"Bist Du sicher, dass Du diesen Zugang löschen möchtest? Diese Aktion kann nicht rückgängig gemacht werden.",randomAlias:"Zufälliger Alias",manual:"Manuell",service:"Dienst",serviceUrl:"URL des Dienstes",loginCredentials:"Zugangsdaten",generateRandomUsername:"Zufälligen Benutzernamen generieren",generateRandomPassword:"Zufälliges Passwort generieren",changePasswordComplexity:"Komplexität des Passworts ändern",passwordLength:"Passwortlänge",includeLowercase:"Kleinbuchstaben (a-z)",includeUppercase:"Großbuchstaben (A-Z)",includeNumbers:"Ziffern (0-9)",includeSpecialChars:"Sonderzeichen (!@#$%^&*)",avoidAmbiguousChars:"Mehrdeutige Zeichen (1, l, I, 0, O, etc.) vermeiden",generateNewPreview:"Neue Vorschau erstellen",generateRandomAlias:"Zufälligen Alias generieren",alias:"Alias",firstName:"Vorname",lastName:"Nachname",nickName:"Spitzname",gender:"Geschlecht",birthDate:"Geburtsdatum",birthDatePlaceholder:"JJJJ-MM-TT",metadata:"Metadaten",validation:{required:"Dieses Feld ist ein Pflichtfeld",serviceNameRequired:"Name des Dienstes ist erforderlich",invalidEmail:"Ungültiges E-Mail-Format",invalidDateFormat:"Bitte gib das Datum im Format JJJJ-MM-TT ein."},privateEmailTitle:"Private E-Mail-Adresse",privateEmailAliasVaultServer:"AliasVault-Server",privateEmailDescription:"Ende-zu-Ende verschlüsselt, vollständig privat.",publicEmailTitle:"Öffentliche Temp-E-Mail-Anbieter",publicEmailDescription:"Anonyme, aber beschränkte Privatsphäre. E-Mail-Inhalt ist für jeden lesbar, der die Adresse kennt.",useDomainChooser:"Domain-Auswahl verwenden",enterCustomDomain:"Eigene Domain eingeben",enterFullEmail:"Vollständige E-Mail-Adresse eingeben",enterEmailPrefix:"E-Mail-Präfix eingeben"},CC={title:"E-Mails",deleteEmailTitle:"E-Mail löschen",deleteEmailConfirm:"Bist Du sicher, dass Du diese E-Mail unwiderruflich löschen möchtest?",from:"Von",to:"An",date:"Datum",emailContent:"Inhalt der E-Mail",attachments:"Anhänge",emailNotFound:"E-Mail nicht gefunden",noEmails:"Keine E-Mails gefunden",noEmailsDescription:"Du hast bisher keine E-Mails an Deine privaten E-Mail-Adressen erhalten. Neue E-Mails werden hier angezeigt, sobald sie eintreffen.",dateFormat:{justNow:"gerade eben",minutesAgo_single:"vor {{count}} Minute",minutesAgo_plural:"vor {{count}} Minuten",hoursAgo_single:"vor {{count}} Stunde",hoursAgo_plural:"vor {{count}} Stunden",yesterday:"gestern"},errors:{emailLoadError:"Beim Laden der E-Mails ist ein Fehler aufgetreten. Bitte versuche es später erneut.",emailUnexpectedError:"Beim Laden der E-Mails ist ein unerwarteter Fehler aufgetreten. Bitte versuche es später erneut."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Die aktuell gewählte E-Mail-Adresse wird bereits verwendet. Bitte ändere die E-Mail-Adresse, indem Du diese Zugangsdaten bearbeitest.",CLAIM_DOES_NOT_EXIST:"Beim Laden der E-Mails ist ein Fehler aufgetreten. Bitte bearbeite und speichere den Eintrag, um die Datenbank zu synchronisieren, und versuche es dann erneut."}},IC={title:"Einstellungen",serverUrl:"URL des Servers",language:"Sprache",autofillEnabled:"Autofill aktivieren",version:"Version",openInNewWindow:"In neuem Fenster öffnen",openWebApp:"Web-App öffnen",loggedIn:"Angemeldet",logout:"Abmelden",globalSettings:"Allgemeine Einstellungen",autofillPopup:"Autofill-Popup",activeOnAllSites:"Auf allen Seiten aktiv (sofern nicht unten deaktiviert)",disabledOnAllSites:"Auf allen Seiten deaktiviert",enabled:"Aktiviert",disabled:"Deaktiviert",rightClickContextMenu:"Kontextmenü mit Rechtsklick",autofillMatching:"Autofill-Übereinstimmung",autofillMatchingMode:"Autofill-Übereinstimmungs-Modus",autofillMatchingModeDescription:"Legt fest, welche Zugangsdaten als Übereinstimmung angesehen werden und wird als Vorschlag im Autofill-Popup für eine bestimmte Website angezeigt.",autofillMatchingDefault:"URL + Subdomain + Wildcard-Name",autofillMatchingUrlSubdomain:"URL + Subdomain",autofillMatchingUrlExact:"Nur exakte URL-Domain",siteSpecificSettings:"Seitenspezifische Einstellungen",autofillPopupOn:"Autofill-Popup auf: ",enabledForThisSite:"Für diese Seite aktiviert",disabledForThisSite:"Für diese Seite deaktivieren",temporarilyDisabledUntil:"Vorübergehend deaktiviert bis ",resetAllSiteSettings:"Alle seitenspezifischen Einstellungen zurücksetzen",appearance:"Erscheinungsbild",theme:"Thema",useDefault:"Standard verwenden",light:"Hell",dark:"Dunkel",keyboardShortcuts:"Tastaturkürzel",configureKeyboardShortcuts:"Tastaturkürzel konfigurieren",configure:"Konfigurieren",security:"Sicherheit",clipboardClearTimeout:"Zwischenablage nach dem Kopieren automatisch löschen",clipboardClearTimeoutDescription:"Zwischenablage nach dem Kopieren sensibler Daten automatisch löschen",clipboardClearDisabled:"Niemals löschen",clipboardClear5Seconds:"Nach 5 Sekunden löschen",clipboardClear10Seconds:"Nach 10 Sekunden löschen",clipboardClear15Seconds:"Nach 15 Sekunden löschen",autoLockTimeout:"Sperr-Timeout",autoLockTimeoutDescription:"Tresor bei Inaktivität automatisch sperren",autoLockTimeoutHelp:"Der Tresor wird erst nach dem angegebenen Zeitraum der Inaktivität gesperrt (keine Nutzung von Autofill oder Öffnen des Erweiterungs-Popups). Der Tresor wird immer gesperrt, wenn der Browser geschlossen wird, unabhängig von dieser Einstellung.",autoLockNever:"Niemals",autoLock15Seconds:"15 Sekunden",autoLock1Minute:"1 Minute",autoLock5Minutes:"5 Minuten",autoLock15Minutes:"15 Minuten",autoLock30Minutes:"30 Minuten",autoLock1Hour:"1 Stunde",autoLock4Hours:"4 Stunden",autoLock8Hours:"8 Stunden",autoLock24Hours:"24 Stunden",versionPrefix:"Version ",preferences:"Einstellungen",autofillSettings:"Autofill-Einstellungen",clipboardSettings:"Zwischenablage-Einstellungen",contextMenuSettings:"Kontextmenü-Einstellungen",contextMenu:"Kontextmenü",contextMenuEnabled:"Kontextmenü ist aktiviert",contextMenuDisabled:"Kontextmenü ist deaktiviert",contextMenuDescription:"Rechtsklicke auf Eingabefelder, um auf AliasVault-Optionen zuzugreifen",selectLanguage:"Sprache auswählen",validation:{apiUrlRequired:"API-URL ist erforderlich",apiUrlInvalid:"Bitte gib eine gültige API-URL ein",clientUrlRequired:"Client-URL ist erforderlich",clientUrlInvalid:"Bitte gib eine gültige Client-URL ein"}},BC={title:"Tresor aktualisieren",subtitle:"AliasVault wurde aktualisiert. Dadurch muss auch Dein Tresor aktualisiert werden. Dies sollte nur wenige Sekunden dauern.",versionInformation:"Versionsinformationen",yourVault:"Dein Tresor:",newVersion:"Neue Version:",upgrade:"Tresor aktualisieren",upgrading:"Aktualisieren...",logout:"Abmelden",whatsNew:"Neu in dieser Version",whatsNewDescription:"Eine Aktualisierung ist erforderlich, um die folgenden Änderungen zu unterstützen:",noDescriptionAvailable:"Für diese Version ist keine Beschreibung vorhanden.",okay:"OK",status:{preparingUpgrade:"Aktualisierung wird vorbereitet...",vaultAlreadyUpToDate:"Tresor ist bereits aktualisiert",startingDatabaseTransaction:"Datenbanktransaktion wird gestartet...",applyingDatabaseMigrations:"Datenbankmigration wird durchgeführt...",applyingMigration:"Führe Migration {{current}} von {{total}} durch...",committingChanges:"Änderungen werden übernommen..."},alerts:{error:"Fehler",unableToGetVersionInfo:"Versionsinformationen konnten nicht abgerufen werden. Bitte versuche es erneut.",selfHostedServer:"Selbstgehosteter Server",selfHostedWarning:"Nutzt Du einen selbst gehosteten Server, musst Du Deine Instanz ebenfalls updaten. Andernfalls kannst Du Dich im Web-Client nicht mehr anmelden.",cancel:"Abbrechen",continueUpgrade:"Aktualisierung fortsetzen",upgradeFailed:"Aktualisierung fehlgeschlagen",failedToApplyMigration:"Migration fehlgeschlagen ({{current}} von {{total}})",unknownErrorDuringUpgrade:"Bei der Aktualisierung ist ein unbekannter Fehler aufgetreten. Bitte versuche es erneut."}},SC={auth:EC,menu:bC,common:vC,content:wC,credentials:xC,emails:CC,settings:IC,upgrade:BC},NC={loginTitle:"Log in to AliasVault",username:"Username or email",usernamePlaceholder:"name / name@company.com",password:"Password",passwordPlaceholder:"Enter your password",rememberMe:"Remember me",loginButton:"Login",noAccount:"No account yet?",createVault:"Create new vault",twoFactorTitle:"Please enter the authentication code from your authenticator app.",authCode:"Authentication Code",authCodePlaceholder:"Enter 6-digit code",verify:"Verify",cancel:"Cancel",twoFactorNote:"Note: if you don't have access to your authenticator device, you can reset your 2FA with a recovery code by logging in via the website.",masterPassword:"Master Password",unlockVault:"Unlock Vault",unlockTitle:"Unlock Your Vault",unlockDescription:"Enter your master password to unlock your vault.",logout:"Logout",logoutConfirm:"Are you sure you want to logout?",sessionExpired:"Your session has expired. Please log in again.",unlockSuccess:"Vault unlocked successfully!",unlockSuccessTitle:"Your vault is successfully unlocked",unlockSuccessDescription:"You can now use autofill in login forms in your browser.",closePopup:"Close this popup",browseVault:"Browse vault contents",connectingTo:"Connecting to",switchAccounts:"Switch accounts?",loggedIn:"Logged in",errors:{invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Could not reach AliasVault server. Please try again later or contact support if the problem persists.",noToken:"Login failed -- no token returned",migrationError:"An error occurred while checking for pending migrations.",wrongPassword:"Incorrect password. Please try again.",accountLocked:"Account temporarily locked due to too many failed attempts.",networkError:"Network error. Please check your connection and try again.",loginDataMissing:"Login session expired. Please try again."}},kC={credentials:"Credentials",emails:"Emails",settings:"Settings"},TC={appName:"AliasVault",loading:"Loading...",error:"Error",success:"Success",cancel:"Cancel",use:"Use",delete:"Delete",close:"Close",copied:"Copied!",openInNewWindow:"Open in new window",language:"Language",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",copyToClipboard:"Copy to clipboard",loadingEmails:"Loading emails...",loadingTotpCodes:"Loading TOTP codes...",attachments:"Attachments",loadingAttachments:"Loading attachments...",settings:"Settings",recentEmails:"Recent emails",loginCredentials:"Login credentials",twoFactorAuthentication:"Two-factor authentication",alias:"Alias",notes:"Notes",fullName:"Full Name",firstName:"First Name",lastName:"Last Name",birthDate:"Birth Date",nickname:"Nickname",email:"Email",username:"Username",password:"Password",syncingVault:"Syncing vault",savingChangesToVault:"Saving changes to vault",uploadingVaultToServer:"Uploading vault to server",checkingVaultUpdates:"Checking for vault updates",syncingUpdatedVault:"Syncing updated vault",executingOperation:"Executing operation...",loadMore:"Load more",errors:{VaultOutdated:"Your vault is outdated. Please login on the AliasVault website and follow the steps.",serverNotAvailable:"The AliasVault server is not available. Please try again later or contact support if the problem persists.",clientVersionNotSupported:"This version of the AliasVault browser extension is not supported by the server anymore. Please update your browser extension to the latest version.",serverVersionNotSupported:"The AliasVault server needs to be updated to a newer version in order to use this browser extension. Please contact support if you need help.",unknownError:"An unknown error occurred",failedToStoreVault:"Failed to store vault",vaultNotAvailable:"Vault not available",failedToRetrieveData:"Failed to retrieve data",vaultIsLocked:"Vault is locked",failedToUploadVault:"Failed to upload vault",passwordChanged:"Your password has changed since the last time you logged in. Please login again for security reasons."},apiErrors:{UNKNOWN_ERROR:"An unknown error occurred. Please try again.",ACCOUNT_LOCKED:"Account temporarily locked due to too many failed attempts. Please try again later.",ACCOUNT_BLOCKED:"Your account has been disabled. If you believe this is a mistake, please contact support.",USER_NOT_FOUND:"Invalid username or password. Please try again.",INVALID_AUTHENTICATOR_CODE:"Invalid authenticator code. Please try again.",INVALID_RECOVERY_CODE:"Invalid recovery code. Please try again.",REFRESH_TOKEN_REQUIRED:"Refresh token is required.",INVALID_REFRESH_TOKEN:"Invalid refresh token.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Refresh token revoked successfully.",PUBLIC_REGISTRATION_DISABLED:"New account registration is currently disabled on this server. Please contact the administrator.",USERNAME_REQUIRED:"Username is required.",USERNAME_ALREADY_IN_USE:"Username is already in use.",USERNAME_AVAILABLE:"Username is available.",USERNAME_MISMATCH:"Username does not match the current user.",PASSWORD_MISMATCH:"The provided password does not match your current password.",ACCOUNT_SUCCESSFULLY_DELETED:"Account successfully deleted.",USERNAME_EMPTY_OR_WHITESPACE:"Username cannot be empty or whitespace.",USERNAME_TOO_SHORT:"Username too short: must be at least 3 characters long.",USERNAME_TOO_LONG:"Username too long: cannot be longer than 40 characters.",USERNAME_INVALID_EMAIL:"Invalid email address.",USERNAME_INVALID_CHARACTERS:"Username is invalid, can only contain letters or digits.",VAULT_NOT_UP_TO_DATE:"Your vault is not up-to-date. Please synchronize your vault and try again.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"The local vault is not up-to-date. Please synchronize your vault by refreshing the page and try again."}},DC={or:"or",new:"New",cancel:"Cancel",search:"Search",vaultLocked:"AliasVault is locked.",creatingNewAlias:"Creating new alias...",noMatchesFound:"No matches found",searchVault:"Search vault...",serviceName:"Service name",email:"Email",username:"Username",password:"Password",enterServiceName:"Enter service name",enterEmailAddress:"Enter email address",enterUsername:"Enter username",hideFor1Hour:"Hide for 1 hour (current site)",hidePermanently:"Hide permanently (current site)",createRandomAlias:"Create random alias",createUsernamePassword:"Create username/password",randomAlias:"Random alias",usernamePassword:"Username/password",createAndSaveAlias:"Create and save alias",createAndSaveCredential:"Create and save credential",randomIdentityDescription:"Generate a random identity with a random email address accessible in AliasVault.",randomIdentityDescriptionDropdown:"Random identity with random email",manualCredentialDescription:"Specify your own email address and username.",manualCredentialDescriptionDropdown:"Manual username and password",failedToCreateIdentity:"Failed to create identity. Please try again.",enterEmailAndOrUsername:"Enter email and/or username",autofillWithAliasVault:"Autofill with AliasVault",generateRandomPassword:"Generate random password (copy to clipboard)",generateNewPassword:"Generate new password",togglePasswordVisibility:"Toggle password visibility",passwordCopiedToClipboard:"Password copied to clipboard",enterEmailAndOrUsernameError:"Enter email and/or username",openAliasVaultToUpgrade:"Open AliasVault to upgrade",vaultUpgradeRequired:"Vault upgrade required.",dismissPopup:"Dismiss popup"},LC={title:"Credentials",addCredential:"Add Credential",editCredential:"Edit Credential",deleteCredential:"Delete Credential",credentialDetails:"Credential Details",serviceName:"Service Name",serviceNamePlaceholder:"e.g., Gmail, Facebook, Bank",website:"Website",websitePlaceholder:"https://example.com",username:"Username",usernamePlaceholder:"Enter username",password:"Password",passwordPlaceholder:"Enter password",generatePassword:"Generate Password",copyPassword:"Copy Password",showPassword:"Show Password",hidePassword:"Hide Password",notes:"Notes",notesPlaceholder:"Additional notes...",totp:"Two-Factor Authentication",totpCode:"TOTP Code",copyTotp:"Copy TOTP",totpSecret:"TOTP Secret",totpSecretPlaceholder:"Enter TOTP secret key",noCredentials:"No credentials found",noCredentialsDescription:"Add your first credential to get started",searchPlaceholder:"Search credentials...",welcomeTitle:"Welcome to AliasVault!",welcomeDescription:"To use the AliasVault browser extension: navigate to a website and use the AliasVault autofill popup to create a new credential.",createdAt:"Created",updatedAt:"Last updated",autofill:"Autofill",fillForm:"Fill Form",deleteConfirm:"Are you sure you want to delete this credential?",saveSuccess:"Credential saved successfully",tags:"Tags",addTag:"Add Tag",removeTag:"Remove Tag",folder:"Folder",selectFolder:"Select Folder",createFolder:"Create Folder",saveCredential:"Save credential",deleteCredentialTitle:"Delete Credential",deleteCredentialConfirm:"Are you sure you want to delete this credential? This action cannot be undone.",randomAlias:"Random Alias",manual:"Manual",service:"Service",serviceUrl:"Service URL",loginCredentials:"Login Credentials",generateRandomUsername:"Generate random username",generateRandomPassword:"Generate random password",changePasswordComplexity:"Change password complexity",passwordLength:"Password length",includeLowercase:"Include lowercase letters",includeUppercase:"Include uppercase letters",includeNumbers:"Include numbers",includeSpecialChars:"Include special characters",avoidAmbiguousChars:"Avoid ambiguous characters (o, 0, etc.)",generateNewPreview:"Generate new preview",generateRandomAlias:"Generate Random Alias",alias:"Alias",firstName:"First Name",lastName:"Last Name",nickName:"Nick Name",gender:"Gender",birthDate:"Birth Date",birthDatePlaceholder:"YYYY-MM-DD",metadata:"Metadata",validation:{required:"This field is required",serviceNameRequired:"Service name is required",invalidEmail:"Invalid email format",invalidDateFormat:"Date must be in YYYY-MM-DD format"},privateEmailTitle:"Private Email",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E encrypted, fully private.",publicEmailTitle:"Public Temp Email Providers",publicEmailDescription:"Anonymous but limited privacy. Email content is readable by anyone that knows the address.",useDomainChooser:"Use domain chooser",enterCustomDomain:"Enter custom domain",enterFullEmail:"Enter full email address",enterEmailPrefix:"Enter email prefix"},RC={title:"Emails",deleteEmailTitle:"Delete Email",deleteEmailConfirm:"Are you sure you want to permanently delete this email?",from:"From",to:"To",date:"Date",emailContent:"Email content",attachments:"Attachments",emailNotFound:"Email not found",noEmails:"No emails found",noEmailsDescription:"You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",dateFormat:{justNow:"just now",minutesAgo_single:"{{count}} min ago",minutesAgo_plural:"{{count}} mins ago",hoursAgo_single:"{{count}} hr ago",hoursAgo_plural:"{{count}} hrs ago",yesterday:"yesterday"},errors:{emailLoadError:"An error occurred while loading emails. Please try again later.",emailUnexpectedError:"An unexpected error occurred while loading emails. Please try again later."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"The current chosen email address is already in use. Please change the email address by editing this credential.",CLAIM_DOES_NOT_EXIST:"An error occurred while trying to load the emails. Please try to edit and save the credential entry to synchronize the database, then try again."}},QC={title:"Settings",serverUrl:"Server URL",language:"Language",autofillEnabled:"Enable Autofill",version:"Version",openInNewWindow:"Open in new window",openWebApp:"Open web app",loggedIn:"Logged in",logout:"Logout",globalSettings:"Global Settings",autofillPopup:"Autofill popup",activeOnAllSites:"Active on all sites (unless disabled below)",disabledOnAllSites:"Disabled on all sites",enabled:"Enabled",disabled:"Disabled",rightClickContextMenu:"Right-click context menu",autofillMatching:"Autofill Matching",autofillMatchingMode:"Autofill matching mode",autofillMatchingModeDescription:"Determines which credentials are considered a match and shown as suggestions in the autofill popup for a given website.",autofillMatchingDefault:"URL + subdomain + name wildcard",autofillMatchingUrlSubdomain:"URL + subdomain",autofillMatchingUrlExact:"Exact URL domain only",siteSpecificSettings:"Site-Specific Settings",autofillPopupOn:"Autofill popup on: ",enabledForThisSite:"Enabled for this site",disabledForThisSite:"Disabled for this site",temporarilyDisabledUntil:"Temporarily disabled until ",resetAllSiteSettings:"Reset all site-specific settings",appearance:"Appearance",theme:"Theme",useDefault:"Use default",light:"Light",dark:"Dark",keyboardShortcuts:"Keyboard Shortcuts",configureKeyboardShortcuts:"Configure keyboard shortcuts",configure:"Configure",security:"Security",clipboardClearTimeout:"Clear clipboard after copying",clipboardClearTimeoutDescription:"Automatically clear the clipboard after copying sensitive data",clipboardClearDisabled:"Never clear",clipboardClear5Seconds:"Clear after 5 seconds",clipboardClear10Seconds:"Clear after 10 seconds",clipboardClear15Seconds:"Clear after 15 seconds",autoLockTimeout:"Auto-lock Timeout",autoLockTimeoutDescription:"Automatically lock the vault after a period of inactivity",autoLockTimeoutHelp:"The vault will only lock after the specified period of inactivity (no autofill usage or extension popup opened). The vault will always lock when the browser is closed, regardless of this setting.",autoLockNever:"Never",autoLock15Seconds:"15 seconds",autoLock1Minute:"1 minute",autoLock5Minutes:"5 minutes",autoLock15Minutes:"15 minutes",autoLock30Minutes:"30 minutes",autoLock1Hour:"1 hour",autoLock4Hours:"4 hours",autoLock8Hours:"8 hours",autoLock24Hours:"24 hours",versionPrefix:"Version ",preferences:"Preferences",autofillSettings:"Autofill Settings",clipboardSettings:"Clipboard Settings",contextMenuSettings:"Context Menu Settings",contextMenu:"Context Menu",contextMenuEnabled:"Context menu is enabled",contextMenuDisabled:"Context menu is disabled",contextMenuDescription:"Right-click on input fields to access AliasVault options",selectLanguage:"Select Language",validation:{apiUrlRequired:"API URL is required",apiUrlInvalid:"Please enter a valid API URL",clientUrlRequired:"Client URL is required",clientUrlInvalid:"Please enter a valid client URL"}},UC={title:"Upgrade Vault",subtitle:"AliasVault has updated and your vault needs to be upgraded. This should only take a few seconds.",versionInformation:"Version Information",yourVault:"Your vault:",newVersion:"New version:",upgrade:"Upgrade Vault",upgrading:"Upgrading...",logout:"Logout",whatsNew:"What's New",whatsNewDescription:"An upgrade is required to support the following changes:",noDescriptionAvailable:"No description available for this version.",okay:"Ok",status:{preparingUpgrade:"Preparing upgrade...",vaultAlreadyUpToDate:"Vault is already up to date",startingDatabaseTransaction:"Starting database transaction...",applyingDatabaseMigrations:"Applying database migrations...",applyingMigration:"Applying migration {{current}} of {{total}}...",committingChanges:"Committing changes..."},alerts:{error:"Error",unableToGetVersionInfo:"Unable to get version information. Please try again.",selfHostedServer:"Self-Hosted Server",selfHostedWarning:"If you're using a self-hosted server, make sure to also update your self-hosted instance as otherwise logging in to the web client will stop working.",cancel:"Cancel",continueUpgrade:"Continue Upgrade",upgradeFailed:"Upgrade Failed",failedToApplyMigration:"Failed to apply migration ({{current}} of {{total}})",unknownErrorDuringUpgrade:"An unknown error occurred during the upgrade. Please try again."}},MC={auth:NC,menu:kC,common:TC,content:DC,credentials:LC,emails:RC,settings:QC,upgrade:UC},_C={loginTitle:"Kirjaudu sisään AliasVaultiin",username:"Käyttäjänimi tai sähköposti",usernamePlaceholder:"nimi / nimi@yritys.fi",password:"Salasana",passwordPlaceholder:"Syötä salasanasi",rememberMe:"Muista minut",loginButton:"Kirjaudu",noAccount:"Eikö sinulla ole vielä tiliä?",createVault:"Luo uusi holvi",twoFactorTitle:"Ole hyvä ja syötä tunnistautumiskoodi tunnistautumissovelluksestasi.",authCode:"Tunnistautumiskoodi",authCodePlaceholder:"Syötä 6-numeroinen koodi",verify:"Vahvista",cancel:"Peruuta",twoFactorNote:"Huomautus: jos sinulla ei ole pääsyä tunnistautumislaitteeseen, voit palauttaa 2FA:n palautuskoodilla kirjautumalla sisään sivuston kautta.",masterPassword:"Pääsalasana",unlockVault:"Avaa holvi",unlockTitle:"Avaa Holvisi",unlockDescription:"Syötä pääsalasanasi avataksesi holvisi lukituksen.",logout:"Kirjaudu ulos",logoutConfirm:"Oletko varma, että haluat kirjautua ulos?",sessionExpired:"Istuntosi on vanhentunut. Ole hyvä ja kirjaudu uudelleen.",unlockSuccess:"Holvi avattu onnistuneesti!",unlockSuccessTitle:"Holvisi lukitus on onnistuneesti avattu",unlockSuccessDescription:"Voit nyt käyttää selaimessasi olevia kirjautumislomakkeita automaattisesti.",closePopup:"Sulje tämä ponnahdusikkuna",browseVault:"Selaa holvin sisältöä",connectingTo:"Yhdistetään palvelimeen",switchAccounts:"Vaihdetaanko tiliä?",loggedIn:"Kirjautuneena",errors:{invalidCode:"Anna kelvollinen 6-numeroinen tunnistautumiskoodi.",serverError:"AliasVault-palvelimeen ei saatu yhteyttä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",noToken:"Kirjautuminen epäonnistui -- tunnusta ei palautettu",migrationError:"Tapahtui virhe tarkistettaessa odottavia siirtoja.",wrongPassword:"Virheellinen salasana. Yritä uudelleen.",accountLocked:"Tili on tilapäisesti lukittu liian monen epäonnistuneen yrityksen vuoksi. Yritä myöhemmin uudelleen.",networkError:"Verkkovirhe: tarkista yhteytesi ja yritä uudelleen.",loginDataMissing:"Kirjautumisistunto on vanhentunut. Yritä uudelleen."}},jC={credentials:"Käyttäjätunnukset",emails:"Sähköpostit",settings:"Asetukset"},OC={appName:"AliasVault",loading:"Ladataan...",error:"Virhe",success:"Onnistui",cancel:"Peruuta",use:"Käytä",delete:"Poista",close:"Sulje",copied:"Kopioitu!",openInNewWindow:"Avaa uudessa ikkunassa",language:"Kieli",enabled:"Käytössä",disabled:"Pois käytöstä",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",copyToClipboard:"Kopioi leikepöydälle",loadingEmails:"Ladataan sähköposteja...",loadingTotpCodes:"Ladataan TOTP-koodeja...",attachments:"Liitteet",loadingAttachments:"Ladataan liitteitä...",settings:"Asetukset",recentEmails:"Viimeisimmät sähköpostit",loginCredentials:"Sisäänkirjautumistiedot",twoFactorAuthentication:"Kaksivaiheinen tunnistautuminen",alias:"Alias",notes:"Muistiinpanot",fullName:"Koko nimi",firstName:"Etunimi",lastName:"Sukunimi",birthDate:"Syntymäpäivä",nickname:"Lempinimi",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",syncingVault:"Synkronoidaan holvia",savingChangesToVault:"Tallennetaan muutoksia holviin",uploadingVaultToServer:"Lähetetään holvi palvelimelle",checkingVaultUpdates:"Tarkistetaan holvin päivityksiä",syncingUpdatedVault:"Synkronoidaan päivitettyä holvia",executingOperation:"Suoritetaan toimintoa...",loadMore:"Lataa lisää",errors:{VaultOutdated:"Holvisi on vanhentunut. Kirjaudu AliasVaultin kotisivulle ja noudata ohjeita.",serverNotAvailable:"AliasVault-palvelin ei ole käytettävissä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",clientVersionNotSupported:"Palvelin ei enää tue tätä AliasVault-selainlaajennuksen versiota. Ole hyvä ja päivitä selaimen laajennus uusimpaan versioon.",serverVersionNotSupported:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta voit käyttää tätä selainlaajennusta. Ota yhteyttä tukeen, jos tarvitset apua.",unknownError:"Tapahtui tuntematon virhe",failedToStoreVault:"Holvin tallentaminen epäonnistui",vaultNotAvailable:"Holvi ei ole käytettävissä",failedToRetrieveData:"Tietojen nouto epäonnistui",vaultIsLocked:"Holvi on lukittu",failedToUploadVault:"Holvin lataaminen epäonnistui",passwordChanged:"Salasanasi on muuttunut edellisen kirjautumisen jälkeen. Ole hyvä ja kirjaudu uudelleen turvallisuussyistä."},apiErrors:{UNKNOWN_ERROR:"Tapahtui tuntematon virhe. Yritä uudelleen.",ACCOUNT_LOCKED:"Tili on tilapäisesti lukittu liian monen epäonnistuneen yrityksen vuoksi. Yritä myöhemmin uudelleen.",ACCOUNT_BLOCKED:"Tilisi on poistettu käytöstä. Jos uskot, että tämä on virhe, ota yhteyttä tukeen.",USER_NOT_FOUND:"Virheellinen käyttäjänimi tai salasana. Yritä uudelleen.",INVALID_AUTHENTICATOR_CODE:"Virheellinen tunnistautumiskoodi. Yritä uudelleen.",INVALID_RECOVERY_CODE:"Virheellinen palautuskoodi. Yritä uudelleen.",REFRESH_TOKEN_REQUIRED:"Päivitysavain vaaditaan.",INVALID_REFRESH_TOKEN:"Virheellinen päivitysavain.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Päivitysavain peruutettu onnistuneesti.",PUBLIC_REGISTRATION_DISABLED:"Uuden tilin rekisteröinti on poistettu käytöstä tällä palvelimella. Ota yhteyttä järjestelmänvalvojaan.",USERNAME_REQUIRED:"Käyttäjänimi vaaditaan.",USERNAME_ALREADY_IN_USE:"Käyttäjätunnus on jo käytössä",USERNAME_AVAILABLE:"Käyttäjänimi on saatavilla.",USERNAME_MISMATCH:"Käyttäjänimi ei vastaa nykyistä käyttäjää.",PASSWORD_MISMATCH:"Annettu salasana ei vastaa nykyistä salasanaasi.",ACCOUNT_SUCCESSFULLY_DELETED:"Käyttäjätili onnistuneesti poistettu,.",USERNAME_EMPTY_OR_WHITESPACE:"Käyttäjätunnus ei voi olla tyhjä.",USERNAME_TOO_SHORT:"Käyttäjätunnus on liian lyhyt: sen on oltava vähintään 3 merkkiä pitkä.",USERNAME_TOO_LONG:"Käyttäjätunnus on liian pitkä: se voi olla enintään 40 merkkiä.",USERNAME_INVALID_EMAIL:"Virheellinen sähköpostiosoite.",USERNAME_INVALID_CHARACTERS:"Käyttäjätunnus on virheellinen, voi sisältää vain kirjaimia tai numeroita.",VAULT_NOT_UP_TO_DATE:"Holvisi ei ole ajan tasalla. Synkronoi holvisi ja yritä uudelleen.",INTERNAL_SERVER_ERROR:"Sisäinen palvelinvirhe.",VAULT_ERROR:"Paikallinen holvi ei ole ajan tasalla. Synkronoi holvisi päivittämällä sivu ja yritä uudelleen."}},FC={or:"tai",new:"Uusi",cancel:"Peruuta",search:"Etsi",vaultLocked:"AliasVault on lukittu.",creatingNewAlias:"Luodaan uutta aliasta...",noMatchesFound:"Hakutuloksia ei löytynyt",searchVault:"Etsi holvi...",serviceName:"Palvelun nimi",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",enterServiceName:"Syötä palvelun nimi",enterEmailAddress:"Syötä sähköpostiosoite",enterUsername:"Syötä käyttäjänimi",hideFor1Hour:"Piilota 1 tunniksi (nykyinen sivusto)",hidePermanently:"Piilota pysyvästi (nykyinen sivu)",createRandomAlias:"Luo sattumanvarainen alias",createUsernamePassword:"Luo käyttäjänimi/salasana",randomAlias:"Sattumanvarainen alias",usernamePassword:"Käyttäjänimi/Salasana",createAndSaveAlias:"Luo ja tallenna alias",createAndSaveCredential:"Luo ja tallenna käyttäjätunnus",randomIdentityDescription:"Luo satunnainen identiteetti, jolla on satunnainen sähköpostiosoite, johon on pääsy AliasVaultissa.",randomIdentityDescriptionDropdown:"Satunnainen identiteetti satunnaisella sähköpostiosoitteella",manualCredentialDescription:"Määritä oma sähköpostiosoitteesi ja käyttäjänimesi.",manualCredentialDescriptionDropdown:"Manuaalinen käyttäjänimi ja salasana",failedToCreateIdentity:"Henkilöllisyyden luonti epäonnistui. Yritä uudelleen.",enterEmailAndOrUsername:"Syötä sähköpostiosoite ja/tai käyttäjänimi",autofillWithAliasVault:"Automaattinen täyttö AliasVaultilla",generateRandomPassword:"Luo sattumanvarainen salasana (kopioi leikepöydälle)",generateNewPassword:"Luo uusi salasana",togglePasswordVisibility:"Vaihda salasanan näkyvyyttä",passwordCopiedToClipboard:"Salasana kopioitu leikepöydälle",enterEmailAndOrUsernameError:"Syötä sähköpostiosoite ja/tai käyttäjänimi",openAliasVaultToUpgrade:"Avaa AliasVault päivittääksesi",vaultUpgradeRequired:"Holvin päivitys vaaditaan.",dismissPopup:"Hylkää ponnahdusikkuna"},VC={title:"Käyttäjätunnukset",addCredential:"Lisää käyttäjätunnus",editCredential:"Muokkaa käyttäjätunnusta",deleteCredential:"Poista käyttäjätunnus",credentialDetails:"Käyttäjätunnuksen tiedot",serviceName:"Palvelun nimi",serviceNamePlaceholder:"esim. Gmail, Facebook, Pankki",website:"Verkkosivusto",websitePlaceholder:"https://esimerkki.fi",username:"Käyttäjänimi",usernamePlaceholder:"Syötä käyttäjänimi",password:"Salasana",passwordPlaceholder:"Syötä salasana",generatePassword:"Luo salasana",copyPassword:"Kopioi salasana",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",notes:"Muistiinpanot",notesPlaceholder:"Muut huomautukset...",totp:"Kaksivaiheinen tunnistautuminen",totpCode:"TOTP koodi",copyTotp:"Kopioi TOTP-koodi",totpSecret:"TOTP Salaus",totpSecretPlaceholder:"Syötä TOTP salainen avain",noCredentials:"Käyttäjätunnuksia ei löytynyt",noCredentialsDescription:"Lisää ensimmäinen käyttäjätunnuksesi aloittaaksesi",searchPlaceholder:"Etsi käyttäjätunnuksia...",welcomeTitle:"Tervetuloa AliasVaultiin!",welcomeDescription:"Käyttääksesi AliasVault-selainlaajennusta: Siirry sivustolle ja käytä AliasVaultin automaattisen täytön ponnahdusikkunaa luodaksesi uuden käyttäjätunnuksen.",createdAt:"Luotu",updatedAt:"Viimeksi päivitetty",autofill:"Automaattinen täyttö",fillForm:"Täytä lomake",deleteConfirm:"Oletko varma, että haluat poistaa tämän käyttäjätunnuksen?",saveSuccess:"Käyttäjätunnus tallennettu onnistuneesti.",tags:"Tunnisteet",addTag:"Lisää tunniste",removeTag:"Poista tunniste",folder:"Kansio",selectFolder:"Valitse kansio",createFolder:"Luo kansio",saveCredential:"Tallenna käyttäjätunnus",deleteCredentialTitle:"Poista käyttäjätunnus",deleteCredentialConfirm:"Oletko varma, että haluat poistaa tämän tunnuksen? Tätä toimintoa ei voi perua.",randomAlias:"Sattumanvarainen Alias",manual:"Käyttöopas",service:"Palvelu",serviceUrl:"Palvelun URL-osoite",loginCredentials:"Sisäänkirjautumistiedot",generateRandomUsername:"Luo sattumanvarainen käyttäjätunnus",generateRandomPassword:"Luo sattumanvarainen salasana",changePasswordComplexity:"Muuta salasanan monimutkaisuutta",passwordLength:"Salasanan pituus",includeLowercase:"Sisällytä pienet kirjaimet",includeUppercase:"Sisällytä isot kirjaimet",includeNumbers:"Sisällytä numerot",includeSpecialChars:"Sisällytä erikoismerkit",avoidAmbiguousChars:"Vältä epäselviä merkkejä (o, 0 jne.)",generateNewPreview:"Luo uusi esikatselu",generateRandomAlias:"Luo sattumanvarainen alias",alias:"Alias",firstName:"Etunimi",lastName:"Sukunimi",nickName:"Lempinimi",gender:"Sukupuoli",birthDate:"Syntymäpäivä",birthDatePlaceholder:"VVVV-KK-PP.",metadata:"Metatiedot",validation:{required:"Tämä kenttä on pakollinen.",serviceNameRequired:"Palvelun nimi on pakollinen",invalidEmail:"Virheellinen sähköpostiosoitteen muoto",invalidDateFormat:"Päivämäärän on oltava muodossa VVVV-KK-PP."},privateEmailTitle:"Yksityinen sähköposti",privateEmailAliasVaultServer:"AliasVault-palvelin",privateEmailDescription:"E2E salattu, täysin yksityinen.",publicEmailTitle:"Julkiset väliaikaisen sähköpostiosoitteen tarjoajat",publicEmailDescription:"Anonyymi mutta rajoitettu yksityisyys. Käytettävissä kaikille, jotka tuntevat osoitteen.",useDomainChooser:"Käytä verkkotunnuksen valintaa",enterCustomDomain:"Anna oma verkkotunnus",enterFullEmail:"Syötä täysi sähköpostiosoite",enterEmailPrefix:"Syötä sähköpostin etuliite"},HC={title:"Sähköpostit",deleteEmailTitle:"Poista sähköposti",deleteEmailConfirm:"Oletko varma, että haluat poistaa tämän kuvan pysyvästi?",from:"Lähettäjä",to:"Vastaanottaja",date:"Päivämäärä",emailContent:"Sähköpostin sisältö",attachments:"Liitteet",emailNotFound:"Sähköpostia ei löytynyt",noEmails:"Sähköposteja ei löytynyt",noEmailsDescription:"Et ole vielä vastaanottanut sähköposteja yksityisissä sähköpostiosoitteissasi. Kun saat uuden sähköpostiviestin, se näkyy täällä.",dateFormat:{justNow:"juuri nyt",minutesAgo_single:"{{count}} min sitten",minutesAgo_plural:"{{count}} minuuttia sitten",hoursAgo_single:"{{count}} h sitten",hoursAgo_plural:"{{count}} tuntia sitten",yesterday:"eilen"},errors:{emailLoadError:"Sähköpostien lataamisessa tapahtui virhe. Yritä myöhemmin uudelleen.",emailUnexpectedError:"Odottamaton virhe sähköpostien latauksen aikana. Yritä myöhemmin uudelleen."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Nykyinen valittu sähköpostiosoite on jo käytössä. Ole hyvä ja vaihda sähköpostiosoite muokkaamalla tätä tunnusta.",CLAIM_DOES_NOT_EXIST:"Tapahtui virhe ladattaessa sähköposteja. Yritä muokata ja tallentaa tunnistetiedot synkronoidaksesi tietokannan, ja yritä sitten uudelleen."}},GC={title:"Asetukset",serverUrl:"Palvelimen URL-osoite",language:"Kieli",autofillEnabled:"Ota automaattitäyttö käyttöön",version:"Versio",openInNewWindow:"Avaa uudessa ikkunassa",openWebApp:"Avaa verkkosovellus",loggedIn:"Kirjautuneena",logout:"Kirjaudu ulos",globalSettings:"Yleiset asetukset",autofillPopup:"Automaattisen täytön ponnahdusikkuna",activeOnAllSites:"Aktiivinen kaikilla sivustoilla (paitsi jos pois päältä alla)",disabledOnAllSites:"Poistettu käytöstä kaikilla sivustoilla",enabled:"Käytössä",disabled:"Pois käytöstä",rightClickContextMenu:"Oikea-klikkauksen kontekstivalikko",autofillMatching:"Autofill osuma",autofillMatchingMode:"Autofill osumat käytössä",autofillMatchingModeDescription:"Määrittää mitkä käyttäjätunnukset katsotaan osumaksi ja näytetään automaattisen täytön ponnahdusikkunan ehdotuksina tietylle sivustolle.",autofillMatchingDefault:"URL + alitoimialue + nimi jokerimerkki",autofillMatchingUrlSubdomain:"URL + alitoimialue",autofillMatchingUrlExact:"Tarkka URL-verkkotunnus vain",siteSpecificSettings:"Sivukohtaiset asetukset",autofillPopupOn:"Automaattisen täytön ponnahdusikkuna päällä: ",enabledForThisSite:"Käytössä tällä sivustolla",disabledForThisSite:"Ei käytössä tällä sivustolla",temporarilyDisabledUntil:"Tilapäisesti pois päältä ",resetAllSiteSettings:"Nollaa kaikki sivustokohtaiset asetukset",appearance:"Ulkoasu",theme:"Teema",useDefault:"Käytä oletusta",light:"Vaalea",dark:"Tumma",keyboardShortcuts:"Pikanäppäimet",configureKeyboardShortcuts:"Määritä pikanäppäimet",configure:"Määritä",security:"Tietoturva",clipboardClearTimeout:"Tyhjennä leikepöytä kopioinnin jälkeen",clipboardClearTimeoutDescription:"Tyhjennä leikepöytä automaattisesti arkaluonteisten tietojen kopioinnin jälkeen",clipboardClearDisabled:"Älä tyhjennä koskaan",clipboardClear5Seconds:"Tyhjennä 5 sekunnin jälkeen",clipboardClear10Seconds:"Tyhjennä 10 sekunnin jälkeen",clipboardClear15Seconds:"Tyhjennä 15 sekunnin jälkeen",autoLockTimeout:"Automaattisen lukituksen aikakatkaisu",autoLockTimeoutDescription:"Lukitse holvi automaattisesti käyttämättä jäämisen jälkeen",autoLockTimeoutHelp:"Holvi lukittuu vain määritellyn käyttöajan jälkeen (ei automaattisen täytön käyttöä tai laajennuksen ponnahdusikkunaa auki). Holvi lukittuu aina, kun selain on suljettu, tästä asetuksesta riippumatta.",autoLockNever:"Ei koskaan",autoLock15Seconds:"15 sekuntia",autoLock1Minute:"1 minuutti",autoLock5Minutes:"5 minuuttia",autoLock15Minutes:"15 minuuttia",autoLock30Minutes:"30 minuuttia",autoLock1Hour:"1 tunti",autoLock4Hours:"4 tuntia",autoLock8Hours:"8 tuntia",autoLock24Hours:"24 tuntia",versionPrefix:"Versio",preferences:"Määritykset",autofillSettings:"Automaatisen täytön asetukset",clipboardSettings:"Leikepöydän asetukset",contextMenuSettings:"Sisältövalikon asetukset",contextMenu:"Sisältövalikko",contextMenuEnabled:"Sisältövalikko käytössä",contextMenuDisabled:"Sisältövalikko pois käytöstä",contextMenuDescription:"Napsauta syöttökenttiä hiiren kakkospainikkeella päästäksesi käsiksi AliasVaultin valintoihin",selectLanguage:"Valitse kieli",validation:{apiUrlRequired:"API URL-osoite vaaditaan",apiUrlInvalid:"Anna kelvollinen API URL-osoite",clientUrlRequired:"Asiakkaan URL-osoite vaaditaan",clientUrlInvalid:"Anna kelvollinen asiakkaan URL-osoite"}},PC={title:"Päivitä holvi",subtitle:"AliasVault on päivitetty ja holvisi on päivitettävä. Tämän pitäisi kestää vain muutama sekunti.",versionInformation:"Versiotiedot",yourVault:"Sinun holvisi:",newVersion:"Uusi versio:",upgrade:"Päivitä Holvi",upgrading:"Päivitetään...",logout:"Kirjaudu ulos",whatsNew:"Mitä uutta?",whatsNewDescription:"Päivitys on tarpeen, jotta voidaan tukea seuraavia muutoksia:",noDescriptionAvailable:"Kuvausta ei ole saatavilla tälle versiolle.",okay:"Ok",status:{preparingUpgrade:"Valmistellaan päivityksiä...",vaultAlreadyUpToDate:"Holvi on jo ajan tasalla",startingDatabaseTransaction:"Aloitetaan tietokannan siirtoa...",applyingDatabaseMigrations:"Toteutetaan tietokannan siirtoja...",applyingMigration:"Siirretään tietoja: {{current}} / {{total}}...",committingChanges:"Suoritetaan muutoksia..."},alerts:{error:"Virhe",unableToGetVersionInfo:"Versiotietoja ei löytynyt. Yritä uudelleen.",selfHostedServer:"Itsehallinnoitu palvelin",selfHostedWarning:"Jos käytät itsehallintoitua palvelina, varmista myös että päivität itsehallinnoidun palvelimesi, jos muutoin kirjautuminen web-asiakkaan kautta lakkaa toimimasta.",cancel:"Peruuta",continueUpgrade:"Jatka päivitystä",upgradeFailed:"Päivitys epäonnistui",failedToApplyMigration:"Tietojen siirto epäonnistui {{current}} / {{total}} ",unknownErrorDuringUpgrade:"Päivityksen aikana tapahtui tuntematon virhe. Yritä uudelleen."}},zC={auth:_C,menu:jC,common:OC,content:FC,credentials:VC,emails:HC,settings:GC,upgrade:PC},qC={loginTitle:"Accedi ad AliasVaultriem",username:"Nome utente o mail",usernamePlaceholder:"nome / nome@azienda.com",password:"Password",passwordPlaceholder:"Inserisci la tua password",rememberMe:"Ricordati di me",loginButton:"Accedi",noAccount:"Non hai ancora un account?",createVault:"Crea una nuova cassaforte",twoFactorTitle:"Inserisci il codice di autenticazione dalla tua app di autenticazione.",authCode:"Codice di Autenticazione",authCodePlaceholder:"Inserisci il codice a 6 cifre",verify:"Verifica",cancel:"Annulla",twoFactorNote:"Nota: se non hai accesso al tuo dispositivo di autenticazione, puoi reimpostare il tuo 2FA con un codice di recupero accedendo tramite il sito web.",masterPassword:"Password principale",unlockVault:"Sblocca Cassaforte",unlockTitle:"Sblocca la tua cassaforte",unlockDescription:"Inserisci la tua password principale per sbloccare la tua cassaforte.",logout:"Disconnetti",logoutConfirm:"Sei sicuro di volerti disconnettere?",sessionExpired:"La sessione è scaduta. Effettua di nuovo il login.",unlockSuccess:"Cassaforte sbloccata con successo!",unlockSuccessTitle:"La cassaforte è stata sbloccata con successo",unlockSuccessDescription:"Ora puoi usare l'auto-riempimento nei moduli di accesso nel tuo browser.",closePopup:"Chiudi questo popup",browseVault:"Sfoglia i contenuti della cassaforte",connectingTo:"Connessione a",switchAccounts:"Cambia account",loggedIn:"Accesso effettuato",errors:{invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile connettersi al server di AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",noToken:"Accesso fallito — nessun token ricevuto",migrationError:"Si è verificato un errore nel controllo delle migrazioni pendenti.",wrongPassword:"Password non corretta. Riprova nuovamente.",accountLocked:"Account temporaneamente bloccato a causa di troppi tentativi falliti.",networkError:"Errore di rete: Controlla la tua connessione e riprova.",loginDataMissing:"Sessione di accesso scaduta. Effettua nuovamente l'accesso."}},YC={credentials:"Credenziali",emails:"E-Mail",settings:"Impostazioni"},KC={appName:"AliasVault",loading:"Caricamento in corso...",error:"Errore",success:"Riuscito",cancel:"Annulla",use:"Usa",delete:"Elimina",close:"Chiudi",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",language:"Lingua",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",copyToClipboard:"Copia negli appunti",loadingEmails:"Caricamento e-mail in corso...",loadingTotpCodes:"Caricamento codici TOTP in corso...",attachments:"Allegati",loadingAttachments:"Caricamento allegati in corso...",settings:"Impostazioni",recentEmails:"E-mail recenti",loginCredentials:"Credenziali di accesso",twoFactorAuthentication:"Autenticazione a due fattori",alias:"Alias",notes:"Note",fullName:"Nome completo",firstName:"Nome",lastName:"Cognome",birthDate:"Data di nascita",nickname:"Soprannome",email:"E-mail",username:"Nome utente",password:"Password",syncingVault:"Sincronizzazione cassaforte",savingChangesToVault:"Salvataggio modifiche cassaforte",uploadingVaultToServer:"Caricamento cassaforte sul server",checkingVaultUpdates:"Controllo aggiornamenti cassaforte",syncingUpdatedVault:"Sincronizzazione cassaforte aggiornata",executingOperation:"Esecuzione operazione...",loadMore:"Carica altro",errors:{VaultOutdated:"La tua cassaforte è obsoleta. Per favore accedi al sito di AliasVault e segui le istruzioni.",serverNotAvailable:"Il server di AliasVault non è disponibile. Riprova più tardi o contatta il supporto se il problema persiste.",clientVersionNotSupported:"Questa versione dell'estensione del browser AliasVault non è più supportata dal server. Aggiorna l'estensione alla versione più recente.",serverVersionNotSupported:"Il server di AliasVault necessita un aggiornamento a una versione più recente per poter usare questa estensione. Contatta il supporto se hai bisogno di assistenza.",unknownError:"Si è verificato un errore sconosciuto",failedToStoreVault:"Salvataggio cassaforte non riuscito",vaultNotAvailable:"Cassaforte non disponibile",failedToRetrieveData:"Recupero dati non riuscito",vaultIsLocked:"La cassaforte è bloccata",failedToUploadVault:"Caricare della cassaforte non riuscito.",passwordChanged:"La tua password è cambiata dall'ultima volta che hai effettuato l'accesso. Effettua nuovamente l'accesso per motivi di sicurezza."},apiErrors:{UNKNOWN_ERROR:"Si è verificato un errore sconosciuto. Riprova.",ACCOUNT_LOCKED:"Account temporaneamente bloccato a causa di troppi tentativi falliti. Riprova più tardi.",ACCOUNT_BLOCKED:"Il tuo account è stato disabilitato. Se ritieni che sia un errore, contatta il supporto.",USER_NOT_FOUND:"Nome utente o password non validi. Riprova.",INVALID_AUTHENTICATOR_CODE:"Codice di autenticazione non valido. Riprova.",INVALID_RECOVERY_CODE:"Codice di recupero non valido. Riprova.",REFRESH_TOKEN_REQUIRED:"È necessario aggiornare il token.",INVALID_REFRESH_TOKEN:"Token di aggiornamento non valido",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Aggiornamento token revocato con successo.",PUBLIC_REGISTRATION_DISABLED:"La registrazione di nuovi account è attualmente disabilitata su questo server. Contatta l'amministratore.",USERNAME_REQUIRED:"È richiesto il nome utente.",USERNAME_ALREADY_IN_USE:"Il nome utente è già in uso.",USERNAME_AVAILABLE:"Il nome utente è disponibile.",USERNAME_MISMATCH:"Il nome utente non corrisponde all'utente corrente.",PASSWORD_MISMATCH:"La password fornita non corrisponde alla password attuale.",ACCOUNT_SUCCESSFULLY_DELETED:"Account eliminato con successo.",USERNAME_EMPTY_OR_WHITESPACE:"Il nome utente non può essere vuoto o contenere spazi.",USERNAME_TOO_SHORT:"Nome utente troppo corto: deve contenere almeno 3 caratteri.",USERNAME_TOO_LONG:"Nome utente troppo lungo: non può superare i 40 caratteri.",USERNAME_INVALID_EMAIL:"Indirizzo email non valido.",USERNAME_INVALID_CHARACTERS:"Il nome utente non è valido, può contenere solo lettere o cifre.",VAULT_NOT_UP_TO_DATE:"La tua cassaforte non è aggiornata. Sincronizzala e riprova.",INTERNAL_SERVER_ERROR:"Errore interno del server.",VAULT_ERROR:"La cassaforte locale non è aggiornata. Sincronizzala ricaricando la pagina e riprova."}},JC={or:"o",new:"Nuovo",cancel:"Annulla",search:"Cerca",vaultLocked:"AliasVault è bloccato.",creatingNewAlias:"Creazione nuovo alias...",noMatchesFound:"Nessun risultato trovato",searchVault:"Cerca nella cassaforte...",serviceName:"Nome servizio",email:"E-mail",username:"Nome utente",password:"Password",enterServiceName:"Inserisci nome servizio",enterEmailAddress:"Inserisci indirizzo email",enterUsername:"Inserisci nome utente",hideFor1Hour:"Nascondi per 1 ora (sito corrente)",hidePermanently:"Nascondi permanentemente (sito corrente)",createRandomAlias:"Crea alias casuale",createUsernamePassword:"Crea nome utente/password",randomAlias:"Alias casuale",usernamePassword:"Nome utente/password",createAndSaveAlias:"Crea e salva alias",createAndSaveCredential:"Crea e salva credenziali",randomIdentityDescription:"Genera un'identità casuale con un indirizzo email casuale accessibile in AliasVault.",randomIdentityDescriptionDropdown:"Identità casuale con email casuale",manualCredentialDescription:"Specifica il tuo indirizzo email e nome utente.",manualCredentialDescriptionDropdown:"Nome utente e password manuali",failedToCreateIdentity:"Impossibile creare identità. Riprova.",enterEmailAndOrUsername:"Inserisci email e/o nome utente",autofillWithAliasVault:"Compilazione automatica con AliasVault",generateRandomPassword:"Genera password casuale (copia negli appunti)",generateNewPassword:"Genera nuova password",togglePasswordVisibility:"Mostra/Nascondi password",passwordCopiedToClipboard:"Password copiata negli appunti",enterEmailAndOrUsernameError:"Inserisci email e/o nome utente",openAliasVaultToUpgrade:"Apri AliasVault per aggiornare",vaultUpgradeRequired:"Aggiornamento della cassaforte richiesto.",dismissPopup:"Chiudi finestra"},XC={title:"Credenziali",addCredential:"Aggiungi credenziali",editCredential:"Modifica credenziali",deleteCredential:"Elimina credenziali",credentialDetails:"Dettagli credenziali",serviceName:"Nome servizio",serviceNamePlaceholder:"es. Gmail, Facebook, Banca",website:"Sito web",websitePlaceholder:"https://esempio.com",username:"Nome utente",usernamePlaceholder:"Inserisci nome utente",password:"Password",passwordPlaceholder:"Inserisci password",generatePassword:"Genera password",copyPassword:"Copia password",showPassword:"Mostra password",hidePassword:"Nascondi password",notes:"Note",notesPlaceholder:"Note aggiuntive...",totp:"Autenticazione a due fattori",totpCode:"Codice TOTP",copyTotp:"Copia TOTP",totpSecret:"Segreto TOTP",totpSecretPlaceholder:"Inserisci chiave segreta TOTP",noCredentials:"Credenziali non trovate",noCredentialsDescription:"Aggiungi le tue prime credenziali per iniziare",searchPlaceholder:"Cerca credenziali...",welcomeTitle:"Benvenuto in AliasVault!",welcomeDescription:"Per usare l'estensione browser AliasVault: naviga su un sito e usa la finestra di compilazione automatica per creare una nuova credenziale.",createdAt:"Creato",updatedAt:"Ultimo aggiornamento",autofill:"Compilazione automatica",fillForm:"Compila modulo",deleteConfirm:"Sei sicuro di voler eliminare questa credenziale?",saveSuccess:"Credenziali salvate con successo",tags:"Tag",addTag:"Aggiungi tag",removeTag:"Rimuovi tag",folder:"Cartella",selectFolder:"Seleziona cartella",createFolder:"Crea cartella",saveCredential:"Salva credenziale",deleteCredentialTitle:"Elimina credenziale",deleteCredentialConfirm:"Sei sicuro di voler eliminare queste credenziali? Questa azione non può essere annullata.",randomAlias:"Alias casuale",manual:"Manuale",service:"Servizio",serviceUrl:"URL del servizio",loginCredentials:"Credenziali di accesso",generateRandomUsername:"Genera nome utente casuale",generateRandomPassword:"Genera password casuale",changePasswordComplexity:"Modifica complessità password",passwordLength:"Lunghezza password",includeLowercase:"Includi lettere minuscole",includeUppercase:"Includi lettere maiuscole",includeNumbers:"Includi numeri",includeSpecialChars:"Includi caratteri speciali",avoidAmbiguousChars:"Evita caratteri ambigui (o, 0, ecc.)",generateNewPreview:"Genera nuova anteprima",generateRandomAlias:"Genera alias casuale",alias:"Alias",firstName:"Nome",lastName:"Cognome",nickName:"Soprannome",gender:"Genere",birthDate:"Data di nascita",birthDatePlaceholder:"AAAA-MM-GG",metadata:"Metadati",validation:{required:"Questo campo è obbligatorio",serviceNameRequired:"Il nome del servizio è obbligatorio",invalidEmail:"Formato email non valido",invalidDateFormat:"La data deve essere nel formato AAAA-MM-GG"},privateEmailTitle:"Email privata",privateEmailAliasVaultServer:"Server AliasVault",privateEmailDescription:"E2E crittografato, completamente privato.",publicEmailTitle:"Fornitori Pubblici di Email Temporanee",publicEmailDescription:"Anonimi ma con privacy ridotta. Accessibile a chiunque conosca l'indirizzo.",useDomainChooser:"Usa selettore di dominio",enterCustomDomain:"Inserisci un dominio personalizzato",enterFullEmail:"Inserisci l'indirizzo email completo",enterEmailPrefix:"Inserisci prefisso email"},$C={title:"Email",deleteEmailTitle:"Elimina Email",deleteEmailConfirm:"Sei sicuro di voler eliminare definitivamente questa email?",from:"Da",to:"A",date:"Data",emailContent:"Contenuto email",attachments:"Allegati",emailNotFound:"Email non trovata",noEmails:"Nessuna email trovata",noEmailsDescription:"Non hai ancora ricevuto email ai tuoi indirizzi email privati. Quando ne riceverai una nuova, apparirà qui.",dateFormat:{justNow:"proprio ora",minutesAgo_single:"{{count}} min fa",minutesAgo_plural:"{{count}} min fa",hoursAgo_single:"{{count}} ora fa",hoursAgo_plural:"{{count}} ore fa",yesterday:"ieri"},errors:{emailLoadError:"Si è verificato un errore durante il caricamento delle email. Riprova più tardi.",emailUnexpectedError:"Si è verificato un errore imprevisto durante il caricamento delle email. Riprova più tardi."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"L'indirizzo email attualmente scelto è già in uso. Cambia l'indirizzo modificando queste credenziali.",CLAIM_DOES_NOT_EXIST:"Si è verificato un errore durante il caricamento delle email. Prova a modificare e salvare le credenziali per sincronizzare il database, poi riprova."}},WC={title:"Impostazioni",serverUrl:"URL del server",language:"Lingua",autofillEnabled:"Abilita compilazione automatica",version:"Versione",openInNewWindow:"Apri in una nuova finestra",openWebApp:"Apri app web",loggedIn:"Accesso effettuato",logout:"Disconnetti",globalSettings:"Impostazioni globali",autofillPopup:"Popup compilazione automatica",activeOnAllSites:"Attivo su tutti i siti (a meno che non sia disabilitato sotto)",disabledOnAllSites:"Disabilitato su tutti i siti",enabled:"Abilitato",disabled:"Disabilitato",rightClickContextMenu:"Menu contestuale clic destro",autofillMatching:"Riconoscimento campi automatica.",autofillMatchingMode:"Modalità riconoscimento capi automatica",autofillMatchingModeDescription:"Determina quali credenziali vengono considerate corrispondenti e mostrate come suggerimenti nel popup di compilazione automatica per un determinato sito web.",autofillMatchingDefault:"URL + sottodominio + nome wildcard",autofillMatchingUrlSubdomain:"URL + sottodominio",autofillMatchingUrlExact:"Solo dominio URL esatto",siteSpecificSettings:"Impostazioni specifiche per sito",autofillPopupOn:"Finestra compilazione automatica su: ",enabledForThisSite:"Abilitato per questo sito",disabledForThisSite:"Disabilitato per questo sito",temporarilyDisabledUntil:"Disabilitato temporaneamente fino a ",resetAllSiteSettings:"Reimposta tutte le impostazioni specifiche per sito",appearance:"Aspetto",theme:"Tema",useDefault:"Usa predefinito",light:"Chiaro",dark:"Scuro",keyboardShortcuts:"Scorciatoie da tastiera",configureKeyboardShortcuts:"Configura scorciatoie da tastiera",configure:"Configura",security:"Sicurezza",clipboardClearTimeout:"Cancella appunti dopo la copia",clipboardClearTimeoutDescription:"Cancella automaticamente gli appunti dopo aver copiato i dati sensibili",clipboardClearDisabled:"Non pulire mai",clipboardClear5Seconds:"Cancella dopo 5 secondi",clipboardClear10Seconds:"Cancella dopo 10 secondi",clipboardClear15Seconds:"Cancella dopo 15 secondi",autoLockTimeout:"Timeout Blocco Automatico",autoLockTimeoutDescription:"Blocca automaticamente la cassaforte dopo un periodo di inattività",autoLockTimeoutHelp:"La cassaforte si bloccherà solo dopo il periodo specificato di inattività (nessun utilizzo di riempimento automatico o estensione popup aperto). La cassaforte si bloccherà sempre quando il browser è chiuso, indipendentemente da questa impostazione.",autoLockNever:"Mai",autoLock15Seconds:"15 secondi",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minuti",autoLock15Minutes:"15 minuti",autoLock30Minutes:"30 minuti",autoLock1Hour:"1 ora",autoLock4Hours:"4 ore",autoLock8Hours:"8 ore",autoLock24Hours:"24 ore",versionPrefix:"Versione ",preferences:"Preferenze",autofillSettings:"Impostazioni di riempimento automatico",clipboardSettings:"Impostazioni appunti",contextMenuSettings:"Preferenze menu contestuale",contextMenu:"Menu contestuale",contextMenuEnabled:"Il menu contestuale è attivato",contextMenuDisabled:"Il menu contestuale è disabilitato",contextMenuDescription:"Click destro sui campi di input per accedere alle opzioni di AliasVault",selectLanguage:"Seleziona la lingua",validation:{apiUrlRequired:"L'URL API è obbligatorio",apiUrlInvalid:"Inserisci un URL API valido",clientUrlRequired:"L'URL del client è obbligatorio",clientUrlInvalid:"Inserisci un URL del client valido"}},ZC={title:"Aggiorna Cassaforte",subtitle:"AliasVault è stato aggiornato e la tua cassaforte deve essere aggiornata. Dovrebbe richiedere solo pochi secondi.",versionInformation:"Informazioni sulla versione",yourVault:"La tua cassaforte:",newVersion:"Nuova versione:",upgrade:"Aggiorna cassaforte",upgrading:"Aggiornamento in corso...",logout:"Disconnetti",whatsNew:"Novità",whatsNewDescription:"È richiesto un aggiornamento per supportare le seguenti modifiche:",noDescriptionAvailable:"Nessuna descrizione disponibile per questa versione.",okay:"Ok",status:{preparingUpgrade:"Preparazione aggiornamento...",vaultAlreadyUpToDate:"La cassaforte è già aggiornata",startingDatabaseTransaction:"Avvio transazione database...",applyingDatabaseMigrations:"Applicazione migrazioni database...",applyingMigration:"Applicazione migrazione {{current}} di {{total}}...",committingChanges:"Modifica in corso..."},alerts:{error:"Errore",unableToGetVersionInfo:"Impossibile ottenere informazioni sulla versione. Riprova.",selfHostedServer:"Server Autospitato",selfHostedWarning:"Se usi un server autospitato, assicurati di aggiornare anche la tua istanza, altrimenti l'accesso al client web smetterà di funzionare.",cancel:"Annulla",continueUpgrade:"Continua aggiornamento",upgradeFailed:"Aggiornamento non riuscito",failedToApplyMigration:"Impossibile eseguire la migrazione ({{current}} di {{total}})",unknownErrorDuringUpgrade:"Si è verificato un errore sconosciuto durante l'aggiornamento. Riprova."}},e1={auth:qC,menu:YC,common:KC,content:JC,credentials:XC,emails:$C,settings:WC,upgrade:ZC},t1={loginTitle:"Inloggen bij AliasVault",username:"Gebruikersnaam of e-mail",usernamePlaceholder:"naam / naam@bedrijf.com",password:"Wachtwoord",passwordPlaceholder:"Voer je wachtwoord in",rememberMe:"Onthoud mij",loginButton:"Inloggen",noAccount:"Nog geen account?",createVault:"Nieuwe vault aanmaken",twoFactorTitle:"Voer de authenticatiecode van je authenticator-app in.",authCode:"Authenticatiecode",authCodePlaceholder:"Voer 6-cijferige code in",verify:"Verifiëren",cancel:"Annuleren",twoFactorNote:"Opmerking: als je geen toegang hebt tot je authenticator, kunt je je 2FA resetten door met een in te loggen via de website.",masterPassword:"Hoofdwachtwoord",unlockVault:"Vault ontgrendelen",unlockTitle:"Ontgrendel je vault",unlockDescription:"Voer je hoofdwachtwoord in om je vault te ontgrendelen.",logout:"Uitloggen",logoutConfirm:"Weet je zeker dat je wilt uitloggen?",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",unlockSuccess:"Vault succesvol ontgrendeld!",unlockSuccessTitle:"Je vault is succesvol ontgrendeld",unlockSuccessDescription:"Je kunt nu automatisch invullen gebruiken in inlogformulieren in je browser.",closePopup:"Sluit deze popup",browseVault:"Bekijk vault inhoud",connectingTo:"Verbinden met",switchAccounts:"Wisselen van account?",loggedIn:"Ingelogd",errors:{invalidCode:"Voer een geldige 6-cijferige code in.",serverError:"Kon de AliasVault server niet bereiken. Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.",noToken:"Inloggen mislukt -- geen token ontvangen",migrationError:"Er is een fout opgetreden bij het controleren op updates.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",accountLocked:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen.",networkError:"Netwerkfout. Controleer de verbinding en probeer het opnieuw.",loginDataMissing:"Sessie verlopen. Probeer het opnieuw."}},a1={credentials:"Credentials",emails:"E-mails",settings:"Instellingen"},n1={appName:"AliasVault",loading:"Laden...",error:"Fout",success:"Succes",cancel:"Annuleren",use:"Gebruik",delete:"Verwijderen",close:"Sluiten",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",language:"Taal",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",copyToClipboard:"Naar klembord kopiëren",loadingEmails:"E-mails laden...",loadingTotpCodes:"TOTP-codes laden...",attachments:"Bijlagen",loadingAttachments:"Bijlagen laden...",settings:"Instellingen",recentEmails:"Recente e-mails",loginCredentials:"Inloggegevens",twoFactorAuthentication:"Tweestapsverificatie",alias:"Alias",notes:"Notities",fullName:"Volledige naam",firstName:"Voornaam",lastName:"Achternaam",birthDate:"Geboortedatum",nickname:"Bijnaam",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",syncingVault:"Vault synchroniseren",savingChangesToVault:"Wijzigingen opslaan in vault",uploadingVaultToServer:"Vault uploaden naar server",checkingVaultUpdates:"Controleren op vault updates",syncingUpdatedVault:"Bijgewerkte vault synchroniseren",executingOperation:"Actie uitvoeren...",loadMore:"Laad meer",errors:{VaultOutdated:"Je vault is verouderd. Log in op de AliasVault website en volg de stappen.",serverNotAvailable:"De AliasVault server is niet beschikbaar. Probeer het later opnieuw of neem contact op met de ondersteuning als het probleem aanhoudt.",clientVersionNotSupported:"Deze versie van de AliasVault browserextensie wordt niet meer ondersteund door de server. Update je browserextensie naar de nieuwste versie.",serverVersionNotSupported:"De AliasVault server moet worden bijgewerkt naar een nieuwere versie om deze browserextensie te kunnen gebruiken. Neem contact op met support als je hulp nodig hebt.",unknownError:"Er is een onbekende fout opgetreden",failedToStoreVault:"Vault opslaan mislukt",vaultNotAvailable:"Vault niet beschikbaar",failedToRetrieveData:"Gegevens ophalen mislukt",vaultIsLocked:"Vault is vergrendeld",failedToUploadVault:"Vault uploaden mislukt",passwordChanged:"Je wachtwoord is veranderd sinds de laatste keer dat je bent ingelogd. Log opnieuw in."},apiErrors:{UNKNOWN_ERROR:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",ACCOUNT_LOCKED:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen. Probeer het later opnieuw.",ACCOUNT_BLOCKED:"Je account is uitgeschakeld. Als je denkt dat dit een vergissing is, neem dan contact op met support.",USER_NOT_FOUND:"Gebruikersnaam of wachtwoord is onjuist. Probeer het opnieuw.",INVALID_AUTHENTICATOR_CODE:"Ongeldige authenticator code. Probeer het opnieuw.",INVALID_RECOVERY_CODE:"Ongeldige herstelcode. Probeer het opnieuw.",REFRESH_TOKEN_REQUIRED:"Refresh token is vereist.",INVALID_REFRESH_TOKEN:"Ongeldig refresh token.",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"Refresh token succesvol ingetrokken.",PUBLIC_REGISTRATION_DISABLED:"Registratie van nieuwe accounts is momenteel uitgeschakeld op deze server. Neem contact op met de beheerder.",USERNAME_REQUIRED:"Gebruikersnaam is vereist.",USERNAME_ALREADY_IN_USE:"Gebruikersnaam is al in gebruik.",USERNAME_AVAILABLE:"Gebruikersnaam is beschikbaar.",USERNAME_MISMATCH:"Gebruikersnaam komt niet overeen met de huidige gebruiker.",PASSWORD_MISMATCH:"Het opgegeven wachtwoord komt niet overeen met je huidige wachtwoord.",ACCOUNT_SUCCESSFULLY_DELETED:"Account succesvol verwijderd.",USERNAME_EMPTY_OR_WHITESPACE:"Gebruikersnaam mag niet leeg zijn of alleen uit spaties bestaan.",USERNAME_TOO_SHORT:"Gebruikersnaam te kort: moet minimaal 3 tekens lang zijn.",USERNAME_TOO_LONG:"Gebruikersnaam te lang: mag niet langer zijn dan 40 tekens.",USERNAME_INVALID_EMAIL:"Ongeldig e-mailadres.",USERNAME_INVALID_CHARACTERS:"Gebruikersnaam is ongeldig, mag alleen letters of cijfers bevatten.",VAULT_NOT_UP_TO_DATE:"Je vault is niet up-to-date. Synchroniseer je vault en probeer het opnieuw.",INTERNAL_SERVER_ERROR:"Interne serverfout.",VAULT_ERROR:"Je lokale vault is niet up-to-date. Synchroniseer je vault door de pagina te vernieuwen en probeer het opnieuw."}},r1={or:"of",new:"Nieuw",cancel:"Annuleren",search:"Zoeken",vaultLocked:"AliasVault is vergrendeld.",creatingNewAlias:"Nieuwe alias aanmaken...",noMatchesFound:"Geen resultaten gevonden",searchVault:"Vault doorzoeken...",serviceName:"Servicenaam",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",enterServiceName:"Voer servicenaam in",enterEmailAddress:"Voer e-mailadres in",enterUsername:"Voer gebruikersnaam in",hideFor1Hour:"Verberg voor 1 uur (huidige site)",hidePermanently:"Permanent verbergen (huidige site)",createRandomAlias:"Willekeurige alias aanmaken",createUsernamePassword:"Gebruikersnaam/wachtwoord aanmaken",randomAlias:"Alias",usernamePassword:"Gebruikersnaam/wachtwoord",createAndSaveAlias:"Alias aanmaken",createAndSaveCredential:"Credential aanmaken",randomIdentityDescription:"Genereer een willekeurige identiteit met een willekeurig e-mailadres toegankelijk in AliasVault.",randomIdentityDescriptionDropdown:"Willekeurige identiteit met willekeurige e-mail",manualCredentialDescription:"Specificeer je eigen e-mailadres en/of gebruikersnaam.",manualCredentialDescriptionDropdown:"Handmatige gebruikersnaam en wachtwoord",failedToCreateIdentity:"Identiteit aanmaken mislukt. Probeer opnieuw.",enterEmailAndOrUsername:"Voer e-mail en/of gebruikersnaam in",autofillWithAliasVault:"Autofill met AliasVault",generateRandomPassword:"Willekeurig wachtwoord genereren (kopiëren naar klembord)",generateNewPassword:"Genereer nieuw wachtwoord",togglePasswordVisibility:"Schakel zichtbaarheid van wachtwoord in/uit",passwordCopiedToClipboard:"Wachtwoord gekopieerd naar klembord",enterEmailAndOrUsernameError:"Voer e-mail en/of gebruikersnaam in",openAliasVaultToUpgrade:"Open AliasVault om te upgraden",vaultUpgradeRequired:"Update is vereist.",dismissPopup:"Pop-up sluiten"},i1={title:"Credentials",addCredential:"Credential toevoegen",editCredential:"Credential bewerken",deleteCredential:"Credential verwijderen",credentialDetails:"Credential details",serviceName:"Naam",serviceNamePlaceholder:"bijv. Gmail, Facebook, Bank",website:"Website",websitePlaceholder:"https://voorbeeld.nl",username:"Gebruikersnaam",usernamePlaceholder:"Voer gebruikersnaam in",password:"Wachtwoord",passwordPlaceholder:"Voer wachtwoord in",generatePassword:"Wachtwoord genereren",copyPassword:"Wachtwoord kopiëren",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",notes:"Notities",notesPlaceholder:"Aanvullende notities...",totp:"Tweestapsverificatie",totpCode:"TOTP-code",copyTotp:"Kopiëren",totpSecret:"TOTP secret",totpSecretPlaceholder:"Voer TOTP secret in",noCredentials:"Geen credentials gevonden",noCredentialsDescription:"Voeg je eerste credentials toe om te beginnen",searchPlaceholder:"Credentials zoeken...",welcomeTitle:"Welkom bij AliasVault!",welcomeDescription:"Om de AliasVault browser extensie te gebruiken: navigeer naar een website en gebruik de AliasVault autofill popup om nieuwe credentials aan te maken.",createdAt:"Aangemaakt",updatedAt:"Laatst bijgewerkt",autofill:"Autofill",fillForm:"Formulier invullen",deleteConfirm:"Weet je zeker dat je deze credential wilt verwijderen?",saveSuccess:"Credential succesvol opgeslagen",tags:"Labels",addTag:"Label toevoegen",removeTag:"Label verwijderen",folder:"Map",selectFolder:"Map selecteren",createFolder:"Map aanmaken",saveCredential:"Credential opslaan",deleteCredentialTitle:"Credential verwijderen",deleteCredentialConfirm:"Weet je zeker dat je deze credential wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",randomAlias:"Alias",manual:"Handmatig",service:"Naam",serviceUrl:"URL",loginCredentials:"Inloggegevens",generateRandomUsername:"Gebruikersnaam genereren",generateRandomPassword:"Wachtwoord genereren",changePasswordComplexity:"Wijzig wachtwoord complexiteit",passwordLength:"Wachtwoordlengte",includeLowercase:"Inclusief kleine letters",includeUppercase:"Inclusief hoofdletters",includeNumbers:"Inclusief cijfers",includeSpecialChars:"Inclusief speciale karakters",avoidAmbiguousChars:"Onduidelijke tekens vermijden (o, 0, etc.)",generateNewPreview:"Genereer nieuw voorbeeld",generateRandomAlias:"Alias genereren",alias:"Alias",firstName:"Voornaam",lastName:"Achternaam",nickName:"Bijnaam",gender:"Geslacht",birthDate:"Geboortedatum",birthDatePlaceholder:"YYYY-MM-DD",metadata:"Metadata",validation:{required:"Dit veld is verplicht",serviceNameRequired:"Servicenaam is verplicht",invalidEmail:"Ongeldig e-mailformaat",invalidDateFormat:"Datum moet in YYYY-MM-DD formaat zijn"},privateEmailTitle:"Privé e-mail",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E versleuteld, volledig privé.",publicEmailTitle:"Publieke tijdelijke e-mailproviders",publicEmailDescription:"Anoniem maar beperkte privacy. E-mail inhoud is leesbaar door iedereen die het adres kent.",useDomainChooser:"Domein kiezen",enterCustomDomain:"Voer aangepast domein in",enterFullEmail:"Voer volledig e-mailadres in",enterEmailPrefix:"E-mailprefix invoeren"},s1={title:"E-mails",deleteEmailTitle:"E-mail verwijderen",deleteEmailConfirm:"Weet je zeker dat je deze e-mail definitief wilt verwijderen?",from:"Van",to:"Naar",date:"Datum",emailContent:"E-mailinhoud",attachments:"Bijlagen",emailNotFound:"E-mail niet gevonden",noEmails:"Geen e-mails gevonden",noEmailsDescription:"Je hebt nog geen e-mails ontvangen op je privé e-mailadressen. Wanneer je een nieuwe e-mail ontvangt, zal deze hier verschijnen.",dateFormat:{justNow:"zojuist",minutesAgo_single:"{{count}} min geleden",minutesAgo_plural:"{{count}} min. geleden",hoursAgo_single:"{{count}} uur geleden",hoursAgo_plural:"{{count}} uur geleden",yesterday:"gisteren"},errors:{emailLoadError:"Er is een fout opgetreden bij het laden van e-mails. Probeer het later opnieuw.",emailUnexpectedError:"Er is een onverwachte fout opgetreden bij het laden van e-mails. Probeer het later opnieuw."},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Het huidige gekozen e-mailadres is al in gebruik. Wijzig het e-mailadres door deze credential te bewerken.",CLAIM_DOES_NOT_EXIST:"Er is een fout opgetreden bij het laden van e-mails. Probeer de credential te bewerken en op te slaan om de database te synchroniseren, en probeer het opnieuw."}},l1={title:"Instellingen",serverUrl:"Server URL",language:"Taal",autofillEnabled:"Autofill",version:"Versie",openInNewWindow:"Openen in nieuw venster",openWebApp:"Web-app openen",loggedIn:"Ingelogd",logout:"Uitloggen",globalSettings:"Globale Instellingen",autofillPopup:"Autofill popup",activeOnAllSites:"Actief voor alle sites (tenzij hieronder uitgeschakeld)",disabledOnAllSites:"Uitgeschakeld op alle sites",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",rightClickContextMenu:"Rechtermuisknop menu",autofillMatching:"Autofill matching",autofillMatchingMode:"Autofill matching modus",autofillMatchingModeDescription:"Bepaalt op welke manier credentials worden beschouwd als matches en worden getoond als suggestie in de autofill popup voor een bepaalde website.",autofillMatchingDefault:"URL + subdomein + naam wildcard",autofillMatchingUrlSubdomain:"URL + subdomein",autofillMatchingUrlExact:"Exacte URL-domein",siteSpecificSettings:"Site-specifieke Instellingen",autofillPopupOn:"Autofill popup op: ",enabledForThisSite:"Ingeschakeld voor deze site",disabledForThisSite:"Uitgeschakeld voor deze site",temporarilyDisabledUntil:"Tijdelijk uitgeschakeld tot ",resetAllSiteSettings:"Alle site-specifieke instellingen resetten",appearance:"Uiterlijk",theme:"Thema",useDefault:"Standaard gebruiken",light:"Licht",dark:"Donker",keyboardShortcuts:"Snelkoppelingen",configureKeyboardShortcuts:"Snelkoppelingen configureren",configure:"Configureren",security:"Beveiliging",clipboardClearTimeout:"Automatisch klembord wissen na kopiëren",clipboardClearTimeoutDescription:"Automatisch het klembord wissen na kopiëren van gevoelige gegevens",clipboardClearDisabled:"Nooit wissen",clipboardClear5Seconds:"Wis na 5 seconden",clipboardClear10Seconds:"Wis na 10 seconden",clipboardClear15Seconds:"Wis na 15 seconden",autoLockTimeout:"Automatisch vergrendelen",autoLockTimeoutDescription:"Vergrendel de vault automatisch na inactiviteit",autoLockTimeoutHelp:"De vault zal alleen vergrendelen na de opgegeven periode van inactiviteit (geen automatisch invullen of extensie geopend). De vault wordt altijd vergrendeld wanneer de browser wordt afgesloten, ongeacht deze instelling.",autoLockNever:"Nooit",autoLock15Seconds:"15 seconden",autoLock1Minute:"1 minuut",autoLock5Minutes:"5 minuten",autoLock15Minutes:"15 minuten",autoLock30Minutes:"30 minuten",autoLock1Hour:"1 uur",autoLock4Hours:"4 uur",autoLock8Hours:"8 uur",autoLock24Hours:"24 uur",versionPrefix:"Versie ",preferences:"Voorkeuren",autofillSettings:"Autofill instellingen",clipboardSettings:"Klembord instellingen",contextMenuSettings:"Context menu instellingen",contextMenu:"Context menu",contextMenuEnabled:"Context menu is ingeschakeld",contextMenuDisabled:"Context menu is uitgeschakeld",contextMenuDescription:"Klik met de rechtermuisknop op invoervelden om AliasVault opties te zien",selectLanguage:"Selecteer taal",validation:{apiUrlRequired:"API URL is vereist",apiUrlInvalid:"Voer een geldige API URL in",clientUrlRequired:"Client URL is vereist",clientUrlInvalid:"Voer een geldige client URL in"}},o1={title:"Vault upgraden",subtitle:"AliasVault is vernieuwd en je vault moet worden bijgewerkt. Dit kan enkele seconden duren.",versionInformation:"Versie-informatie",yourVault:"Jouw vault:",newVersion:"Nieuwe versie:",upgrade:"Vault upgraden",upgrading:"Aan het upgraden...",logout:"Uitloggen",whatsNew:"Wat is er nieuw",whatsNewDescription:"Een upgrade is vereist vanwege de volgende wijzigingen:",noDescriptionAvailable:"Voor deze versie is geen beschrijving beschikbaar.",okay:"Ok",status:{preparingUpgrade:"Upgrade voorbereiden...",vaultAlreadyUpToDate:"De vault is al bijgewerkt",startingDatabaseTransaction:"Starten van database transactie...",applyingDatabaseMigrations:"Databasemigratie toepassen...",applyingMigration:"Toepassen van migratie {{current}} van {{total}}...",committingChanges:"Wijzigingen doorvoeren..."},alerts:{error:"Fout",unableToGetVersionInfo:"Kan versie-informatie niet ophalen. Probeer het opnieuw.",selfHostedServer:"Self-hosted server",selfHostedWarning:"Als je een self-hosted server gebruikt, zorg er dan voor dat je ook je eigen self-hosted instantie bijwerkt, omdat anders het inloggen via de web client niet meer zal werken.",cancel:"Annuleren",continueUpgrade:"Verdergaan",upgradeFailed:"Upgrade mislukt",failedToApplyMigration:"Kon migratie niet toepassen ({{current}} van {{total}})",unknownErrorDuringUpgrade:"Er is een onbekende fout opgetreden tijdens de upgrade. Probeer het opnieuw."}},u1={auth:t1,menu:a1,common:n1,content:r1,credentials:i1,emails:s1,settings:l1,upgrade:o1},c1={loginTitle:"登录AliasVault",username:"用户名或电子邮箱",usernamePlaceholder:"name / name@company.com",password:"密码",passwordPlaceholder:"请输入密码",rememberMe:"记住我",loginButton:"登录",noAccount:"还没有账户？",createVault:"创建新保险库",twoFactorTitle:"请输入认证器的动态验证码。",authCode:"动态验证码",authCodePlaceholder:"输入6位动态验证码",verify:"验证",cancel:"取消",twoFactorNote:"注意：如果无法访问你的认证设备，你可以通过网站登录，使用恢复码重置双因素认证（2FA）。",masterPassword:"主密码",unlockVault:"解锁保险库",unlockTitle:"解锁你的保险库",unlockDescription:"输入你的主密码以解锁保险库。",logout:"退出登录",logoutConfirm:"确定要退出登录吗？",sessionExpired:"你的会话已过期。请重新登录。",unlockSuccess:"保险库解锁成功！",unlockSuccessTitle:"你的保险库已成功解锁",unlockSuccessDescription:"现在你可以在浏览器的登录表单中使用自动填充功能了。",closePopup:"关闭此弹窗",browseVault:"浏览保险库内容",connectingTo:"正在连接到",switchAccounts:"切换账户？",loggedIn:"已登录",errors:{invalidCode:"请输入有效的6位动态验证码。",serverError:"无法连接到AliasVault服务器。请稍后重试，若问题依旧，请联系支持人员。",noToken:"登录失败——未返回令牌",migrationError:"检查待处理迁移时发生错误。",wrongPassword:"密码不正确。请重试。",accountLocked:"由于多次尝试失败，账户已暂时锁定。",networkError:"网络错误。请检查你的连接后重试。",loginDataMissing:"登录会话已过期。请重试。"}},d1={credentials:"凭证",emails:"邮件",settings:"设置"},f1={appName:"AliasVault",loading:"加载中……",error:"错误",success:"成功",cancel:"取消",use:"使用",delete:"删除",close:"关闭",copied:"已复制！",openInNewWindow:"在新窗口中打开",language:"语言",enabled:"已启用",disabled:"已禁用",showPassword:"显示密码",hidePassword:"隐藏密码",copyToClipboard:"复制到剪贴板",loadingEmails:"加载邮件中……",loadingTotpCodes:"加载TOTP验证码中……",attachments:"附件",loadingAttachments:"加载附件中……",settings:"设置",recentEmails:"最近邮件",loginCredentials:"登录凭证",twoFactorAuthentication:"双因素认证（2FA）",alias:"别名",notes:"备注",fullName:"全名",firstName:"名",lastName:"姓",birthDate:"出生日期",nickname:"昵称",email:"电子邮箱",username:"用户名",password:"密码",syncingVault:"同步保险库中",savingChangesToVault:"正在保存对保险库的更改",uploadingVaultToServer:"正在将保险库上传到服务器",checkingVaultUpdates:"检查保险库更新中",syncingUpdatedVault:"同步更新后的保险库",executingOperation:"执行操作中……",loadMore:"加载更多",errors:{VaultOutdated:"你的保险库版本多低。请登录AliasVault网站并按照步骤操作。",serverNotAvailable:"AliasVault服务器不可用。请稍后重试，若问题持续请联系支持人员。",clientVersionNotSupported:"此版本的AliasVault浏览器扩展已不被服务器支持。请将浏览器扩展更新到最新版本。",serverVersionNotSupported:"AliasVault服务器需要更新到新版本才能使用此浏览器扩展。如需帮助，请联系支持人员。",unknownError:"发生未知错误",failedToStoreVault:"存储保险库失败",vaultNotAvailable:"保险库不可用",failedToRetrieveData:"无法检索数据",vaultIsLocked:"保险库已锁定",failedToUploadVault:"上传保险库失败",passwordChanged:"登录密码已更新，请重新登录以确保账户安全。"},apiErrors:{UNKNOWN_ERROR:"发生未知错误。请重试。",ACCOUNT_LOCKED:"由于多次尝试失败，账户已暂时锁定。请稍后重试。",ACCOUNT_BLOCKED:"你的账户已被禁用。如果你认为这是误操作，请联系支持人员。",USER_NOT_FOUND:"用户名或密码无效。请重试。",INVALID_AUTHENTICATOR_CODE:"认证器验证码无效。请重试。",INVALID_RECOVERY_CODE:"恢复码无效。请重试。",REFRESH_TOKEN_REQUIRED:"需要刷新令牌。",INVALID_REFRESH_TOKEN:"无效的刷新令牌。",REFRESH_TOKEN_REVOKED_SUCCESSFULLY:"刷新令牌已成功注销。",PUBLIC_REGISTRATION_DISABLED:"当前服务器已禁用新账户注册。请联系管理员。",USERNAME_REQUIRED:"用户名是必填项。",USERNAME_ALREADY_IN_USE:"用户名已被使用。",USERNAME_AVAILABLE:"用户名可用。",USERNAME_MISMATCH:"用户名与当前用户不匹配。",PASSWORD_MISMATCH:"提供的密码与你的当前密码不匹配。",ACCOUNT_SUCCESSFULLY_DELETED:"账户已成功删除。",USERNAME_EMPTY_OR_WHITESPACE:"用户名不能为空或仅含空格。",USERNAME_TOO_SHORT:"用户名过短：至少需要3个字符。",USERNAME_TOO_LONG:"用户名过长：不能超过40个字符。",USERNAME_INVALID_EMAIL:"无效的邮箱地址。",USERNAME_INVALID_CHARACTERS:"用户名无效，只能包含字母或数字。",VAULT_NOT_UP_TO_DATE:"你的保险库不是最新的。请同步你的保险库后重试。",INTERNAL_SERVER_ERROR:"服务器内部错误。",VAULT_ERROR:"本地保险库不是最新的。请刷新页面同步保险库后重试。"}},A1={or:"或者",new:"新建",cancel:"取消",search:"搜索",vaultLocked:"AliasVault已锁定。",creatingNewAlias:"正在创建新别名……",noMatchesFound:"未找到匹配项",searchVault:"搜索保险库……",serviceName:"服务名称",email:"电子邮箱",username:"用户名",password:"密码",enterServiceName:"输入服务名称",enterEmailAddress:"输入邮箱地址",enterUsername:"输入用户名",hideFor1Hour:"隐藏1小时（当前网站）",hidePermanently:"永久隐藏（当前网站）",createRandomAlias:"创建随机别名",createUsernamePassword:"创建用户名/密码",randomAlias:"随机别名",usernamePassword:"用户名/密码",createAndSaveAlias:"创建并保存别名",createAndSaveCredential:"创建并保存凭证",randomIdentityDescription:"生成一个包含随机邮箱地址的随机身份，可在AliasVault中查看。",randomIdentityDescriptionDropdown:"带随机邮箱的随机身份",manualCredentialDescription:"指定你自己的邮箱地址和用户名。",manualCredentialDescriptionDropdown:"手动输入用户名和密码",failedToCreateIdentity:"创建身份失败。请重试。",enterEmailAndOrUsername:"输入邮箱和/或用户名",autofillWithAliasVault:"使用AliasVault自动填充",generateRandomPassword:"生成随机密码（复制到剪贴板）",generateNewPassword:"生成新密码",togglePasswordVisibility:"切换密码可见性",passwordCopiedToClipboard:"密码已复制到剪贴板",enterEmailAndOrUsernameError:"请输入邮箱和/或用户名",openAliasVaultToUpgrade:"打开AliasVault进行升级",vaultUpgradeRequired:"需要升级保险库。",dismissPopup:"关闭弹窗"},h1={title:"凭证",addCredential:"添加凭证",editCredential:"编辑凭证",deleteCredential:"删除凭证",credentialDetails:"凭证详情",serviceName:"服务名称",serviceNamePlaceholder:"例如：Gmail、Facebook、银行",website:"网站",websitePlaceholder:"https://example.com",username:"用户名",usernamePlaceholder:"输入用户名",password:"密码",passwordPlaceholder:"输入密码",generatePassword:"生成密码",copyPassword:"复制密码",showPassword:"显示密码",hidePassword:"隐藏密码",notes:"备注",notesPlaceholder:"添加备注……",totp:"双因素认证（2FA）",totpCode:"TOTP验证码",copyTotp:"复制 TOTP",totpSecret:"TOTP密钥",totpSecretPlaceholder:"输入TOTP密钥",noCredentials:"未找到凭证",noCredentialsDescription:"添加你的第一个凭证开始使用",searchPlaceholder:"搜索凭证……",welcomeTitle:"欢迎使用AliasVault！",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭证。",createdAt:"创建时间",updatedAt:"最后更新",autofill:"自动填充",fillForm:"填充表单",deleteConfirm:"确定要删除此凭证吗？",saveSuccess:"凭证保存成功",tags:"标签",addTag:"添加标签",removeTag:"移除标签",folder:"文件夹",selectFolder:"选择文件夹",createFolder:"创建文件夹",saveCredential:"保存凭证",deleteCredentialTitle:"删除凭证",deleteCredentialConfirm:"确定要删除此凭证吗？此操作无法撤销。",randomAlias:"随机别名",manual:"手动",service:"服务",serviceUrl:"服务 URL",loginCredentials:"登录凭证",generateRandomUsername:"生成随机用户名",generateRandomPassword:"生成随机密码",changePasswordComplexity:"修改密码复杂度",passwordLength:"密码长度",includeLowercase:"包含小写字母",includeUppercase:"包含大写字母",includeNumbers:"包含数字",includeSpecialChars:"包含特殊字符",avoidAmbiguousChars:"避免易混淆字符（o、0 等）",generateNewPreview:"生成新预览",generateRandomAlias:"生成随机别名",alias:"别名",firstName:"名",lastName:"姓",nickName:"昵称",gender:"性别",birthDate:"出生日期",birthDatePlaceholder:"YYYY-MM-DD",metadata:"备注",validation:{required:"此字段为必填项",serviceNameRequired:"服务名称为必填项",invalidEmail:"无效的邮箱格式",invalidDateFormat:"日期必须为 YYYY-MM-DD 格式"},privateEmailTitle:"私人邮箱",privateEmailAliasVaultServer:"AliasVault服务器",privateEmailDescription:"端对端加密，完全私密。",publicEmailTitle:"公开临时邮箱供应商",publicEmailDescription:"匿名但隐私有限。任何知晓该邮箱地址的人均可查看邮件内容。",useDomainChooser:"使用域名选择器",enterCustomDomain:"输入自定义域名",enterFullEmail:"输入验证邮箱地址",enterEmailPrefix:"输入邮箱前缀"},g1={title:"邮件",deleteEmailTitle:"删除邮件",deleteEmailConfirm:"确定要永久删除此邮件吗？",from:"发件人",to:"收件人",date:"日期",emailContent:"邮件内容",attachments:"附件",emailNotFound:"未找到邮件",noEmails:"未找到邮件",noEmailsDescription:"你的私人邮箱地址尚未收到任何邮件。当你收到新邮件时，会显示在这里。",dateFormat:{justNow:"刚刚",minutesAgo_single:"{{count}}分钟前",minutesAgo_plural:"{{count}}分钟前",hoursAgo_single:"{{count}}小时前",hoursAgo_plural:"{{count}}小时前",yesterday:"昨天"},errors:{emailLoadError:"加载邮件时发生错误。请稍后重试。",emailUnexpectedError:"加载邮件时发生意外错误。请稍后重试。"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"当前选择的邮箱地址已被使用。请通过编辑此凭证修改邮箱地址。",CLAIM_DOES_NOT_EXIST:"加载邮件时发生错误。请尝试编辑并保存凭证条目以同步数据库，然后重试。"}},m1={title:"设置",serverUrl:"服务器 URL",language:"语言",autofillEnabled:"启用自动填充",version:"版本",openInNewWindow:"在新窗口中打开",openWebApp:"打开网页应用",loggedIn:"已登录",logout:"退出登录",globalSettings:"全局设置",autofillPopup:"自动填充弹窗",activeOnAllSites:"在所有网站上激活（除非在下方禁用）",disabledOnAllSites:"在所有网站上禁用",enabled:"启用",disabled:"禁用",rightClickContextMenu:"右键上下文菜单",autofillMatching:"自动填充匹配",autofillMatchingMode:"自动填充匹配模式",autofillMatchingModeDescription:"用于判定哪些凭证会被视为匹配项，并在指定网站的自动填充弹窗中显示为建议选项。",autofillMatchingDefault:"URL + 子域名 + 名称通配符",autofillMatchingUrlSubdomain:"URL + 子域名",autofillMatchingUrlExact:"精确匹配URL域名",siteSpecificSettings:"网站特定设置",autofillPopupOn:"自动填充弹窗在以下位置： ",enabledForThisSite:"对此网站启用",disabledForThisSite:"对此网站禁用",temporarilyDisabledUntil:"暂时禁用至 ",resetAllSiteSettings:"重置所有网站特定设置",appearance:"外观",theme:"主题",useDefault:"使用默认",light:"浅色",dark:"深色",keyboardShortcuts:"键盘快捷键",configureKeyboardShortcuts:"配置键盘快捷键",configure:"配置",security:"安全",clipboardClearTimeout:"复制后清楚剪切板",clipboardClearTimeoutDescription:"复制敏感数据后自动清除剪贴板",clipboardClearDisabled:"从不清除",clipboardClear5Seconds:"5秒后清除",clipboardClear10Seconds:"10 秒后清除",clipboardClear15Seconds:"15分钟后清除",autoLockTimeout:"自动锁定超时时间",autoLockTimeoutDescription:"无操作一段时间后自动锁定保险库",autoLockTimeoutHelp:"保险库仅在达到指定的无操作时长后才会锁定（未使用自动填充功能或未打开扩展程序弹窗）。无论此设置如何，关闭浏览器时保险库始终会锁定。",autoLockNever:"从不",autoLock15Seconds:"15秒",autoLock1Minute:"1分钟",autoLock5Minutes:"5分钟",autoLock15Minutes:"15分钟",autoLock30Minutes:"30分钟",autoLock1Hour:"1小时",autoLock4Hours:"4小时",autoLock8Hours:"8小时",autoLock24Hours:"24小时",versionPrefix:"版本 ",preferences:"首选项",autofillSettings:"自动填充设置",clipboardSettings:"剪切板设置",contextMenuSettings:"上下文菜单设置",contextMenu:"上下文菜单",contextMenuEnabled:"上下文菜单已启用",contextMenuDisabled:"上下文菜单已停用",contextMenuDescription:"右键点击输入字段即可访问 AliasVault 选项",selectLanguage:"选择语言",validation:{apiUrlRequired:"API URL 为必填项",apiUrlInvalid:"请输入有效的 API URL",clientUrlRequired:"客户端 URL 为必填项",clientUrlInvalid:"请输入有效的客户端 URL"}},p1={title:"升级保险库",subtitle:"AliasVault已更新，你的保险库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"你的保险库：",newVersion:"新版本：",upgrade:"升级保险库",upgrading:"升级中……",logout:"退出登录",whatsNew:"新功能",whatsNewDescription:"需要升级以支持以下变更：",noDescriptionAvailable:"此版本无可用说明。",okay:"确定",status:{preparingUpgrade:"准备升级中……",vaultAlreadyUpToDate:"当前保险库数据已是最新",startingDatabaseTransaction:"开始数据库事务……",applyingDatabaseMigrations:"应用数据库迁移……",applyingMigration:"应用迁移 {{current}} / {{total}}……",committingChanges:"提交更改中……"},alerts:{error:"错误",unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果你使用的是自托管服务器，请确保同时更新你的自托管实例，否则将无法登录网页客户端。",cancel:"取消",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）",unknownErrorDuringUpgrade:"升级过程中发生未知错误。请重试。"}},y1={auth:c1,menu:d1,common:f1,content:A1,credentials:h1,emails:g1,settings:m1,upgrade:p1},E1={de:{translation:SC},en:{translation:MC},fi:{translation:zC},it:{translation:e1},nl:{translation:u1},zh:{translation:y1}},Zl=[{code:"de",name:"German",nativeName:"Deutsch",flag:"🇩🇪"},{code:"en",name:"English",nativeName:"English",flag:"🇺🇸"},{code:"fi",name:"Finnish",nativeName:"Suomi",flag:"🇫🇮"},{code:"it",name:"Italian",nativeName:"Italiano",flag:"🇮🇹"},{code:"nl",name:"Dutch",nativeName:"Nederlands",flag:"🇳🇱"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],ky="en",G0=Zl.map(n=>n.code);function b1(n){return Zl.find(a=>a.code===n)}const Ty=({variant:n="dropdown",size:a="md"})=>{const{i18n:r}=gt(),[s,o]=Q.useState(!1),u=Q.useRef(null),c=b1(r.language)||Zl[0];Q.useEffect(()=>{const p=A=>{u.current&&!u.current.contains(A.target)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]);const d=async p=>{await r.changeLanguage(p),await Ke.setItem("local:language",p),o(!1),r.emit("languageChanged",p)};return n==="buttons"?h.jsx("div",{className:"flex space-x-2",children:Zl.map(p=>h.jsxs("button",{onClick:()=>d(p.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${r.language===p.code?"bg-primary-500 text-white":"bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-500"}`,title:p.nativeName,children:[h.jsx("span",{className:"text-sm",children:p.flag}),h.jsx("span",{children:p.code.toUpperCase()})]},p.code))}):h.jsxs("div",{className:"relative",ref:u,children:[h.jsxs("button",{onClick:()=>o(!s),className:`w-full flex items-center justify-between px-3 py-1.5 rounded-lg border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors ${a==="sm"?"text-sm":"text-base"}`,children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx("span",{className:"text-lg",children:c.flag}),h.jsx("span",{children:c.nativeName})]}),h.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&h.jsx("div",{className:"absolute top-full left-0 mt-1 w-full bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg z-50",children:Zl.map(p=>h.jsxs("button",{onClick:()=>d(p.code),className:`w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors first:rounded-t-lg last:rounded-b-lg ${a==="sm"?"text-sm":"text-base"}`,children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx("span",{className:"text-lg",children:p.flag}),h.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:p.nativeName})]}),r.language===p.code&&h.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:h.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},p.code))})]})};class da{constructor(){}static isServerVersionSupported(a){return this.versionGreaterThanOrEqualTo(a,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(a,r){const[s,o]=a.split("-"),[u,c]=r.split("-"),d=s.split(".").map(Number),p=u.split(".").map(Number);for(let A=0;A<Math.max(d.length,p.length);A++){const E=d[A]??0,v=p[A]??0;if(E>v)return!0;if(E<v)return!1}return!o&&c?!0:o&&!c?!1:!o&&!c?!0:o>=c}}Sa(da,"VERSION","0.22.0"),Sa(da,"MIN_SERVER_VERSION","0.12.0-dev"),Sa(da,"CLIENT_NAME","chrome"),Sa(da,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),Sa(da,"DEFAULT_API_URL","https://app.aliasvault.net/api");const Vf=[{label:"Aliasvault.net",value:da.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],v1=n=>Yu().shape({apiUrl:Ka().required(n("validation.apiUrlRequired")).test("is-valid-api-url",n("settings.validation.apiUrlInvalid"),a=>{if(!a)return!0;try{const r=new URL(a);return r.protocol==="http:"||r.protocol==="https:"}catch{return!1}}),clientUrl:Ka().required(n("validation.clientUrlRequired")).test("is-valid-client-url",n("settings.validation.clientUrlInvalid"),a=>{if(!a)return!0;try{const r=new URL(a);return r.protocol==="http:"||r.protocol==="https:"}catch{return!1}})}),w1=()=>{const{t:n}=gt(),[a,r]=Q.useState(""),[s,o]=Q.useState(""),[u,c]=Q.useState(""),[d,p]=Q.useState(!0),[A,E]=Q.useState({}),{setIsInitialLoading:v}=Ma(),C=v1(n);Q.useEffect(()=>{(async()=>{const U=await Ke.getItem("local:apiUrl"),j=await Ke.getItem("local:clientUrl"),P=await Ke.getItem(Gu)!==!1,V=await Ke.getItem(Pu);p(V?!1:P);const de=Vf.find(ce=>ce.value===U);de?r(de.value):U?(r("custom"),o(U),c(j??"")):r(Vf[0].value),v(!1)})()},[v]);const S=async N=>{const U=N.target.value;r(U),U!=="custom"&&(await Ke.setItem("local:apiUrl",""),await Ke.setItem("local:clientUrl",""),o(""),c(""),E({}))},k=async N=>{const U=N.target.value;o(U);try{await C.validateAt("apiUrl",{apiUrl:U}),E(j=>({...j,apiUrl:void 0})),await Ke.setItem("local:apiUrl",U)}catch(j){j instanceof Ga&&(E(P=>({...P,apiUrl:j.message})),await Ke.setItem("local:apiUrl",da.DEFAULT_API_URL),await Ke.setItem("local:clientUrl",da.DEFAULT_CLIENT_URL))}},D=async N=>{const U=N.target.value;c(U);try{await C.validateAt("clientUrl",{clientUrl:U}),E(j=>({...j,clientUrl:void 0})),await Ke.setItem("local:clientUrl",U)}catch(j){j instanceof Ga&&E(P=>({...P,clientUrl:j.message}))}},R=async()=>{const N=!d;await Ke.setItem(Gu,N),N&&(await Ke.setItem(Qu,[]),await Ke.setItem(Pu,0)),p(N)};return h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"mb-6",children:h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("common.language")}),h.jsx(Ty,{variant:"dropdown",size:"sm"})]})}),h.jsxs("div",{className:"mb-6",children:[h.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:n("settings.serverUrl")}),h.jsx("select",{value:a,onChange:S,className:"w-full bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white",children:Vf.map(N=>h.jsx("option",{value:N.value,children:N.label},N.value))})]}),a==="custom"&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-6",children:[h.jsx("label",{htmlFor:"custom-client-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:"Custom client URL"}),h.jsx("input",{id:"custom-client-url",type:"text",value:u,onChange:D,placeholder:"https://my-aliasvault-instance.com",className:`w-full bg-gray-50 border ${A.clientUrl?"border-red-500":"border-gray-300"} text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white`}),A.clientUrl&&h.jsx("p",{className:"mt-1 text-sm text-red-500",children:A.clientUrl})]}),h.jsxs("div",{className:"mb-6",children:[h.jsx("label",{htmlFor:"custom-api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:"Custom API URL"}),h.jsx("input",{id:"custom-api-url",type:"text",value:s,onChange:k,placeholder:"https://my-aliasvault-instance.com/api",className:`w-full bg-gray-50 border ${A.apiUrl?"border-red-500":"border-gray-300"} text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white`}),A.apiUrl&&h.jsx("p",{className:"mt-1 text-sm text-red-500",children:A.apiUrl})]})]}),h.jsx("div",{className:"mb-6",children:h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.autofillEnabled")}),h.jsx("button",{onClick:R,className:`px-4 py-2 rounded-md transition-colors ${d?"bg-green-200 text-green-800 hover:bg-green-300 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50":"bg-red-200 text-red-800 hover:bg-red-300 dark:bg-red-900/30 dark:text-red-400 dark:hover:bg-red-900/50"}`,children:d?n("common.enabled","Enabled"):n("common.disabled","Disabled")})]})}),h.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[n("settings.version"),": ",da.VERSION]})]})};var fo=n=>n.type==="checkbox",$i=n=>n instanceof Date,Ja=n=>n==null;const Dy=n=>typeof n=="object";var la=n=>!Ja(n)&&!Array.isArray(n)&&Dy(n)&&!$i(n),x1=n=>la(n)&&n.target?fo(n.target)?n.target.checked:n.target.value:n,C1=n=>n.substring(0,n.search(/\.\d+(\.|$)/))||n,I1=(n,a)=>n.has(C1(a)),B1=n=>{const a=n.constructor&&n.constructor.prototype;return la(a)&&a.hasOwnProperty("isPrototypeOf")},RA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ha(n){let a;const r=Array.isArray(n),s=typeof FileList<"u"?n instanceof FileList:!1;if(n instanceof Date)a=new Date(n);else if(n instanceof Set)a=new Set(n);else if(!(RA&&(n instanceof Blob||s))&&(r||la(n)))if(a=r?[]:{},!r&&!B1(n))a=n;else for(const o in n)n.hasOwnProperty(o)&&(a[o]=Ha(n[o]));else return n;return a}var sc=n=>Array.isArray(n)?n.filter(Boolean):[],ca=n=>n===void 0,Ye=(n,a,r)=>{if(!a||!la(n))return r;const s=sc(a.split(/[,[\].]+?/)).reduce((o,u)=>Ja(o)?o:o[u],n);return ca(s)||s===n?ca(n[a])?r:n[a]:s},lr=n=>typeof n=="boolean",QA=n=>/^\w*$/.test(n),Ly=n=>sc(n.replace(/["|']|\]/g,"").split(/\.|\[/)),Rt=(n,a,r)=>{let s=-1;const o=QA(a)?[a]:Ly(a),u=o.length,c=u-1;for(;++s<u;){const d=o[s];let p=r;if(s!==c){const A=n[d];p=la(A)||Array.isArray(A)?A:isNaN(+o[s+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;n[d]=p,n=n[d]}};const P0={BLUR:"blur",FOCUS_OUT:"focusout"},Gn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Lr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};En.createContext(null);var S1=(n,a,r,s=!0)=>{const o={defaultValues:a._defaultValues};for(const u in n)Object.defineProperty(o,u,{get:()=>{const c=u;return a._proxyFormState[c]!==Gn.all&&(a._proxyFormState[c]=!s||Gn.all),n[c]}});return o};const N1=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;var or=n=>typeof n=="string",k1=(n,a,r,s,o)=>or(n)?(s&&a.watch.add(n),Ye(r,n,o)):Array.isArray(n)?n.map(u=>(s&&a.watch.add(u),Ye(r,u))):(s&&(a.watchAll=!0),r),Ry=(n,a,r,s,o)=>a?{...r[n],types:{...r[n]&&r[n].types?r[n].types:{},[s]:o||!0}}:{},eo=n=>Array.isArray(n)?n:[n],z0=()=>{let n=[];return{get observers(){return n},next:o=>{for(const u of n)u.next&&u.next(o)},subscribe:o=>(n.push(o),{unsubscribe:()=>{n=n.filter(u=>u!==o)}}),unsubscribe:()=>{n=[]}}},gA=n=>Ja(n)||!Dy(n);function vi(n,a){if(gA(n)||gA(a))return n===a;if($i(n)&&$i(a))return n.getTime()===a.getTime();const r=Object.keys(n),s=Object.keys(a);if(r.length!==s.length)return!1;for(const o of r){const u=n[o];if(!s.includes(o))return!1;if(o!=="ref"){const c=a[o];if($i(u)&&$i(c)||la(u)&&la(c)||Array.isArray(u)&&Array.isArray(c)?!vi(u,c):u!==c)return!1}}return!0}var sn=n=>la(n)&&!Object.keys(n).length,UA=n=>n.type==="file",Pn=n=>typeof n=="function",Ku=n=>{if(!RA)return!1;const a=n?n.ownerDocument:0;return n instanceof(a&&a.defaultView?a.defaultView.HTMLElement:HTMLElement)},Qy=n=>n.type==="select-multiple",MA=n=>n.type==="radio",T1=n=>MA(n)||fo(n),Hf=n=>Ku(n)&&n.isConnected;function D1(n,a){const r=a.slice(0,-1).length;let s=0;for(;s<r;)n=ca(n)?s++:n[a[s++]];return n}function L1(n){for(const a in n)if(n.hasOwnProperty(a)&&!ca(n[a]))return!1;return!0}function pa(n,a){const r=Array.isArray(a)?a:QA(a)?[a]:Ly(a),s=r.length===1?n:D1(n,r),o=r.length-1,u=r[o];return s&&delete s[u],o!==0&&(la(s)&&sn(s)||Array.isArray(s)&&L1(s))&&pa(n,r.slice(0,-1)),n}var Uy=n=>{for(const a in n)if(Pn(n[a]))return!0;return!1};function Ju(n,a={}){const r=Array.isArray(n);if(la(n)||r)for(const s in n)Array.isArray(n[s])||la(n[s])&&!Uy(n[s])?(a[s]=Array.isArray(n[s])?[]:{},Ju(n[s],a[s])):Ja(n[s])||(a[s]=!0);return a}function My(n,a,r){const s=Array.isArray(n);if(la(n)||s)for(const o in n)Array.isArray(n[o])||la(n[o])&&!Uy(n[o])?ca(a)||gA(r[o])?r[o]=Array.isArray(n[o])?Ju(n[o],[]):{...Ju(n[o])}:My(n[o],Ja(a)?{}:a[o],r[o]):r[o]=!vi(n[o],a[o]);return r}var Yl=(n,a)=>My(n,a,Ju(a));const q0={value:!1,isValid:!1},Y0={value:!0,isValid:!0};var _y=n=>{if(Array.isArray(n)){if(n.length>1){const a=n.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:a,isValid:!!a.length}}return n[0].checked&&!n[0].disabled?n[0].attributes&&!ca(n[0].attributes.value)?ca(n[0].value)||n[0].value===""?Y0:{value:n[0].value,isValid:!0}:Y0:q0}return q0},jy=(n,{valueAsNumber:a,valueAsDate:r,setValueAs:s})=>ca(n)?n:a?n===""?NaN:n&&+n:r&&or(n)?new Date(n):s?s(n):n;const K0={isValid:!1,value:null};var Oy=n=>Array.isArray(n)?n.reduce((a,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:a,K0):K0;function J0(n){const a=n.ref;return UA(a)?a.files:MA(a)?Oy(n.refs).value:Qy(a)?[...a.selectedOptions].map(({value:r})=>r):fo(a)?_y(n.refs).value:jy(ca(a.value)?n.ref.value:a.value,n)}var R1=(n,a,r,s)=>{const o={};for(const u of n){const c=Ye(a,u);c&&Rt(o,u,c._f)}return{criteriaMode:r,names:[...n],fields:o,shouldUseNativeValidation:s}},Xu=n=>n instanceof RegExp,Kl=n=>ca(n)?n:Xu(n)?n.source:la(n)?Xu(n.value)?n.value.source:n.value:n,X0=n=>({isOnSubmit:!n||n===Gn.onSubmit,isOnBlur:n===Gn.onBlur,isOnChange:n===Gn.onChange,isOnAll:n===Gn.all,isOnTouch:n===Gn.onTouched});const $0="AsyncFunction";var Q1=n=>!!n&&!!n.validate&&!!(Pn(n.validate)&&n.validate.constructor.name===$0||la(n.validate)&&Object.values(n.validate).find(a=>a.constructor.name===$0)),U1=n=>n.mount&&(n.required||n.min||n.max||n.maxLength||n.minLength||n.pattern||n.validate),W0=(n,a,r)=>!r&&(a.watchAll||a.watch.has(n)||[...a.watch].some(s=>n.startsWith(s)&&/^\.\w+/.test(n.slice(s.length))));const to=(n,a,r,s)=>{for(const o of r||Object.keys(n)){const u=Ye(n,o);if(u){const{_f:c,...d}=u;if(c){if(c.refs&&c.refs[0]&&a(c.refs[0],o)&&!s)return!0;if(c.ref&&a(c.ref,c.name)&&!s)return!0;if(to(d,a))break}else if(la(d)&&to(d,a))break}}};function Z0(n,a,r){const s=Ye(n,r);if(s||QA(r))return{error:s,name:r};const o=r.split(".");for(;o.length;){const u=o.join("."),c=Ye(a,u),d=Ye(n,u);if(c&&!Array.isArray(c)&&r!==u)return{name:r};if(d&&d.type)return{name:u,error:d};if(d&&d.root&&d.root.type)return{name:`${u}.root`,error:d.root};o.pop()}return{name:r}}var M1=(n,a,r,s)=>{r(n);const{name:o,...u}=n;return sn(u)||Object.keys(u).length>=Object.keys(a).length||Object.keys(u).find(c=>a[c]===(!s||Gn.all))},_1=(n,a,r)=>!n||!a||n===a||eo(n).some(s=>s&&(r?s===a:s.startsWith(a)||a.startsWith(s))),j1=(n,a,r,s,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(a||n):(r?s.isOnBlur:o.isOnBlur)?!n:(r?s.isOnChange:o.isOnChange)?n:!0,O1=(n,a)=>!sc(Ye(n,a)).length&&pa(n,a),F1=(n,a,r)=>{const s=eo(Ye(n,r));return Rt(s,"root",a[r]),Rt(n,r,s),n},_u=n=>or(n);function ep(n,a,r="validate"){if(_u(n)||Array.isArray(n)&&n.every(_u)||lr(n)&&!n)return{type:r,message:_u(n)?n:"",ref:a}}var Fs=n=>la(n)&&!Xu(n)?n:{value:n,message:""},tp=async(n,a,r,s,o,u)=>{const{ref:c,refs:d,required:p,maxLength:A,minLength:E,min:v,max:C,pattern:S,validate:k,name:D,valueAsNumber:R,mount:N}=n._f,U=Ye(r,D);if(!N||a.has(D))return{};const j=d?d[0]:c,P=pe=>{o&&j.reportValidity&&(j.setCustomValidity(lr(pe)?"":pe||""),j.reportValidity())},V={},de=MA(c),ce=fo(c),Z=de||ce,X=(R||UA(c))&&ca(c.value)&&ca(U)||Ku(c)&&c.value===""||U===""||Array.isArray(U)&&!U.length,K=Ry.bind(null,D,s,V),ee=(pe,ge,Ne,Ee=Lr.maxLength,Y=Lr.minLength)=>{const ae=pe?ge:Ne;V[D]={type:pe?Ee:Y,message:ae,ref:c,...K(pe?Ee:Y,ae)}};if(u?!Array.isArray(U)||!U.length:p&&(!Z&&(X||Ja(U))||lr(U)&&!U||ce&&!_y(d).isValid||de&&!Oy(d).isValid)){const{value:pe,message:ge}=_u(p)?{value:!!p,message:p}:Fs(p);if(pe&&(V[D]={type:Lr.required,message:ge,ref:j,...K(Lr.required,ge)},!s))return P(ge),V}if(!X&&(!Ja(v)||!Ja(C))){let pe,ge;const Ne=Fs(C),Ee=Fs(v);if(!Ja(U)&&!isNaN(U)){const Y=c.valueAsNumber||U&&+U;Ja(Ne.value)||(pe=Y>Ne.value),Ja(Ee.value)||(ge=Y<Ee.value)}else{const Y=c.valueAsDate||new Date(U),ae=G=>new Date(new Date().toDateString()+" "+G),xe=c.type=="time",Me=c.type=="week";or(Ne.value)&&U&&(pe=xe?ae(U)>ae(Ne.value):Me?U>Ne.value:Y>new Date(Ne.value)),or(Ee.value)&&U&&(ge=xe?ae(U)<ae(Ee.value):Me?U<Ee.value:Y<new Date(Ee.value))}if((pe||ge)&&(ee(!!pe,Ne.message,Ee.message,Lr.max,Lr.min),!s))return P(V[D].message),V}if((A||E)&&!X&&(or(U)||u&&Array.isArray(U))){const pe=Fs(A),ge=Fs(E),Ne=!Ja(pe.value)&&U.length>+pe.value,Ee=!Ja(ge.value)&&U.length<+ge.value;if((Ne||Ee)&&(ee(Ne,pe.message,ge.message),!s))return P(V[D].message),V}if(S&&!X&&or(U)){const{value:pe,message:ge}=Fs(S);if(Xu(pe)&&!U.match(pe)&&(V[D]={type:Lr.pattern,message:ge,ref:c,...K(Lr.pattern,ge)},!s))return P(ge),V}if(k){if(Pn(k)){const pe=await k(U,r),ge=ep(pe,j);if(ge&&(V[D]={...ge,...K(Lr.validate,ge.message)},!s))return P(ge.message),V}else if(la(k)){let pe={};for(const ge in k){if(!sn(pe)&&!s)break;const Ne=ep(await k[ge](U,r),j,ge);Ne&&(pe={...Ne,...K(ge,Ne.message)},P(Ne.message),s&&(V[D]=pe))}if(!sn(pe)&&(V[D]={ref:j,...pe},!s))return V}}return P(!0),V};const V1={mode:Gn.onSubmit,reValidateMode:Gn.onChange,shouldFocusError:!0};function H1(n={}){let a={...V1,...n},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Pn(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1};const s={};let o=la(a.defaultValues)||la(a.values)?Ha(a.defaultValues||a.values)||{}:{},u=a.shouldUnregister?{}:Ha(o),c={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},p,A=0;const E={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let v={...E};const C={array:z0(),state:z0()},S=a.criteriaMode===Gn.all,k=F=>J=>{clearTimeout(A),A=setTimeout(F,J)},D=async F=>{if(!a.disabled&&(E.isValid||v.isValid||F)){const J=a.resolver?sn((await ce()).errors):await X(s,!0);J!==r.isValid&&C.state.next({isValid:J})}},R=(F,J)=>{!a.disabled&&(E.isValidating||E.validatingFields||v.isValidating||v.validatingFields)&&((F||Array.from(d.mount)).forEach(ie=>{ie&&(J?Rt(r.validatingFields,ie,J):pa(r.validatingFields,ie))}),C.state.next({validatingFields:r.validatingFields,isValidating:!sn(r.validatingFields)}))},N=(F,J=[],ie,ke,Le=!0,we=!0)=>{if(ke&&ie&&!a.disabled){if(c.action=!0,we&&Array.isArray(Ye(s,F))){const Ge=ie(Ye(s,F),ke.argA,ke.argB);Le&&Rt(s,F,Ge)}if(we&&Array.isArray(Ye(r.errors,F))){const Ge=ie(Ye(r.errors,F),ke.argA,ke.argB);Le&&Rt(r.errors,F,Ge),O1(r.errors,F)}if((E.touchedFields||v.touchedFields)&&we&&Array.isArray(Ye(r.touchedFields,F))){const Ge=ie(Ye(r.touchedFields,F),ke.argA,ke.argB);Le&&Rt(r.touchedFields,F,Ge)}(E.dirtyFields||v.dirtyFields)&&(r.dirtyFields=Yl(o,u)),C.state.next({name:F,isDirty:ee(F,J),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Rt(u,F,J)},U=(F,J)=>{Rt(r.errors,F,J),C.state.next({errors:r.errors})},j=F=>{r.errors=F,C.state.next({errors:r.errors,isValid:!1})},P=(F,J,ie,ke)=>{const Le=Ye(s,F);if(Le){const we=Ye(u,F,ca(ie)?Ye(o,F):ie);ca(we)||ke&&ke.defaultChecked||J?Rt(u,F,J?we:J0(Le._f)):Ne(F,we),c.mount&&D()}},V=(F,J,ie,ke,Le)=>{let we=!1,Ge=!1;const T={name:F};if(!a.disabled){if(!ie||ke){(E.isDirty||v.isDirty)&&(Ge=r.isDirty,r.isDirty=T.isDirty=ee(),we=Ge!==T.isDirty);const b=vi(Ye(o,F),J);Ge=!!Ye(r.dirtyFields,F),b?pa(r.dirtyFields,F):Rt(r.dirtyFields,F,!0),T.dirtyFields=r.dirtyFields,we=we||(E.dirtyFields||v.dirtyFields)&&Ge!==!b}if(ie){const b=Ye(r.touchedFields,F);b||(Rt(r.touchedFields,F,ie),T.touchedFields=r.touchedFields,we=we||(E.touchedFields||v.touchedFields)&&b!==ie)}we&&Le&&C.state.next(T)}return we?T:{}},de=(F,J,ie,ke)=>{const Le=Ye(r.errors,F),we=(E.isValid||v.isValid)&&lr(J)&&r.isValid!==J;if(a.delayError&&ie?(p=k(()=>U(F,ie)),p(a.delayError)):(clearTimeout(A),p=null,ie?Rt(r.errors,F,ie):pa(r.errors,F)),(ie?!vi(Le,ie):Le)||!sn(ke)||we){const Ge={...ke,...we&&lr(J)?{isValid:J}:{},errors:r.errors,name:F};r={...r,...Ge},C.state.next(Ge)}},ce=async F=>{R(F,!0);const J=await a.resolver(u,a.context,R1(F||d.mount,s,a.criteriaMode,a.shouldUseNativeValidation));return R(F),J},Z=async F=>{const{errors:J}=await ce(F);if(F)for(const ie of F){const ke=Ye(J,ie);ke?Rt(r.errors,ie,ke):pa(r.errors,ie)}else r.errors=J;return J},X=async(F,J,ie={valid:!0})=>{for(const ke in F){const Le=F[ke];if(Le){const{_f:we,...Ge}=Le;if(we){const T=d.array.has(we.name),b=Le._f&&Q1(Le._f);b&&E.validatingFields&&R([ke],!0);const w=await tp(Le,d.disabled,u,S,a.shouldUseNativeValidation&&!J,T);if(b&&E.validatingFields&&R([ke]),w[we.name]&&(ie.valid=!1,J))break;!J&&(Ye(w,we.name)?T?F1(r.errors,w,we.name):Rt(r.errors,we.name,w[we.name]):pa(r.errors,we.name))}!sn(Ge)&&await X(Ge,J,ie)}}return ie.valid},K=()=>{for(const F of d.unMount){const J=Ye(s,F);J&&(J._f.refs?J._f.refs.every(ie=>!Hf(ie)):!Hf(J._f.ref))&&Et(F)}d.unMount=new Set},ee=(F,J)=>!a.disabled&&(F&&J&&Rt(u,F,J),!vi(G(),o)),pe=(F,J,ie)=>k1(F,d,{...c.mount?u:ca(J)?o:or(F)?{[F]:J}:J},ie,J),ge=F=>sc(Ye(c.mount?u:o,F,a.shouldUnregister?Ye(o,F,[]):[])),Ne=(F,J,ie={})=>{const ke=Ye(s,F);let Le=J;if(ke){const we=ke._f;we&&(!we.disabled&&Rt(u,F,jy(J,we)),Le=Ku(we.ref)&&Ja(J)?"":J,Qy(we.ref)?[...we.ref.options].forEach(Ge=>Ge.selected=Le.includes(Ge.value)):we.refs?fo(we.ref)?we.refs.forEach(Ge=>{(!Ge.defaultChecked||!Ge.disabled)&&(Array.isArray(Le)?Ge.checked=!!Le.find(T=>T===Ge.value):Ge.checked=Le===Ge.value||!!Le)}):we.refs.forEach(Ge=>Ge.checked=Ge.value===Le):UA(we.ref)?we.ref.value="":(we.ref.value=Le,we.ref.type||C.state.next({name:F,values:Ha(u)})))}(ie.shouldDirty||ie.shouldTouch)&&V(F,Le,ie.shouldTouch,ie.shouldDirty,!0),ie.shouldValidate&&Me(F)},Ee=(F,J,ie)=>{for(const ke in J){if(!J.hasOwnProperty(ke))return;const Le=J[ke],we=F+"."+ke,Ge=Ye(s,we);(d.array.has(F)||la(Le)||Ge&&!Ge._f)&&!$i(Le)?Ee(we,Le,ie):Ne(we,Le,ie)}},Y=(F,J,ie={})=>{const ke=Ye(s,F),Le=d.array.has(F),we=Ha(J);Rt(u,F,we),Le?(C.array.next({name:F,values:Ha(u)}),(E.isDirty||E.dirtyFields||v.isDirty||v.dirtyFields)&&ie.shouldDirty&&C.state.next({name:F,dirtyFields:Yl(o,u),isDirty:ee(F,we)})):ke&&!ke._f&&!Ja(we)?Ee(F,we,ie):Ne(F,we,ie),W0(F,d)&&C.state.next({...r}),C.state.next({name:c.mount?F:void 0,values:Ha(u)})},ae=async F=>{c.mount=!0;const J=F.target;let ie=J.name,ke=!0;const Le=Ye(s,ie),we=b=>{ke=Number.isNaN(b)||$i(b)&&isNaN(b.getTime())||vi(b,Ye(u,ie,b))},Ge=X0(a.mode),T=X0(a.reValidateMode);if(Le){let b,w;const H=J.type?J0(Le._f):x1(F),$=F.type===P0.BLUR||F.type===P0.FOCUS_OUT,Ae=!U1(Le._f)&&!a.resolver&&!Ye(r.errors,ie)&&!Le._f.deps||j1($,Ye(r.touchedFields,ie),r.isSubmitted,T,Ge),be=W0(ie,d,$);Rt(u,ie,H),$?(Le._f.onBlur&&Le._f.onBlur(F),p&&p(0)):Le._f.onChange&&Le._f.onChange(F);const Qe=V(ie,H,$),mt=!sn(Qe)||be;if(!$&&C.state.next({name:ie,type:F.type,values:Ha(u)}),Ae)return(E.isValid||v.isValid)&&(a.mode==="onBlur"?$&&D():$||D()),mt&&C.state.next({name:ie,...be?{}:Qe});if(!$&&be&&C.state.next({...r}),a.resolver){const{errors:ft}=await ce([ie]);if(we(H),ke){const vt=Z0(r.errors,s,ie),ot=Z0(ft,s,vt.name||ie);b=ot.error,ie=ot.name,w=sn(ft)}}else R([ie],!0),b=(await tp(Le,d.disabled,u,S,a.shouldUseNativeValidation))[ie],R([ie]),we(H),ke&&(b?w=!1:(E.isValid||v.isValid)&&(w=await X(s,!0)));ke&&(Le._f.deps&&Me(Le._f.deps),de(ie,w,b,Qe))}},xe=(F,J)=>{if(Ye(r.errors,J)&&F.focus)return F.focus(),1},Me=async(F,J={})=>{let ie,ke;const Le=eo(F);if(a.resolver){const we=await Z(ca(F)?F:Le);ie=sn(we),ke=F?!Le.some(Ge=>Ye(we,Ge)):ie}else F?(ke=(await Promise.all(Le.map(async we=>{const Ge=Ye(s,we);return await X(Ge&&Ge._f?{[we]:Ge}:Ge)}))).every(Boolean),!(!ke&&!r.isValid)&&D()):ke=ie=await X(s);return C.state.next({...!or(F)||(E.isValid||v.isValid)&&ie!==r.isValid?{}:{name:F},...a.resolver||!F?{isValid:ie}:{},errors:r.errors}),J.shouldFocus&&!ke&&to(s,xe,F?Le:d.mount),ke},G=F=>{const J={...c.mount?u:o};return ca(F)?J:or(F)?Ye(J,F):F.map(ie=>Ye(J,ie))},re=(F,J)=>({invalid:!!Ye((J||r).errors,F),isDirty:!!Ye((J||r).dirtyFields,F),error:Ye((J||r).errors,F),isValidating:!!Ye(r.validatingFields,F),isTouched:!!Ye((J||r).touchedFields,F)}),ye=F=>{F&&eo(F).forEach(J=>pa(r.errors,J)),C.state.next({errors:F?r.errors:{}})},Re=(F,J,ie)=>{const ke=(Ye(s,F,{_f:{}})._f||{}).ref,Le=Ye(r.errors,F)||{},{ref:we,message:Ge,type:T,...b}=Le;Rt(r.errors,F,{...b,...J,ref:ke}),C.state.next({name:F,errors:r.errors,isValid:!1}),ie&&ie.shouldFocus&&ke&&ke.focus&&ke.focus()},Ve=(F,J)=>Pn(F)?C.state.subscribe({next:ie=>F(pe(void 0,J),ie)}):pe(F,J,!0),Je=F=>C.state.subscribe({next:J=>{_1(F.name,J.name,F.exact)&&M1(J,F.formState||E,Oe,F.reRenderRoot)&&F.callback({values:{...u},...r,...J})}}).unsubscribe,He=F=>(c.mount=!0,v={...v,...F.formState},Je({...F,formState:v})),Et=(F,J={})=>{for(const ie of F?eo(F):d.mount)d.mount.delete(ie),d.array.delete(ie),J.keepValue||(pa(s,ie),pa(u,ie)),!J.keepError&&pa(r.errors,ie),!J.keepDirty&&pa(r.dirtyFields,ie),!J.keepTouched&&pa(r.touchedFields,ie),!J.keepIsValidating&&pa(r.validatingFields,ie),!a.shouldUnregister&&!J.keepDefaultValue&&pa(o,ie);C.state.next({values:Ha(u)}),C.state.next({...r,...J.keepDirty?{isDirty:ee()}:{}}),!J.keepIsValid&&D()},We=({disabled:F,name:J})=>{(lr(F)&&c.mount||F||d.disabled.has(J))&&(F?d.disabled.add(J):d.disabled.delete(J))},bt=(F,J={})=>{let ie=Ye(s,F);const ke=lr(J.disabled)||lr(a.disabled);return Rt(s,F,{...ie||{},_f:{...ie&&ie._f?ie._f:{ref:{name:F}},name:F,mount:!0,...J}}),d.mount.add(F),ie?We({disabled:lr(J.disabled)?J.disabled:a.disabled,name:F}):P(F,!0,J.value),{...ke?{disabled:J.disabled||a.disabled}:{},...a.progressive?{required:!!J.required,min:Kl(J.min),max:Kl(J.max),minLength:Kl(J.minLength),maxLength:Kl(J.maxLength),pattern:Kl(J.pattern)}:{},name:F,onChange:ae,onBlur:ae,ref:Le=>{if(Le){bt(F,J),ie=Ye(s,F);const we=ca(Le.value)&&Le.querySelectorAll&&Le.querySelectorAll("input,select,textarea")[0]||Le,Ge=T1(we),T=ie._f.refs||[];if(Ge?T.find(b=>b===we):we===ie._f.ref)return;Rt(s,F,{_f:{...ie._f,...Ge?{refs:[...T.filter(Hf),we,...Array.isArray(Ye(o,F))?[{}]:[]],ref:{type:we.type,name:F}}:{ref:we}}}),P(F,!1,void 0,we)}else ie=Ye(s,F,{}),ie._f&&(ie._f.mount=!1),(a.shouldUnregister||J.shouldUnregister)&&!(I1(d.array,F)&&c.action)&&d.unMount.add(F)}}},Kt=()=>a.shouldFocusError&&to(s,xe,d.mount),Ta=F=>{lr(F)&&(C.state.next({disabled:F}),to(s,(J,ie)=>{const ke=Ye(s,ie);ke&&(J.disabled=ke._f.disabled||F,Array.isArray(ke._f.refs)&&ke._f.refs.forEach(Le=>{Le.disabled=ke._f.disabled||F}))},0,!1))},Qt=(F,J)=>async ie=>{let ke;ie&&(ie.preventDefault&&ie.preventDefault(),ie.persist&&ie.persist());let Le=Ha(u);if(C.state.next({isSubmitting:!0}),a.resolver){const{errors:we,values:Ge}=await ce();r.errors=we,Le=Ge}else await X(s);if(d.disabled.size)for(const we of d.disabled)Rt(Le,we,void 0);if(pa(r.errors,"root"),sn(r.errors)){C.state.next({errors:{}});try{await F(Le,ie)}catch(we){ke=we}}else J&&await J({...r.errors},ie),Kt(),setTimeout(Kt);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:sn(r.errors)&&!ke,submitCount:r.submitCount+1,errors:r.errors}),ke)throw ke},Vt=(F,J={})=>{Ye(s,F)&&(ca(J.defaultValue)?Y(F,Ha(Ye(o,F))):(Y(F,J.defaultValue),Rt(o,F,Ha(J.defaultValue))),J.keepTouched||pa(r.touchedFields,F),J.keepDirty||(pa(r.dirtyFields,F),r.isDirty=J.defaultValue?ee(F,Ha(Ye(o,F))):ee()),J.keepError||(pa(r.errors,F),E.isValid&&D()),C.state.next({...r}))},Ft=(F,J={})=>{const ie=F?Ha(F):o,ke=Ha(ie),Le=sn(F),we=Le?o:ke;if(J.keepDefaultValues||(o=ie),!J.keepValues){if(J.keepDirtyValues){const Ge=new Set([...d.mount,...Object.keys(Yl(o,u))]);for(const T of Array.from(Ge))Ye(r.dirtyFields,T)?Rt(we,T,Ye(u,T)):Y(T,Ye(we,T))}else{if(RA&&ca(F))for(const Ge of d.mount){const T=Ye(s,Ge);if(T&&T._f){const b=Array.isArray(T._f.refs)?T._f.refs[0]:T._f.ref;if(Ku(b)){const w=b.closest("form");if(w){w.reset();break}}}}for(const Ge of d.mount)Y(Ge,Ye(we,Ge))}u=Ha(we),C.array.next({values:{...we}}),C.state.next({values:{...we}})}d={mount:J.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!E.isValid||!!J.keepIsValid||!!J.keepDirtyValues,c.watch=!!a.shouldUnregister,C.state.next({submitCount:J.keepSubmitCount?r.submitCount:0,isDirty:Le?!1:J.keepDirty?r.isDirty:!!(J.keepDefaultValues&&!vi(F,o)),isSubmitted:J.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Le?{}:J.keepDirtyValues?J.keepDefaultValues&&u?Yl(o,u):r.dirtyFields:J.keepDefaultValues&&F?Yl(o,F):J.keepDirty?r.dirtyFields:{},touchedFields:J.keepTouched?r.touchedFields:{},errors:J.keepErrors?r.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},va=(F,J)=>Ft(Pn(F)?F(u):F,J),Te=(F,J={})=>{const ie=Ye(s,F),ke=ie&&ie._f;if(ke){const Le=ke.refs?ke.refs[0]:ke.ref;Le.focus&&(Le.focus(),J.shouldSelect&&Pn(Le.select)&&Le.select())}},Oe=F=>{r={...r,...F}},lt={control:{register:bt,unregister:Et,getFieldState:re,handleSubmit:Qt,setError:Re,_subscribe:Je,_runSchema:ce,_focusError:Kt,_getWatch:pe,_getDirty:ee,_setValid:D,_setFieldArray:N,_setDisabledField:We,_setErrors:j,_getFieldArray:ge,_reset:Ft,_resetDefaultValues:()=>Pn(a.defaultValues)&&a.defaultValues().then(F=>{va(F,a.resetOptions),C.state.next({isLoading:!1})}),_removeUnmounted:K,_disableForm:Ta,_subjects:C,_proxyFormState:E,get _fields(){return s},get _formValues(){return u},get _state(){return c},set _state(F){c=F},get _defaultValues(){return o},get _names(){return d},set _names(F){d=F},get _formState(){return r},get _options(){return a},set _options(F){a={...a,...F}}},subscribe:He,trigger:Me,register:bt,handleSubmit:Qt,watch:Ve,setValue:Y,getValues:G,reset:va,resetField:Vt,clearErrors:ye,unregister:Et,setError:Re,setFocus:Te,getFieldState:re};return{...lt,formControl:lt}}function G1(n={}){const a=En.useRef(void 0),r=En.useRef(void 0),[s,o]=En.useState({isDirty:!1,isValidating:!1,isLoading:Pn(n.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1,isReady:!1,defaultValues:Pn(n.defaultValues)?void 0:n.defaultValues});a.current||(a.current={...n.formControl?n.formControl:H1(n),formState:s},n.formControl&&n.defaultValues&&!Pn(n.defaultValues)&&n.formControl.reset(n.defaultValues,n.resetOptions));const u=a.current.control;return u._options=n,N1(()=>{const c=u._subscribe({formState:u._proxyFormState,callback:()=>o({...u._formState}),reRenderRoot:!0});return o(d=>({...d,isReady:!0})),u._formState.isReady=!0,c},[u]),En.useEffect(()=>u._disableForm(n.disabled),[u,n.disabled]),En.useEffect(()=>{n.mode&&(u._options.mode=n.mode),n.reValidateMode&&(u._options.reValidateMode=n.reValidateMode)},[u,n.mode,n.reValidateMode]),En.useEffect(()=>{n.errors&&(u._setErrors(n.errors),u._focusError())},[u,n.errors]),En.useEffect(()=>{n.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[u,n.shouldUnregister]),En.useEffect(()=>{if(u._proxyFormState.isDirty){const c=u._getDirty();c!==s.isDirty&&u._subjects.state.next({isDirty:c})}},[u,s.isDirty]),En.useEffect(()=>{n.values&&!vi(n.values,r.current)?(u._reset(n.values,u._options.resetOptions),r.current=n.values,o(c=>({...c}))):u._resetDefaultValues()},[u,n.values]),En.useEffect(()=>{u._state.mount||(u._setValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),a.current.formState=S1(s,u),a.current}const ap=(n,a,r)=>{if(n&&"reportValidity"in n){const s=Ye(r,a);n.setCustomValidity(s&&s.message||""),n.reportValidity()}},Fy=(n,a)=>{for(const r in a.fields){const s=a.fields[r];s&&s.ref&&"reportValidity"in s.ref?ap(s.ref,r,n):s&&s.refs&&s.refs.forEach(o=>ap(o,r,n))}},P1=(n,a)=>{a.shouldUseNativeValidation&&Fy(n,a);const r={};for(const s in n){const o=Ye(a.fields,s),u=Object.assign(n[s]||{},{ref:o&&o.ref});if(z1(a.names||Object.keys(n),s)){const c=Object.assign({},Ye(r,s));Rt(c,"root",u),Rt(r,s,c)}else Rt(r,s,u)}return r},z1=(n,a)=>{const r=np(a);return n.some(s=>np(s).match(`^${r}\\.\\d+`))};function np(n){return n.replace(/\]|\[/g,"")}function q1(n,a,r){return r===void 0&&(r={}),function(s,o,u){try{return Promise.resolve(function(c,d){try{var p=(a!=null&&a.context,Promise.resolve(n[r.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},a,{context:o}))).then(function(A){return u.shouldUseNativeValidation&&Fy({},u),{values:r.raw?Object.assign({},s):A,errors:{}}}))}catch(A){return d(A)}return p&&p.then?p.then(void 0,d):p}(0,function(c){if(!c.inner)throw c;return{values:{},errors:P1((d=c,p=!u.shouldUseNativeValidation&&u.criteriaMode==="all",(d.inner||[]).reduce(function(A,E){if(A[E.path]||(A[E.path]={message:E.message,type:E.type}),p){var v=A[E.path].types,C=v&&v[E.type];A[E.path]=Ry(E.path,p,A,E.type,C?[].concat(C,E.message):E.message)}return A},{})),u)};var d,p}))}catch(c){return Promise.reject(c)}}}const Y1=({attachments:n,onAttachmentsChange:a})=>{const{t:r}=gt(),[s,o]=Q.useState(""),u=async p=>{const A=p.target.files;if(!(!A||A.length===0)){o("Uploading...");try{const E=[...n];for(const v of Array.from(A)){const C=await v.arrayBuffer(),S=new Uint8Array(C),k={Id:crypto.randomUUID(),Filename:v.name,Blob:S,CredentialId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};E.push(k)}a(E),o("Files uploaded successfully."),setTimeout(()=>o(""),3e3)}catch(E){console.error("Error uploading files:",E),o("Error uploading files."),setTimeout(()=>o(""),3e3)}p.target.value=""}},c=p=>{try{const A=[...n],E=A.findIndex(v=>v.Id===p.Id);E!==-1&&A.splice(E,1),a(A),o("Attachment deleted successfully."),setTimeout(()=>o(""),3e3)}catch(A){console.error("Error deleting attachment:",A),o("Error deleting attachment."),setTimeout(()=>o(""),3e3)}},d=n.filter(p=>!p.IsDeleted);return h.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:r("common.attachments")}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("input",{type:"file",multiple:!0,onChange:u,className:"block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400"}),s&&h.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:s})]}),d.length>0&&h.jsxs("div",{children:[h.jsx("h4",{className:"mb-2 text-md font-medium text-gray-900 dark:text-white",children:"Current attachments:"}),h.jsx("div",{className:"space-y-2",children:d.map(p=>h.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded border border-gray-200 dark:border-gray-600",children:[h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p.Filename}),h.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(p.CreatedAt).toLocaleDateString()})]}),h.jsx("button",{type:"button",onClick:()=>c(p),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${p.Filename}`,children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},p.Id))})]})]})]})},Ji=["spamok.com","solarflarecorp.com","spamok.nl","3060.nl","landmail.nl","asdasd.nl","spamok.de","spamok.com.ua","spamok.es","spamok.fr"],K1=({id:n,label:a,value:r,onChange:s,error:o,required:u=!1})=>{const{t:c}=gt(),d=ka(),[p,A]=Q.useState(!1),[E,v]=Q.useState(""),[C,S]=Q.useState(""),[k,D]=Q.useState(!1),[R,N]=Q.useState([]),U=Q.useRef(null);Q.useEffect(()=>{(async()=>{const Z=await d.getVaultMetadata();Z!=null&&Z.privateEmailDomains&&N(Z.privateEmailDomains)})()},[d]);const j=Q.useMemo(()=>R.length>0&&!(R.length===1&&(R[0]==="DISABLED.TLD"||R[0]==="")),[R]);Q.useEffect(()=>{if(!r){j&&R[0]?S(R[0]):Ji[0]&&S(Ji[0]);return}if(r.includes("@")){const[ce,Z]=r.split("@");v(ce),S(Z);const X=Ji.includes(Z)||R.includes(Z);A(!X)}else v(r),A(!1),!C&&!r.includes("@")&&(j&&R[0]?S(R[0]):Ji[0]&&S(Ji[0]))},[r,R,j,C]);const P=Q.useCallback(ce=>{const Z=ce.target.value;if(Z.includes("@")){A(!0),s(Z);return}v(Z),s(!p&&C?`${Z}@${C}`:Z)},[p,C,s]),V=Q.useCallback(ce=>{S(ce);const Z=E.includes("@")?E.split("@")[0]:E;s(`${Z}@${ce}`),A(!1),D(!1)},[E,s]),de=Q.useCallback(()=>{const ce=!p;if(A(ce),!ce&&!r.includes("@")){const Z=j&&R[0]?R[0]:Ji[0];s(`${E}@${Z}`),S(Z)}},[p,r,E,j,R,s]);return Q.useEffect(()=>{const ce=Z=>{U.current&&!U.current.contains(Z.target)&&D(!1)};if(k)return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[k]),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[a,u&&h.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),h.jsxs("div",{className:"relative w-full",children:[h.jsxs("div",{className:"flex w-full",children:[h.jsx("input",{type:"text",id:n,className:`flex-1 min-w-0 px-3 py-2 border ${o?"border-red-500":"border-gray-300 dark:border-gray-600"} ${p?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:p?r:E,onChange:P,placeholder:c(p?"credentials.enterFullEmail":"credentials.enterEmailPrefix")}),!p&&h.jsxs("button",{type:"button",onClick:()=>D(!k),className:"inline-flex items-center px-2 py-2 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-md bg-gray-50 dark:bg-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-500 cursor-pointer text-sm truncate max-w-[120px]",children:[h.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),h.jsx("span",{className:"truncate ml-0.5",children:C})]})]}),k&&!p&&h.jsx("div",{ref:U,className:"absolute z-50 mt-2 w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 max-h-96 overflow-y-auto",children:h.jsxs("div",{className:"p-4",children:[j&&h.jsxs("div",{className:"mb-4",children:[h.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[c("credentials.privateEmailTitle")," ",h.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",c("credentials.privateEmailAliasVaultServer"),")"]})]}),h.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:c("credentials.privateEmailDescription")}),h.jsx("div",{className:"flex flex-wrap gap-2",children:R.map(ce=>h.jsx("button",{type:"button",onClick:()=>V(ce),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${C===ce?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 border border-gray-300 dark:border-gray-600"}`,children:ce},ce))})]}),h.jsxs("div",{className:j?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[h.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:c("credentials.publicEmailTitle")}),h.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:c("credentials.publicEmailDescription")}),h.jsx("div",{className:"flex flex-wrap gap-2",children:Ji.map(ce=>h.jsx("button",{type:"button",onClick:()=>V(ce),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${C===ce?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 border border-gray-300 dark:border-gray-600"}`,children:ce},ce))})]})]})})]}),h.jsx("div",{children:h.jsx("button",{type:"button",onClick:de,className:"text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300",children:c(p?"credentials.useDomainChooser":"credentials.enterCustomDomain")})}),o&&h.jsx("p",{className:"text-sm text-red-500 mt-1",children:o})]})},J1=({name:n})=>{switch(n){case"visibility":return h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),h.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M23 4v6h-6"}),h.jsx("path",{d:"M1 20v-6h6"}),h.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]});case"settings":return h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),h.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},Rr=Q.forwardRef(({id:n,label:a,value:r,onChange:s,type:o="text",placeholder:u,required:c=!1,multiline:d=!1,rows:p=1,error:A,buttons:E=[],showPassword:v,onShowPasswordChange:C},S)=>{const{t:k}=gt(),[D,R]=En.useState(!1),N=v!==void 0?v:D,U=V=>{v!==void 0?C==null||C(V):R(V)},j=`mt-1 block w-full rounded-md ${A?"border-red-500":"border-gray-300 dark:border-gray-600"} text-gray-900 sm:text-sm rounded-lg shadow-sm border focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400 py-2 px-3`,P=o==="password"?[...E,{icon:N?"visibility-off":"visibility",onClick:()=>U(!N),title:k(N?"common.hidePassword":"common.showPassword")}]:E;return h.jsxs("div",{children:[h.jsxs("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[a,c&&h.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),h.jsxs("div",{className:"relative",children:[d?h.jsx("textarea",{id:n,value:r,onChange:V=>s(V.target.value),rows:p,placeholder:u,className:j}):h.jsx("input",{ref:S,type:o==="password"&&!N?"password":"text",id:n,value:r,onChange:V=>s(V.target.value),placeholder:u,className:j}),P.length>0&&h.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:P.map((V,de)=>h.jsx("button",{type:"button",onClick:V.onClick,title:V.title,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",children:h.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx(J1,{name:V.icon})})},de))})]}),A&&h.jsx("p",{className:"mt-1 text-sm text-red-500",children:A})]})});Rr.displayName="FormInput";var Xa=(n=>(n.EXPAND="expand",n.EDIT="edit",n.DELETE="delete",n.SETTINGS="settings",n.RELOAD="reload",n.EXTERNAL_LINK="external_link",n.SAVE="save",n.PLUS="plus",n.TAB="tab",n))(Xa||{});const X1=({type:n,className:a="w-5 h-5"})=>({expand:h.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),edit:h.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),delete:h.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),settings:h.jsxs("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:h.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),external_link:h.jsxs("svg",{className:a,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),h.jsx("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]}),save:h.jsxs("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V7l-4-4z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 3v5h10"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 12a2 2 0 100 4 2 2 0 000-4z"})]}),plus:h.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:h.jsxs("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]})})[n]||null,ln=({onClick:n,title:a,iconType:r,variant:s="default"})=>{const o={default:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700",primary:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 hover:bg-primary-100 dark:hover:bg-primary-900/20",danger:"text-red-500 hover:text-red-600 hover:bg-red-100 dark:hover:bg-red-900/20"};return h.jsx("button",{onClick:n,className:`p-2 rounded-lg ${o[s]}`,title:a,children:h.jsx(X1,{type:r})})},$u=({isOpen:n,onClose:a,onConfirm:r,title:s,message:o,confirmText:u="",cancelText:c="",variant:d="default"})=>{const{t:p}=gt();if(!n)return null;const A=d==="danger"?"bg-red-600 hover:bg-red-700 focus:ring-red-500":"bg-primary-600 hover:bg-primary-700 focus:ring-primary-500";return h.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-60 transition-opacity",onClick:a}),h.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:h.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all w-full max-w-lg",children:[h.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:a,children:[h.jsx("span",{className:"sr-only",children:p("common.close")}),h.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),h.jsxs("div",{className:"sm:flex sm:items-start",children:[d==="danger"&&h.jsx("div",{className:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 dark:bg-red-900 sm:mx-0 sm:h-10 sm:w-10",children:h.jsx("svg",{className:"h-6 w-6 text-red-600 dark:text-red-200",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),h.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[h.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:s}),h.jsx("div",{className:"mt-2",children:h.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:o})})]})]}),h.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[u&&h.jsx("button",{type:"button",className:`inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 sm:ml-3 sm:w-auto ${A}`,onClick:r,children:u}),c&&h.jsx("button",{type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-gray-200 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-primary-500 sm:mt-0 sm:w-auto",onClick:a,children:c})]})]})})]})};var $1=class{constructor(n){this.lowercaseChars="abcdefghijklmnopqrstuvwxyz",this.uppercaseChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.numberChars="0123456789",this.specialChars="!@#$%^&*()_+-=[]{}|;:,.<>?",this.ambiguousChars="Il1O0o",this.length=18,this.useLowercase=!0,this.useUppercase=!0,this.useNumbers=!0,this.useSpecial=!0,this.useNonAmbiguous=!1,n&&this.applySettings(n)}applySettings(n){return this.length=n.Length,this.useLowercase=n.UseLowercase,this.useUppercase=n.UseUppercase,this.useNumbers=n.UseNumbers,this.useSpecial=n.UseSpecialChars,this.useNonAmbiguous=n.UseNonAmbiguousChars,this}setLength(n){return this.length=n,this}useLowercaseLetters(n){return this.useLowercase=n,this}useUppercaseLetters(n){return this.useUppercase=n,this}useNumericCharacters(n){return this.useNumbers=n,this}useSpecialCharacters(n){return this.useSpecial=n,this}useNonAmbiguousCharacters(n){return this.useNonAmbiguous=n,this}getUnbiasedRandomIndex(n){const a=Math.floor(4294967296/n)*n;for(;;){const r=new Uint32Array(1);crypto.getRandomValues(r);const s=r[0];if(s<a)return s%n}}generateRandomPassword(){const n=this.buildCharacterSet();let a=this.generateInitialPassword(n);return a=this.ensureRequirements(a),a}buildCharacterSet(){let n="";return this.useLowercase&&(n+=this.lowercaseChars),this.useUppercase&&(n+=this.uppercaseChars),this.useNumbers&&(n+=this.numberChars),this.useSpecial&&(n+=this.specialChars),n.length===0&&(n=this.lowercaseChars),this.useNonAmbiguous&&(n=this.removeAmbiguousCharacters(n)),n}removeAmbiguousCharacters(n){for(const a of this.ambiguousChars)n=n.replace(a,"");return n}generateInitialPassword(n){let a="";for(let r=0;r<this.length;r++)a+=n[this.getUnbiasedRandomIndex(n.length)];return a}ensureRequirements(n){return this.useLowercase&&!/[a-z]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.lowercaseChars,!0))),this.useUppercase&&!/[A-Z]/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.uppercaseChars,!0))),this.useNumbers&&!/\d/.exec(n)&&(n=this.addCharacterFromSet(n,this.getSafeCharacterSet(this.numberChars,!1))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(n)&&(n=this.addCharacterFromSet(n,this.specialChars)),n}getSafeCharacterSet(n,a){if(!this.useNonAmbiguous)return n;let r=n;for(const s of this.ambiguousChars){if(!a&&!/\d/.test(s))continue;let o=s;a&&(n===this.lowercaseChars?o=s.toLowerCase():o=s.toUpperCase()),r=r.replace(o,"")}return r}addCharacterFromSet(n,a){const r=this.getUnbiasedRandomIndex(this.length),s=a[this.getUnbiasedRandomIndex(a.length)];return n.substring(0,r)+s+n.substring(r+1)}},Wu=n=>new $1(n);const W1=({isOpen:n,onClose:a,onSave:r,onSettingsChange:s,initialSettings:o})=>{const{t:u}=gt(),[c,d]=Q.useState(o),[p,A]=Q.useState(""),E=Q.useCallback(D=>{try{const N=Wu(D).generateRandomPassword();A(N)}catch(R){console.error("Error generating preview password:",R),A("")}},[]);Q.useEffect(()=>{n&&(d({...o}),E({...o}))},[n,o,E]);const v=Q.useCallback((D,R)=>{const N={...c,[D]:R};d(N),E(N),s==null||s(N)},[c,E,s]),C=Q.useCallback(()=>{E(c)},[c,E]),S=Q.useCallback(()=>{r(p),a()},[p,r,a]),k=Q.useCallback(()=>{a()},[a]);return n?h.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-60 transition-opacity",onClick:k}),h.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:h.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all w-full max-w-lg",children:[h.jsx("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:k,children:h.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),h.jsx("div",{className:"sm:flex sm:items-start",children:h.jsxs("div",{className:"w-full mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[h.jsx("h3",{className:"text-lg font-medium leading-6 text-gray-900 dark:text-white mb-4",children:u("credentials.changePasswordComplexity")}),h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{className:"mt-4",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("input",{type:"text",value:p,readOnly:!0,className:"flex-1 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white font-mono"}),h.jsx("button",{type:"button",onClick:C,className:"px-3 py-2 text-sm text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:u("credentials.generateNewPreview"),children:h.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsx("button",{type:"button",onClick:()=>v("UseLowercase",!c.UseLowercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseLowercase?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:u("credentials.includeLowercase"),children:h.jsx("span",{className:"font-mono text-base",children:"a-z"})}),h.jsx("button",{type:"button",onClick:()=>v("UseUppercase",!c.UseUppercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseUppercase?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:u("credentials.includeUppercase"),children:h.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),h.jsx("button",{type:"button",onClick:()=>v("UseNumbers",!c.UseNumbers),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseNumbers?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:u("credentials.includeNumbers"),children:h.jsx("span",{className:"font-mono text-base",children:"0-9"})}),h.jsx("button",{type:"button",onClick:()=>v("UseSpecialChars",!c.UseSpecialChars),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.UseSpecialChars?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:u("credentials.includeSpecialChars"),children:h.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),h.jsxs("div",{className:"flex items-center",children:[h.jsx("input",{id:"use-non-ambiguous",type:"checkbox",checked:c.UseNonAmbiguousChars,onChange:D=>v("UseNonAmbiguousChars",D.target.checked),className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600"}),h.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:u("credentials.avoidAmbiguousChars")})]})]})]}),h.jsx("div",{className:"mt-5 sm:mt-6 sm:flex sm:flex-row-reverse",children:h.jsxs("button",{type:"button",className:"inline-flex w-full justify-center items-center gap-1 rounded-md bg-gray-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-500 sm:ml-3 sm:w-auto",onClick:S,children:[h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 13l-3 3m0 0l-3-3m3 3V8m0 13a9 9 0 110-18 9 9 0 010 18z"})}),u("common.use")]})})]})})]})})]}):null},Z1=({id:n,label:a,value:r,onChange:s,placeholder:o,error:u,showPassword:c,onShowPasswordChange:d,initialSettings:p})=>{const{t:A}=gt(),[E,v]=Q.useState(!1),[C,S]=Q.useState(!1),[k,D]=Q.useState(p),R=c!==void 0?c:E,N=Q.useCallback(X=>{c!==void 0?d==null||d(X):v(X)},[c,d]);Q.useEffect(()=>{D({...p})},[]);const U=Q.useCallback(X=>{try{const ee=Wu(X).generateRandomPassword();s(ee),N(!0)}catch(K){console.error("Error generating password:",K)}},[s,N]),j=Q.useCallback(X=>{const K=parseInt(X.target.value,10),ee={...k,Length:K};D(ee),U(ee)},[k,U]),P=Q.useCallback(()=>{U(k)},[U,k]),V=Q.useCallback(X=>{s(X),N(!0)},[s,N]),de=Q.useCallback(X=>{D(X)},[]),ce=Q.useCallback(()=>{N(!R)},[R,N]),Z=Q.useCallback(()=>{S(!0)},[]);return h.jsxs("div",{className:"space-y-2",children:[h.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:a}),h.jsxs("div",{className:"flex",children:[h.jsx("div",{className:"relative flex-grow",children:h.jsx("input",{type:R?"text":"password",id:n,value:r,onChange:X=>s(X.target.value),placeholder:o,className:"outline-0 shadow-sm border border-gray-300 bg-gray-50 text-gray-900 sm:text-sm rounded-l-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white"})}),h.jsxs("div",{className:"flex",children:[h.jsx("button",{type:"button",onClick:ce,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium text-sm dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:A(R?"common.hidePassword":"common.showPassword"),children:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R?h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}):h.jsxs(h.Fragment,{children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})}),h.jsx("button",{type:"button",onClick:P,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm border-l border-gray-300 dark:border-gray-700 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:A("credentials.generateRandomPassword"),children:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),h.jsxs("div",{className:"pt-2",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("label",{htmlFor:`${n}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:A("credentials.passwordLength")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:k.Length}),h.jsx("button",{type:"button",onClick:Z,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:A("credentials.changePasswordComplexity"),children:h.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),h.jsx("input",{type:"range",id:`${n}-length`,min:"8",max:"64",value:k.Length,onChange:j,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),u&&h.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:u}),h.jsx(W1,{isOpen:C,onClose:()=>S(!1),onSave:V,onSettingsChange:de,initialSettings:k})]})},eI=({id:n,label:a,value:r,onChange:s,placeholder:o,error:u,onRegenerate:c})=>{const{t:d}=gt(),p=Q.useCallback(E=>{s(E.target.value)},[s]),A=Q.useCallback(()=>{c()},[c]);return h.jsxs("div",{className:"space-y-2",children:[h.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-900 dark:text-white",children:a}),h.jsxs("div",{className:"flex",children:[h.jsx("div",{className:"relative flex-grow",children:h.jsx("input",{type:"text",id:n,value:r,onChange:p,placeholder:o,className:"outline-0 shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-l-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white"})}),h.jsx("div",{className:"flex",children:h.jsx("button",{type:"button",onClick:A,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:d("credentials.generateRandomUsername"),children:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})})]}),u&&h.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:u})]})};class tI{constructor(a){this.authContextLogout=a}async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==da.DEFAULT_API_URL}async authFetch(a,r={},s=!0,o=!0){const u=new Headers(r.headers??{}),c=await this.getAccessToken();c&&u.set("Authorization",`Bearer ${c}`);const d={...r,headers:u};try{const p=await this.rawFetch(a,d);if(p.status===401){const A=await this.refreshAccessToken();if(A){u.set("Authorization",`Bearer ${A}`);const E=await this.rawFetch(a,{...d,headers:u});if(!E.ok)throw new Error("Request failed after token refresh");return s?E.json():E}else throw this.authContextLogout(null),new Error("Session expired")}if(!p.ok&&o)throw new Error(`HTTP error! status: ${p.status}`);return s?p.json():p}catch(p){throw console.error("API request failed:",p),p}}async rawFetch(a,r={}){const o=await this.getBaseUrl()+a,u=new Headers(r.headers??{});u.set("X-AliasVault-Client",`${da.CLIENT_NAME}-${da.VERSION}`);const c={...r,headers:u};try{return await fetch(o,c)}catch(d){throw console.error("API request failed:",d),d}}async refreshAccessToken(){const a=await this.getRefreshToken();if(!a)return null;try{const r=await this.rawFetch("Auth/refresh",{method:"POST",headers:{"Content-Type":"application/json","X-Ignore-Failure":"true"},body:JSON.stringify({token:await this.getAccessToken(),refreshToken:a})});if(!r.ok)throw new Error("Failed to refresh token");const s=await r.json();return this.updateTokens(s.token,s.refreshToken),s.token}catch{return this.authContextLogout("Your session has expired. Please login again."),null}}async get(a){return this.authFetch(a,{method:"GET"})}async downloadBlob(a){try{const s=await(await this.authFetch(a,{method:"GET",headers:{Accept:"application/octet-stream"}},!1)).arrayBuffer();return new Uint8Array(s)}catch(r){throw console.error("Error downloading blob:",r),r}}async post(a,r,s=!0){return this.authFetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)},s)}async put(a,r){return this.authFetch(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async delete(a){return this.authFetch(a,{method:"DELETE"},!1)}async logout(a=null){try{const r=await this.getRefreshToken();r&&await this.post("Auth/revoke",{token:await this.getAccessToken(),refreshToken:r},!1)}catch(r){console.error("WebApi logout error:",r)}this.authContextLogout(a)}async getStatus(){try{return await this.get("Auth/status")}catch{return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(a){return a.serverVersion==="0.0.0"?"serverNotAvailable":a.clientVersionSupported?da.isServerVersionSupported(a.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}validateVaultResponse(a,r){return a.status===1||a.status===2?r("errors.VaultOutdated"):null}async getAccessToken(){return await Ke.getItem("local:accessToken")??null}async getRefreshToken(){return await Ke.getItem("local:refreshToken")??null}async updateTokens(a,r){await Ke.setItem("local:accessToken",a),await Ke.setItem("local:refreshToken",r)}async getApiUrl(){const a=await Ke.getItem("local:apiUrl");return!a||a.length===0?da.DEFAULT_API_URL:a}}const Vy=Q.createContext(null),aI=({children:n})=>{const{logout:a}=Kn(),[r,s]=Q.useState(null);return Q.useEffect(()=>{const o=new tI(u=>{u?a(u):a()});s(o)},[a]),r?h.jsx(Vy.Provider,{value:r,children:n}):null},fr=()=>{const n=Q.useContext(Vy);if(!n)throw new Error("useWebApi must be used within a WebApiProvider");return n},Gf=async(n,a,r=!0)=>{if(!r)return n();const s=Date.now(),o=await n(),u=Date.now()-s;return u<a&&await new Promise(c=>setTimeout(c,a-u)),o},lc=()=>{const{t:n}=gt(),a=Kn(),r=ka(),s=fr();return{syncVault:Q.useCallback(async(u={})=>{const{initialSync:c=!1,onSuccess:d,onError:p,onStatus:A,_onOffline:E,onUpgradeRequired:v}=u,C=c;try{const{isLoggedIn:S}=await a.initializeAuth();if(!S)return!1;A==null||A(n("common.checkingVaultUpdates"));const k=await Gf(()=>s.getStatus(),300,C);k.serverVersion;const D=s.validateStatusResponse(k);if(D)return p==null||p(n("common.errors."+D)),!1;const R=await ta("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(R&&k.srpSalt&&k.srpSalt!==R.salt)return await s.logout(n("common.errors.passwordChanged")),!1;const N=await r.getVaultMetadata(),U=(N==null?void 0:N.vaultRevisionNumber)??0;if(k.vaultRevision>U){A==null||A(n("common.syncingUpdatedVault"));const j=await Gf(()=>s.get("Vault"),1e3,C),P=s.validateVaultResponse(j,n);if(P)return(P.includes("authentication")||P.includes("unauthorized"))&&(await s.logout(P),p==null||p(P)),!1;try{const V=await ta("GET_ENCRYPTION_KEY",{},"background");return await(await r.initializeDatabase(j,V)).hasPendingMigrations()?(v==null||v(),!1):(d==null||d(!0),!0)}catch(V){if(V instanceof Error&&V.message.includes("This browser extension is outdated"))return await s.logout(V.message),p==null||p(V.message),!1;throw new Error("Vault could not be decrypted, if the problem persists please logout and login again.")}}return await r.hasPendingMigrations()?(v==null||v(),!1):(await Gf(()=>Promise.resolve(d==null?void 0:d(!1)),300,C),!1)}catch(S){const k=S instanceof Error?S.message:"Unknown error during vault sync";return console.error("Vault sync error:",S),k.includes("This browser extension is outdated")?(await s.logout(k),p==null||p(k),!1):(p==null||p(k),!1)}},[a,r,s,n])}};function Hy(){const{t:n}=gt(),[a,r]=Q.useState(!1),[s,o]=Q.useState(n("common.syncingVault")),u=ka(),{syncVault:c}=lc(),d=Q.useCallback(async(A,E)=>{var v,C;o(n("common.savingChangesToVault")),await A(),o(n("common.uploadingVaultToServer"));try{const S=u.sqliteClient.exportToBase64(),k=await ta("GET_ENCRYPTION_KEY",{},"background"),R={vaultBlob:await qt.symmetricEncrypt(S,k)},N=await ta("UPLOAD_VAULT",R,"background");if(N.status===0&&N.newRevisionNumber)await u.setCurrentVaultRevisionNumber(N.newRevisionNumber),(v=E.onSuccess)==null||v.call(E);else throw N.status===1?new Error("Vault merge required. Please login via the web app to merge the multiple pending updates to your vault."):N.status===2?new Error("Your vault is outdated. Please login on the AliasVault website and follow the steps."):new Error("Failed to upload vault to server. Please try again by re-opening the app.")}catch(S){if(S instanceof Error&&(S.message.includes("network")||S.message.includes("timeout"))){(C=E.onError)==null||C.call(E,new Error("Network error"));return}throw S}},[u,n]);return{executeVaultMutation:Q.useCallback(async(A,E={})=>{var v;try{if(r(!0),o(n("common.checkingVaultUpdates")),E.skipSyncCheck){o(n("common.executingOperation")),await d(A,E);return}await c({onStatus:C=>o(C),onSuccess:async C=>{await d(A,E)},onError:C=>{var S;(S=E.onError)==null||S.call(E,new Error(C))}})}catch(C){console.error("Error during vault mutation:",C),(v=E.onError)==null||v.call(E,C instanceof Error?C:new Error("Unknown error"))}finally{r(!1),o("")}},[c,d,n]),isLoading:a,syncStatus:s}}var Gy=(n=>(n.Male="Male",n.Female="Female",n.Other="Other",n))(Gy||{}),_A=class Qr{constructor(){this.symbols=[".","-"]}generateUsername(a){let r=this.generateEmailPrefix(a);return r=r.replace(/[^a-zA-Z0-9]/g,""),r.length<Qr.MIN_LENGTH?r+=this.generateRandomString(Qr.MIN_LENGTH-r.length):r.length>Qr.MAX_LENGTH&&(r=r.substring(0,Qr.MAX_LENGTH)),r}generateEmailPrefix(a){const r=[];switch(typeof a.birthDate=="string"&&(a.birthDate=new Date(a.birthDate)),this.getSecureRandom(4)){case 0:r.push(a.firstName.substring(0,1).toLowerCase()+a.lastName.toLowerCase());break;case 1:r.push((a.firstName+a.lastName).toLowerCase());break;case 2:r.push(a.firstName.toLowerCase()+a.lastName.substring(0,1).toLowerCase());break;case 3:r.push(a.firstName.substring(0,Math.min(3,a.firstName.length)).toLowerCase()+a.lastName.toLowerCase());break}switch(this.getSecureRandom(2)){case 0:r.push(a.birthDate.getFullYear().toString());break;case 1:r.push(a.birthDate.getFullYear().toString().substring(2));break}let s=r.join(this.getRandomSymbol());if(this.getSecureRandom(2)===0){const o=this.getSecureRandom(s.length);s=s.slice(0,o)+this.getRandomSymbol()+s.slice(o)}return s=this.sanitizeEmailPrefix(s),s.length<Qr.MIN_LENGTH?s+=this.generateRandomString(Qr.MIN_LENGTH-s.length):s.length>Qr.MAX_LENGTH&&(s=s.substring(0,Qr.MAX_LENGTH)),s}sanitizeEmailPrefix(a){let r=a.replace(/[^a-zA-Z0-9._-]/g,"");return r=r.replace(/[-_.]{2,}/g,s=>s[0]),r=r.replace(/^[-._]+/,""),r=r.replace(/[-._]*$/,""),r}getRandomSymbol(){return this.getSecureRandom(3)===0?this.symbols[this.getSecureRandom(this.symbols.length)]:""}generateRandomString(a){const r="abcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:a},()=>r.charAt(this.getSecureRandom(r.length))).join("")}getSecureRandom(a){const r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]%a}};_A.MIN_LENGTH=6;_A.MAX_LENGTH=20;var Py=_A,zy=class{constructor(){this.firstNamesMale=[],this.firstNamesFemale=[],this.lastNames=[],this.random=Math.random,this.firstNamesMale=this.getFirstNamesMaleJson(),this.firstNamesFemale=this.getFirstNamesFemaleJson(),this.lastNames=this.getLastNamesJson()}generateRandomDateOfBirth(){const n=new Date,a=21,r=65,s=new Date(n.getFullYear()-r,n.getMonth(),n.getDate()),o=new Date(n.getFullYear()-a,n.getMonth(),n.getDate()),u=s.getTime()+this.random()*(o.getTime()-s.getTime());return new Date(u)}generateRandomIdentity(n){const a={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let r;if(n==="random"||n===void 0?r=this.random()<.5?"Male":"Female":n==="male"?r="Male":n==="female"?r="Female":r="Male",a.gender=r,r==="Male")a.firstName=this.firstNamesMale[Math.floor(this.random()*this.firstNamesMale.length)];else if(r==="Female")a.firstName=this.firstNamesFemale[Math.floor(this.random()*this.firstNamesFemale.length)];else{const o=this.random()<.5;a.firstName=o?this.firstNamesMale[Math.floor(this.random()*this.firstNamesMale.length)]:this.firstNamesFemale[Math.floor(this.random()*this.firstNamesFemale.length)]}a.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)],a.birthDate=this.generateRandomDateOfBirth();const s=new Py;return a.emailPrefix=s.generateEmailPrefix(a),a.nickName=s.generateUsername(a),a}},nI=["Aaron","Adam","Adrian","Aidan","Aiden","Alan","Albert","Alex","Alexander","Alfred","Amir","Andrew","Anthony","Antonio","Archer","Arthur","Asher","Austin","Axel","Barry","Beau","Beckett","Benjamin","Bennett","Bernard","Blake","Braden","Bradley","Brady","Brandon","Braxton","Brayden","Brendan","Brett","Brian","Bruce","Bryan","Bryce","Bryson","Caden","Caleb","Calvin","Camden","Cameron","Carlos","Carson","Carter","Casey","Cecil","Charles","Chase","Chester","Christian","Christopher","Clarence","Claude","Clifford","Clyde","Cody","Cole","Colin","Collin","Colton","Connor","Cooper","Corey","Craig","Curtis","Dakota","Dale","Dalton","Damian","Dan","Daniel","Darrell","Daryl","David","Dawson","Dean","Declan","Dennis","Derek","Devin","Dominic","Dominick","Don","Douglas","Dustin","Dylan","Earl","Easton","Edgar","Edmund","Edward","Edwin","Eli","Elias","Elijah","Elliot","Elliott","Emilio","Emmett","Eric","Ethan","Eugene","Evan","Everett","Felix","Ferdinand","Floyd","Forrest","Francis","Franklin","Frederick","Gabriel","Gael","Garrett","Gary","Gavin","George","Gerald","Gilbert","Glen","Gordon","Graham","Grant","Grayson","Gregory","Greyson","Harold","Harrison","Harvey","Hayden","Henry","Herman","Howard","Hudson","Hugh","Hugo","Hunter","Ian","Irving","Isaac","Isaiah","Ivan","Jace","Jack","Jackson","Jacob","Jaden","James","Jared","Jason","Jasper","Jayden","Jeffrey","Jeremiah","Jeremy","Jerome","Jesse","Jesus","Joel","John","Jonathan","Jordan","Jorge","Jose","Joseph","Joshua","Josiah","Juan","Justin","Kai","Kayden","Keith","Kenneth","Kevin","Kingston","Knox","Kyle","Landon","Lawrence","Leo","Leon","Leonard","Leonardo","Leslie","Levi","Liam","Lincoln","Lloyd","Logan","Luca","Lucas","Luis","Luke","Maddox","Malachi","Malcolm","Marcus","Mark","Martin","Marvin","Mason","Mateo","Matthew","Maurice","Max","Maxwell","Micah","Michael","Miguel","Miles","Milton","Mitchell","Morris","Nathan","Nathaniel","Neil","Nelson","Nicholas","Noah","Nolan","Norman","Oliver","Oscar","Owen","Parker","Patrick","Paul","Perry","Peter","Philip","Phillip","Preston","Ralph","Randy","Ray","Raymond","Rhett","Richard","Riley","Robert","Roderick","Rodney","Roger","Roland","Roman","Ronald","Ross","Roy","Russell","Ryan","Ryder","Ryker","Samuel","Sawyer","Scott","Sean","Sebastian","Seth","Shane","Shawn","Silas","Simon","Spencer","Stanley","Stephen","Steven","Stuart","Tanner","Terrence","Theodore","Thomas","Timothy","Travis","Trevor","Tristan","Tyler","Vernon","Victor","Vincent","Wade","Wallace","Walter","Warren","Wayne","Wendell","Wesley","Weston","William","Winston","Wyatt","Xavier","Zachariah","Zachary","Zane"],rI=["Aaliyah","Abigail","Ada","Adalyn","Adalynn","Addison","Adeline","Adriana","Alexa","Alexandra","Alice","Alina","Allison","Alyssa","Amara","Amaya","Amelia","Anastasia","Andrea","Anna","Annabelle","Aria","Ariana","Arianna","Arielle","Arya","Ashley","Aspen","Athena","Aubree","Aubrey","Audrey","Aurora","Autumn","Ava","Avery","Ayla","Bailey","Beatrice","Bella","Bianca","Blair","Brianna","Brielle","Brooklyn","Brynn","Calliope","Camila","Camille","Carmen","Caroline","Cassidy","Catalina","Cecilia","Celeste","Charlie","Charlotte","Chloe","Claire","Clara","Cora","Coraline","Dahlia","Daisy","Dakota","Daphne","Dawn","Delilah","Diana","Eden","Eleanor","Elena","Eliana","Elise","Eliza","Elizabeth","Ella","Ellie","Eloise","Ember","Emerson","Emersyn","Emery","Emilia","Emily","Emma","Esme","Esther","Eva","Evangeline","Evelyn","Everly","Faith","Fiona","Flora","Florence","Francesca","Freya","Gabriella","Gemma","Genesis","Georgia","Gianna","Giselle","Grace","Gwendolyn","Hadley","Hailey","Hannah","Harlow","Harmony","Harper","Haven","Hazel","Heidi","Helena","Holly","Hope","Imogen","India","Indie","Iris","Isabel","Isabella","Isabelle","Isla","Ivy","Jade","Jasmine","Jessie","Jocelyn","Josephine","Josie","Julia","Juliana","Juliet","June","Juniper","Kaia","Katherine","Kayla","Kaylee","Keira","Kennedy","Khloe","Kinsley","Kylie","Lara","Laura","Laurel","Layla","Leah","Leilani","Lena","Liliana","Lillian","Lily","Lola","Lorelei","Lucia","Lucy","Luna","Lydia","Lyla","Mabel","Mackenzie","Madeline","Madelyn","Madison","Maeve","Magnolia","Maisie","Malia","Margaret","Margot","Maria","Marina","Marlowe","Mary","Matilda","Maya","Melanie","Melody","Mia","Mira","Miranda","Morgan","Nadia","Naomi","Natalia","Natalie","Nell","Nevaeh","Nina","Noelle","Nora","Norah","Nova","Octavia","Odette","Olive","Olivia","Opal","Ophelia","Paisley","Pearl","Penelope","Peyton","Phoebe","Phoenix","Piper","Poppy","Primrose","Quinn","Raelynn","Ramona","Raven","Reagan","Reese","Riley","River","Robin","Rosalie","Rose","Rosemary","Rowan","Ruby","Ruth","Rylee","Ryleigh","Sabrina","Sadie","Sage","Salem","Samantha","Sarah","Sasha","Savannah","Scarlett","Selena","Serena","Serenity","Sienna","Sierra","Simone","Skye","Skylar","Sloane","Sofia","Sophia","Sophie","Stella","Summer","Sylvia","Sylvie","Talia","Taylor","Tessa","Thea","Thora","Valentina","Valeria","Vera","Victoria","Violet","Vivian","Vivienne","Willa","Willow","Winnie","Winter","Wren","Ximena","Yara","Zara","Zoe","Zoey"],iI=["Abbott","Adams","Aguilar","Alexander","Allen","Alvarez","Anderson","Atkins","Bailey","Baker","Baldwin","Ballard","Barber","Barker","Barnes","Barrett","Bauer","Baxter","Beard","Bell","Bennett","Benson","Black","Blackwood","Blake","Blanchard","Booth","Bowman","Bradley","Briggs","Brooks","Brown","Bryant","Buckley","Burke","Burns","Butler","Byrd","Cain","Campbell","Cannon","Carlson","Carter","Castillo","Castro","Chandler","Chapman","Chavez","Chen","Clark","Clarke","Cobb","Cole","Coleman","Collier","Collins","Conrad","Cook","Cooke","Cooper","Cox","Craig","Crawford","Cross","Cruz","Cunningham","Dalton","Daniel","Davenport","Davis","Dawson","Dempsey","Dennis","Diaz","Dickerson","Dillon","Dixon","Doyle","Duran","Dyer","Edwards","Ellis","Erickson","Evans","Ewing","Farley","Farr","Farrell","Fernandez","Ferris","Fisher","Fitzgerald","Fleming","Fletcher","Flores","Foley","Ford","Foster","Fowler","Frazier","Freeman","Frost","Fuller","Gallagher","Garcia","Gardner","Garner","Garrett","Gates","Gibbs","Gibson","Gill","Glover","Goldberg","Gomez","Gonzales","Gonzalez","Goodman","Goodwin","Gordon","Graham","Graves","Gray","Green","Griffin","Griffith","Gross","Gutierrez","Guzman","Hale","Hall","Hamilton","Hancock","Harmon","Harris","Harrison","Hawkins","Hayes","Hayward","Henderson","Hendricks","Henry","Hensley","Hernandez","Herrera","Hicks","Hill","Hodges","Holland","Holmes","Holt","Hoover","Howard","Hudson","Huffman","Hughes","Humphrey","Hunter","Hutchinson","Isaac","Jackson","Jacobson","James","Jarvis","Jenkins","Jimenez","Johnson","Jones","Jordan","Keller","Kelly","Kennedy","Kent","Kerr","Kim","King","Kirby","Knowles","Koch","Landry","Lang","Lawson","Lee","Levy","Lewis","Livingston","Logan","Long","Lopez","Lowery","Lowry","Lucas","Luna","Malone","Manning","Marsh","Marshall","Martin","Martinez","Mason","May","McBride","McCoy","McDonald","McKinney","Mccarthy","Mcguire","Mckay","Mckenzie","Meadows","Medina","Mendez","Mendoza","Middleton","Miller","Miranda","Mitchell","Moody","Moore","Morales","Moreno","Morgan","Morris","Morse","Murphy","Murray","Myers","Nash","Neal","Nelson","Nguyen","Nichols","Nielsen","Nixon","Norton","Olson","Orr","Ortiz","Owens","Palmer","Parker","Parsons","Patel","Patterson","Payne","Pearce","Pearson","Perez","Perry","Peterson","Phillips","Pickett","Pollard","Porter","Potter","Powell","Pratt","Preston","Price","Ramirez","Ramos","Randall","Ray","Reed","Reyes","Reynolds","Richardson","Riddle","Riley","Rivera","Roach","Robbins","Roberts","Robinson","Rodriguez","Rogers","Romero","Ross","Rowe","Ruiz","Russell","Salinas","Sanchez","Sanders","Santana","Savage","Sawyer","Schmidt","Schultz","Scott","Sellers","Shannon","Sharp","Shaw","Shepherd","Shields","Short","Silva","Simmons","Simpson","Skinner","Sloan","Smith","Snyder","Sparks","Spears","Stanley","Stark","Steele","Stephenson","Stevens","Stewart","Stokes","Sullivan","Sutton","Swanson","Tanner","Tate","Taylor","Thomas","Thompson","Thornton","Torres","Tran","Travis","Tucker","Turner","Tyler","Underwood","Vargas","Vasquez","Vincent","Wagner","Walker","Wallace","Walters","Walton","Ward","Washington","Watkins","Watson","Weaver","Webb","Weeks","Welch","Wells","West","Whitaker","White","Wilcox","Wilkinson","Williams","Willis","Wilson","Winters","Wise","Wolfe","Wood","Woods","Woodward","Wright","Wyatt","Yates","York","Young","Zamora","Zimmerman"],sI=class extends zy{getFirstNamesMaleJson(){return nI}getFirstNamesFemaleJson(){return rI}getLastNamesJson(){return iI}},lI=["Daan","Luuk","Sem","Finn","Milan","Levi","Noah","Lucas","Jesse","Thijs","Jayden","Bram","Lars","Ruben","Thomas","Tim","Sam","Liam","Julian","Mees","Ties","Sven","Max","Gijs","David","Stijn","Jasper","Niels","Jens","Timo","Cas","Joep","Roan","Tom","Tygo","Teun","Siem","Mats","Thijmen","Rens","Niek","Tobias","Dex","Hugo","Robin","Nick","Floris","Pepijn","Boaz","Olivier","Luca","Jurre","Jelle","Guus","Koen","Bart","Olaf","Wessel","Daniël","Job","Sander","Tijmen","Kai","Quinten","Owen","Morris","Fedde","Joris","Jesper","Mick","Ryan","Milo","Stan","Benjamin","Melle","Jip","Dylan","Brent","Mick","Dean","Otis","Abel","Luc","Sepp","Vince","Rayan","Noud","Hidde","Fabian","Jort","Damian","Boris","Sil","Moos","Aiden","Sep","Mika","Mijs","Mika","Felix","Merlijn","Alexander","Aron","Arthur","Axel","Bas","Bastiaan","Berend","Björn","Casper","Cees","Chris","Christian","Christiaan","Colin","Cornelis","Dani","Dennis","Dirk","Dominic","Eduard","Eelco","Erik","Erwin","Ezra","Faas","Filip","Florian","Frank","Frederik","Freek","Gerard","Gerrit","Giel","Gijs","Glenn","Govert","Harm","Harold","Hendrik","Henrik","Huub","Ian","Ivo","Jacob","Jake","Jan","Jarno","Jason","Jeffrey","Jeremy","Jim","Jimmy","Johan","Johannes","Jonas","Jonathan","Jos","Joshua","Justin","Kay","Kevin","Kjeld","Klaas","Lennard","Lennart","Leon","Lex","Liam","Loek","Lorenzo","Louis","Lowie","Maarten","Magnus","Maikel","Marc","Marcel","Marco","Martijn","Mathias","Matthijs","Maurits","Menno","Michiel","Nathan","Nico","Oscar","Pascal","Patrick","Paul","Peter","Philip","Pieter","Pim","Quincy","Remco","Rick","Rik","Robert","Rogier","Rowan","Ruud","Simon","Stefan","Steven","Thom","Victor","Vincent","Willem","Wouter","Yannick"],oI=["Emma","Sophie","Julia","Mila","Tess","Sara","Anna","Noor","Lotte","Liv","Eva","Nora","Zoë","Evi","Yara","Saar","Nina","Fenna","Lieke","Fleur","Isa","Roos","Lynn","Sofie","Sarah","Milou","Olivia","Maud","Lisa","Vera","Luna","Lina","Noa","Feline","Loïs","Lena","Floor","Charlotte","Esmee","Julie","Iris","Lara","Amber","Hailey","Mia","Lize","Isabelle","Cato","Fenne","Sanne","Norah","Sophia","Ella","Nova","Elin","Femke","Lizzy","Linde","Lauren","Rosalie","Lana","Emily","Elise","Esmée","Anne","Isabelle","Demi","Hannah","Liva","Suze","Fay","Isabel","Benthe","Evi","Amy","Jasmijn","Niene","Sterre","Fenna","Fiene","Liz","Ise","Mara","Nienke","Indy","Romy","Lola","Puck","Nora","Merel","Bente","Eline","Lily","Leah","Naomi","Mirthe","Valerie","Noor","Liva","Jade","Juul","Lise","Myrthe","Veerle","Aafke","Alicia","Amira","Aniek","Annabel","Annelies","Anouk","Astrid","Babette","Bianca","Britt","Carlijn","Chantal","Claire","Dagmar","Danique","Daphne","Denise","Dominique","Doris","Eefje","Elena","Eline","Elisa","Elisabeth","Ellen","Esther","Eveline","Fabienne","Felice","Fleur","Frederique","Gwen","Hanna","Heleen","Helena","Ilona","Imke","Inge","Irene","Iris","Janna","Janneke","Jasmine","Jennifer","Jessica","Joelle","Judith","Julia","Karin","Karlijn","Kim","Kirsten","Kyra","Laura","Lena","Lianne","Liesbeth","Linda","Lisanne","Lisette","Louise","Maartje","Manon","Margot","Marieke","Marijke","Marlies","Marloes","Marthe","Melissa","Michelle","Nadine","Natalie","Nicole","Nina","Noortje","Paulien","Petra","Rachel","Renee","Robin","Rosa","Roxanne","Sabine","Sandra","Saskia","Silke","Simone","Suzanne","Sylvie","Tamara","Tanja","Tara","Thea","Thirza","Tina","Tineke","Ursula","Victoria","Wendy","Wilma","Xandra","Yasmin","Yvette","Yvonne","Zara"],uI=["de Jong","Jansen","de Vries","van den Berg","van Dijk","Bakker","Janssen","Visser","Smit","Meijer","de Boer","Mulder","de Groot","Bos","Vos","Peters","Hendriks","van Leeuwen","Dekker","Brouwer","de Wit","Dijkstra","Smits","de Graaf","van der Meer","van der Linden","Kok","Jacobs","de Haan","Vermeulen","van den Heuvel","van der Veen","van den Broek","de Bruijn","de Bruin","van der Heijden","Schouten","van Beek","Willems","van Vliet","van de Ven","Hoekstra","Maas","Verhoeven","Koster","van Dam","van der Wal","Prins","Blom","Huisman","Peeters","Kuipers","van Veen","van Dongen","Veenstra","Kramer","van den Bosch","van der Meulen","Mol","Zwart","van der Laan","Martens","van de Pol","Postma","Tromp","Borst","Boon","van Doorn","Jonker","van der Velden","Willemsen","van Wijk","Groen","Gerritsen","Bosch","van Loon","van der Ploeg","de Ruiter","Molenaar","Boer","Klein","de Koning","van de Kamp","van der Horst","Verbeek","Vink","Goossens","Scholten","Hartman","van Dalen","van Elst","Brink","Boekel","van de Berg","Berends","van der Hoek","Kuiper","Kooijman","de Lange","van der Sluis","van Gelder","Martens","van Asselt","Timmermans","van Vliet","van Rijn","van Schaik","Bosman","Wolters","van Hout","Hermans","van Rooij","de Vos","van Donselaar","Evers","van den Brink","Verkerk","Groeneveld","van Duijn","Schuurman","Hoogendoorn","van Zanten","Koopman","Cornelissen","van Driel","Teunissen","Versteeg","van Deursen","Schipper","van Kempen","Bouwman","van der Valk","Nijhuis","van der Werf","van den Akker","Verhoef","Wessels","van der Poel","Driessen","van Oosten","Lambrechts","van der Vlist","Hoogeveen","van Gils","Rietveld","Barendrecht","van der Spek","Stam","van der Linde","Boersma","van Dijk","Schepers","van der Kolk","Roelofs","van der Velden","van den Burg","Westra","van der Steen","Pronk","van der Veer","Rozendaal","van den Bos","Konings","van der Wiel","Noordam","van der Laan","Schut","van der Vlugt","Witteveen","van der Zwan","Boogaard","van der Waal","Stolk","van der Windt","Rutten","van der Zanden","Spaans","van der Zwaan","Roos","van der Zijl","Schoenmaker","van Diepen","Romeijn","van Doesburg","Schippers","van Eck","Rijken","van Egmond","Schrama","van Eijk","Ruijter","van Engelen","Sanders","van Es","Schenk","van Essen","van Gaal","van Geenen","van Gent","van Gestel","van Gool","van Grinsven","van Gurp","van Haaften","van Haren","van Hattem","van Hees"],cI=class extends zy{getFirstNamesMaleJson(){return lI}getFirstNamesFemaleJson(){return oI}getLastNamesJson(){return uI}},ao=class{static normalizeBirthDateForDisplay(n){return!n||n.startsWith("0001-01-01")?"":n.split(/[T ]/)[0]}static normalizeBirthDateForDb(n){if(!n||n.trim()==="")return"0001-01-01T00:00:00.000Z";const a=n.trim().replace(" ","T"),r=a.match(/^(\d{4})-(\d{2})-(\d{2})[T ]?(\d{2}):?(\d{2}):?(\d{2})?$/);if(r){const[o,u,c,d,p="00",A="00",E="00"]=r;return`${u}-${c}-${d}T${p}:${A}:${E}.000Z`}const s=new Date(a);return isNaN(s.getTime())?"0001-01-01T00:00:00.000Z":s.toISOString()}static isValidBirthDate(n){if(!n||n.trim()===""||n.startsWith("0001-01-01"))return!1;const a=new Date(n);return isNaN(a.getTime())?!1:a.getFullYear()>1&&a.getFullYear()<9999}},dI=n=>{switch(n){case"en":return new sI;case"nl":return new cI}throw new Error(`Unsupported language: ${n}`)},fI=()=>new Py;const rp=()=>{var Re,Ve,Je,He,Et,We,bt,Kt,Ta,Qt,Vt,Ft,va,Te,Oe,nt,lt;const{t:n}=gt(),{id:a}=IA(),r=Ua(),s=ka(),o=a!==void 0&&a.length>0,u=Q.useMemo(()=>Yu().shape({Id:Ka(),ServiceName:Ka().required(n("credentials.validation.serviceNameRequired")),ServiceUrl:Ka().nullable().optional(),Alias:Yu().shape({FirstName:Ka().nullable().optional(),LastName:Ka().nullable().optional(),NickName:Ka().nullable().optional(),BirthDate:Ka().nullable().optional().test("is-valid-date-format",n("credentials.validation.invalidDateFormat"),F=>F?/^\d{4}-\d{2}-\d{2}$/.test(F):!0),Gender:Ka().nullable().optional(),Email:Ka().email(n("credentials.validation.invalidEmail")).nullable().optional()}),Username:Ka().nullable().optional(),Password:Ka().nullable().optional(),Notes:Ka().nullable().optional()}),[n]),{executeVaultMutation:c,isLoading:d,syncStatus:p}=Hy(),[A,E]=Q.useState("random"),{setHeaderButtons:v}=dr(),{setIsInitialLoading:C}=Ma(),[S,k]=Q.useState(!0),[D,R]=Q.useState(!o),[N,U]=Q.useState(!1),[j,P]=Q.useState([]),[V,de]=Q.useState([]),ce=fr(),Z=Q.useRef(null),{handleSubmit:X,setValue:K,watch:ee,formState:{errors:pe}}=G1({resolver:q1(u),defaultValues:{Id:"",Username:"",Password:"",ServiceName:"",ServiceUrl:"https://",Notes:"",Alias:{FirstName:"",LastName:"",NickName:"",BirthDate:"",Gender:void 0,Email:""}}}),ge=Q.useCallback(async()=>{if(S)return;const F=ee(),J={credentialId:a||null,mode:A,formValues:{...F,Logo:null}};await ta("PERSIST_FORM_VALUES",JSON.stringify(J),"background")},[ee,a,A,S]);Q.useEffect(()=>{S||ge()},[A,ge,S]),Q.useEffect(()=>{const F=ee(()=>{ge()});return()=>F.unsubscribe()},[ee,ge]);const Ne=Q.useCallback(async()=>{const F=await ta("GET_PERSISTED_FORM_VALUES",null,"background");try{let J=null;try{F&&(J=JSON.parse(F))}catch(Le){console.error("Error parsing persisted data:",Le)}if(J==null){k(!1);return}const ke=(J==null?void 0:J.credentialId)==a;J&&ke?(E(J.mode),Object.entries(J.formValues).forEach(([Le,we])=>{K(Le,we)})):console.error("Persisted values do not match current page")}catch(J){console.error("Error loading persisted data:",J)}k(!1)},[K,a,E,k]),Ee=Q.useCallback(async()=>{await ta("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);Q.useEffect(()=>()=>{Ee()},[Ee]),Q.useEffect(()=>{if(s!=null&&s.sqliteClient){if(!a){setTimeout(()=>{var F;(F=Z.current)==null||F.focus()},100),C(!1),Ne().then(()=>{if(!ee("Password")){const F=s.sqliteClient.getPasswordSettings(),ie=Wu(F).generateRandomPassword();K("Password",ie)}});return}try{const F=s.sqliteClient.getCredentialById(a);if(F){F.Alias.BirthDate=ao.normalizeBirthDateForDisplay(F.Alias.BirthDate),Object.entries(F).forEach(([ie,ke])=>{K(ie,ke)});const J=s.sqliteClient.getAttachmentsForCredential(a);P(J),de(J.map(ie=>ie.Id)),E("manual"),C(!1),Ne()}else console.error("Credential not found"),r("/credentials")}catch(F){console.error("Error loading credential:",F),C(!1)}}},[s.sqliteClient,a,r,C,K,Ne,ee]);const Y=Q.useCallback(async()=>{a&&c(async()=>{s.sqliteClient.deleteCredentialById(a)},{onSuccess:()=>{Ee(),r("/credentials")}})},[a,c,s.sqliteClient,r,Ee]),ae=Q.useCallback(async()=>{const F=s.sqliteClient.getDefaultIdentityLanguage(),J=dI(F),ie=s.sqliteClient.getPasswordSettings(),ke=Wu(ie);return{identityGenerator:J,passwordGenerator:ke}},[s.sqliteClient]),xe=Q.useCallback(async()=>{const{identityGenerator:F,passwordGenerator:J}=await ae(),ie=s.sqliteClient.getDefaultIdentityGender(),ke=F.generateRandomIdentity(ie),Le=J.generateRandomPassword(),we=await s.getVaultMetadata(),Ge=(we==null?void 0:we.privateEmailDomains)??[],T=(we==null?void 0:we.publicEmailDomains)??[],b=s.sqliteClient.getDefaultEmailDomain(Ge,T),w=b?`${ke.emailPrefix}@${b}`:ke.emailPrefix;K("Alias.Email",w),K("Alias.FirstName",ke.firstName),K("Alias.LastName",ke.lastName),K("Alias.NickName",ke.nickName),K("Alias.Gender",ke.gender),K("Alias.BirthDate",ao.normalizeBirthDateForDisplay(ke.birthDate.toISOString())),o&&ee("Username")||K("Username",ke.nickName),o&&ee("Password")||K("Password",Le)},[o,ee,K,ae,s]),Me=Q.useCallback(()=>{xe()},[xe]),G=Q.useCallback(async()=>{try{const F=fI();let J=Gy.Other;try{J=ee("Alias.Gender")}catch{}const ie={firstName:ee("Alias.FirstName")??"",lastName:ee("Alias.LastName")??"",nickName:ee("Alias.NickName")??"",gender:J,birthDate:new Date(ee("Alias.BirthDate")??""),emailPrefix:ee("Alias.Email")??""},ke=F.generateUsername(ie);K("Username",ke)}catch(F){console.error("Error generating random username:",F)}},[K,ee]),re=Q.useMemo(()=>{var F;return(F=s.sqliteClient)==null?void 0:F.getPasswordSettings()},[s.sqliteClient]),ye=Q.useCallback(async F=>{let J=F.Alias.BirthDate;if(J&&(J=ao.normalizeBirthDateForDb(J)),(F.ServiceUrl==="http://"||F.ServiceUrl==="https://")&&(F.ServiceUrl=""),!o&&A==="random"){await xe(),F.Username=ee("Username"),F.Password=ee("Password"),F.Alias.FirstName=ee("Alias.FirstName"),F.Alias.LastName=ee("Alias.LastName"),F.Alias.NickName=ee("Alias.NickName"),F.Alias.BirthDate=J,F.Alias.Gender=ee("Alias.Gender"),F.Alias.Email=ee("Alias.Email");const ie=ee("ServiceUrl");F.ServiceUrl=ie==="http://"||ie==="https://"?"":ie}if(F.ServiceUrl){k(!0);try{const ie=new Promise((we,Ge)=>setTimeout(()=>Ge(new Error("Favicon extraction timed out")),5e3)),ke=ce.get("Favicon/Extract?url="+F.ServiceUrl),Le=await Promise.race([ke,ie]);if(Le!=null&&Le.image){const we=Uint8Array.from(Zi.Buffer.from(Le.image,"base64"));F.Logo=we}}catch{}}c(async()=>{if(k(!1),o)await s.sqliteClient.updateCredentialById(F,V,j);else{const ie=await s.sqliteClient.createCredential(F,j);F.Id=ie.toString()}},{onSuccess:()=>{Ee(),o?r(-1):r(`/credentials/${F.Id}`,{replace:!0})}})},[o,s.sqliteClient,c,r,A,ee,xe,ce,Ee,V,j]);return Q.useEffect(()=>{const F=h.jsxs("div",{className:"flex items-center gap-2",children:[o&&h.jsx(ln,{onClick:()=>U(!0),title:n("credentials.deleteCredential"),iconType:Xa.DELETE,variant:"danger"}),h.jsx(ln,{onClick:X(ye),title:n("credentials.saveCredential"),iconType:Xa.SAVE})]});return v(F),()=>{}},[v,X,ye,o,n]),Q.useEffect(()=>()=>v(null),[v]),o&&!ee("ServiceName")?h.jsx("div",{children:n("common.loading")}):h.jsxs("form",{onSubmit:X(ye),children:[h.jsx("button",{type:"submit",style:{display:"none"}}),(S||d)&&h.jsxs("div",{className:"fixed inset-0 flex flex-col justify-center items-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-50",children:[h.jsx($s,{}),h.jsx("div",{className:"text-sm text-gray-500 mt-2",children:p})]}),h.jsx($u,{isOpen:N,onClose:()=>U(!1),onConfirm:()=>{U(!1),Y()},title:n("credentials.deleteCredentialTitle"),message:n("credentials.deleteCredentialConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),!o&&h.jsxs("div",{className:"flex space-x-2 mb-4",children:[h.jsxs("button",{type:"button",onClick:()=>E("random"),className:`flex-1 py-2 px-4 rounded flex items-center justify-center gap-2 ${A==="random"?"bg-primary-500 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:[h.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),h.jsx("circle",{cx:"8",cy:"8",r:"1"}),h.jsx("circle",{cx:"16",cy:"8",r:"1"}),h.jsx("circle",{cx:"12",cy:"12",r:"1"}),h.jsx("circle",{cx:"8",cy:"16",r:"1"}),h.jsx("circle",{cx:"16",cy:"16",r:"1"})]}),n("credentials.randomAlias")]}),h.jsxs("button",{type:"button",onClick:()=>E("manual"),className:`flex-1 py-2 px-4 rounded flex items-center justify-center gap-2 ${A==="manual"?"bg-primary-500 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:[h.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("circle",{cx:"12",cy:"7",r:"4"}),h.jsx("path",{d:"M5.5 20a6.5 6.5 0 0 1 13 0"})]}),n("credentials.manual")]})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.service")}),h.jsxs("div",{className:"space-y-4",children:[h.jsx(Rr,{id:"serviceName",label:n("credentials.serviceName"),ref:Z,value:ee("ServiceName")??"",onChange:F=>K("ServiceName",F),required:!0,error:(Re=pe.ServiceName)==null?void 0:Re.message}),h.jsx(Rr,{id:"serviceUrl",label:n("credentials.serviceUrl"),value:ee("ServiceUrl")??"",onChange:F=>K("ServiceUrl",F),error:(Ve=pe.ServiceUrl)==null?void 0:Ve.message})]})]}),(A==="manual"||o)&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.loginCredentials")}),h.jsxs("div",{className:"space-y-4",children:[h.jsx(K1,{id:"email",label:n("common.email"),value:ee("Alias.Email")??"",onChange:F=>K("Alias.Email",F),error:(He=(Je=pe.Alias)==null?void 0:Je.Email)==null?void 0:He.message}),h.jsx(eI,{id:"username",label:n("common.username"),value:ee("Username")??"",onChange:F=>K("Username",F),error:(Et=pe.Username)==null?void 0:Et.message,onRegenerate:G}),re&&h.jsx(Z1,{id:"password",label:n("common.password"),value:ee("Password")??"",onChange:F=>K("Password",F),error:(We=pe.Password)==null?void 0:We.message,showPassword:D,onShowPasswordChange:R,initialSettings:re})]})]}),h.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.alias")}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("button",{type:"button",onClick:Me,className:"w-full bg-primary-500 text-white py-2 px-4 rounded hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 flex items-center justify-center gap-2",children:[h.jsxs("svg",{className:"w-5 h-5 inline-block",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),h.jsx("circle",{cx:"8",cy:"8",r:"1"}),h.jsx("circle",{cx:"16",cy:"8",r:"1"}),h.jsx("circle",{cx:"12",cy:"12",r:"1"}),h.jsx("circle",{cx:"8",cy:"16",r:"1"}),h.jsx("circle",{cx:"16",cy:"16",r:"1"})]}),h.jsx("span",{children:n("credentials.generateRandomAlias")})]}),h.jsx(Rr,{id:"firstName",label:n("credentials.firstName"),value:ee("Alias.FirstName")??"",onChange:F=>K("Alias.FirstName",F),error:(Kt=(bt=pe.Alias)==null?void 0:bt.FirstName)==null?void 0:Kt.message}),h.jsx(Rr,{id:"lastName",label:n("credentials.lastName"),value:ee("Alias.LastName")??"",onChange:F=>K("Alias.LastName",F),error:(Qt=(Ta=pe.Alias)==null?void 0:Ta.LastName)==null?void 0:Qt.message}),h.jsx(Rr,{id:"nickName",label:n("credentials.nickName"),value:ee("Alias.NickName")??"",onChange:F=>K("Alias.NickName",F),error:(Ft=(Vt=pe.Alias)==null?void 0:Vt.NickName)==null?void 0:Ft.message}),h.jsx(Rr,{id:"gender",label:n("credentials.gender"),value:ee("Alias.Gender")??"",onChange:F=>K("Alias.Gender",F),error:(Te=(va=pe.Alias)==null?void 0:va.Gender)==null?void 0:Te.message}),h.jsx(Rr,{id:"birthDate",label:n("credentials.birthDate"),placeholder:n("credentials.birthDatePlaceholder"),value:ee("Alias.BirthDate")??"",onChange:F=>K("Alias.BirthDate",F),error:(nt=(Oe=pe.Alias)==null?void 0:Oe.BirthDate)==null?void 0:nt.message})]})]}),h.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("credentials.metadata")}),h.jsx("div",{className:"space-y-4",children:h.jsx(Rr,{id:"notes",label:n("credentials.notes"),value:ee("Notes")??"",onChange:F=>K("Notes",F),multiline:!0,rows:4,error:(lt=pe.Notes)==null?void 0:lt.message})})]}),h.jsx(Y1,{attachments:j,onAttachmentsChange:P,originalAttachmentIds:V})]})]})]})};class AI{constructor(){Sa(this,"currentCopiedId","");Sa(this,"onCopyCallbacks",[])}setCopied(a){this.currentCopiedId=a,this.notifySubscribers()}getCopiedId(){return this.currentCopiedId}subscribe(a){return this.onCopyCallbacks.push(a),()=>{this.onCopyCallbacks=this.onCopyCallbacks.filter(r=>r!==a)}}notifySubscribers(){this.onCopyCallbacks.forEach(a=>a(this.currentCopiedId))}}const Bu=new AI,Pf=({name:n})=>{switch(n){case"visibility":return h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),h.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),h.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]});case"check":return h.jsx(h.Fragment,{children:h.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},wi=({id:n,label:a,value:r,type:s="text"})=>{const{t:o}=gt(),[u,c]=Q.useState(!1),[d,p]=Q.useState(!1);Q.useEffect(()=>{const E=Bu.subscribe(v=>{p(v===n)});return()=>{E()}},[n]);const A=async()=>{try{await navigator.clipboard.writeText(r),Bu.setCopied(n),await ta("CLIPBOARD_COPIED",{value:r},"background"),setTimeout(()=>{Bu.getCopiedId()===n&&Bu.setCopied("")},2e3)}catch(E){console.error("Failed to copy text:",E)}};return h.jsxs("div",{children:[h.jsx("label",{htmlFor:n,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:a}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:s==="password"&&!u?"password":"text",id:n,readOnly:!0,value:r,onClick:A,className:`w-full px-3 py-2.5 bg-white border ${d?"border-green-500 border-2":"border-gray-300"} text-gray-900 sm:text-sm rounded-lg shadow-sm focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400`}),h.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[d?h.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:o("common.copied"),children:h.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx(Pf,{name:"check"})})}):h.jsx("button",{type:"button",onClick:A,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:o("common.copyToClipboard"),children:h.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx(Pf,{name:"copy"})})}),s==="password"&&h.jsx("button",{type:"button",onClick:()=>c(!u),className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:o(u?"common.hidePassword":"common.showPassword"),children:h.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx(Pf,{name:u?"visibility-off":"visibility"})})})]})]})]})},hI=({credential:n})=>{var c,d,p,A,E,v,C,S,k,D,R,N,U;const{t:a}=gt(),r=!!((d=(c=n.Alias)==null?void 0:c.FirstName)!=null&&d.trim()),s=!!((A=(p=n.Alias)==null?void 0:p.LastName)!=null&&A.trim()),o=!!((v=(E=n.Alias)==null?void 0:E.NickName)!=null&&v.trim()),u=ao.isValidBirthDate((C=n.Alias)==null?void 0:C.BirthDate);return!r&&!s&&!o&&!u?null:h.jsxs("div",{className:"space-y-2",children:[h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:a("common.alias")}),(r||s)&&h.jsx(wi,{id:"fullName",label:a("common.fullName"),value:[(S=n.Alias)==null?void 0:S.FirstName,(k=n.Alias)==null?void 0:k.LastName].filter(Boolean).join(" ")}),r&&h.jsx(wi,{id:"firstName",label:a("common.firstName"),value:((D=n.Alias)==null?void 0:D.FirstName)??""}),s&&h.jsx(wi,{id:"lastName",label:a("common.lastName"),value:((R=n.Alias)==null?void 0:R.LastName)??""}),u&&h.jsx(wi,{id:"birthDate",label:a("common.birthDate"),value:ao.normalizeBirthDateForDisplay((N=n.Alias)==null?void 0:N.BirthDate)}),o&&h.jsx(wi,{id:"nickName",label:a("common.nickname"),value:((U=n.Alias)==null?void 0:U.NickName)??""})]})},gI=({credentialId:n})=>{const{t:a}=gt(),[r,s]=Q.useState([]),[o,u]=Q.useState(!0),c=ka(),d=p=>{try{const A=p.Blob instanceof Uint8Array?p.Blob:new Uint8Array(p.Blob),E=new Blob([A]),v=URL.createObjectURL(E),C=document.createElement("a");C.href=v,C.download=p.Filename,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(v)}catch(A){console.error("Error downloading attachment:",A)}};return Q.useEffect(()=>{(async()=>{if(c!=null&&c.sqliteClient)try{const A=c.sqliteClient.getAttachmentsForCredential(n);s(A)}catch(A){console.error("Error loading attachments:",A)}finally{u(!1)}})()},[n,c==null?void 0:c.sqliteClient]),o?h.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:a("common.attachments")}),a("common.loadingAttachments")]}):r.length===0?null:h.jsx("div",{className:"mb-4",children:h.jsxs("div",{className:"space-y-2",children:[h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:a("common.attachments")}),h.jsx("div",{className:"grid grid-cols-1 gap-2",children:r.map(p=>h.jsx("button",{className:"w-full text-left p-2 ps-3 pe-3 rounded bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>d(p),"aria-label":`Download ${p.Filename}`,children:h.jsxs("div",{className:"flex justify-between items-center gap-2",children:[h.jsx("div",{className:"flex items-center flex-1",children:h.jsxs("div",{className:"flex flex-col",children:[h.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p.Filename}),h.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(p.CreatedAt).toLocaleDateString()})]})}),h.jsx("div",{className:"flex items-center",children:h.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5m0 0l5-5m-5 5V4"})})})]})},p.Id))})]})})},mI=({email:n})=>{const{t:a}=gt(),[r,s]=Q.useState([]),[o,u]=Q.useState([]),[c,d]=Q.useState(!0),[p,A]=Q.useState(0),[E,v]=Q.useState(!1),[C,S]=Q.useState(null),[k,D]=Q.useState(!1),[R,N]=Q.useState(2),U=fr(),j=ka(),P=3,V=R<r.length,de=(K,ee)=>{const pe=K.slice(0,ee);u(pe)},ce=()=>{const K=Math.min(R+P,r.length);N(K),de(r,K)},Z=async K=>(await Ke.getItem("session:publicEmailDomains")??[]).some(pe=>K.toLowerCase().endsWith(pe)),X=async K=>(await Ke.getItem("session:privateEmailDomains")??[]).some(pe=>K.toLowerCase().endsWith(pe));return Q.useEffect(()=>{const K=async()=>{var pe;try{S(null);const ge=await Z(n),Ne=await X(n),Ee=ge||Ne;if(v(ge),D(Ee),!Ee)return;if(ge){const Y=n.split("@")[0],ae=await fetch(`https://api.spamok.com/v2/EmailBox/${Y}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":da.VERSION}});if(!ae.ok){S(a("emails.errors.emailLoadError"));return}const xe=await ae.json(),Me=((pe=xe==null?void 0:xe.mails)==null?void 0:pe.toSorted((G,re)=>new Date(re.dateSystem).getTime()-new Date(G.dateSystem).getTime()))??[];c&&Me.length>0&&A(Me[0].id),s(G=>JSON.stringify(G.map(ye=>ye.id))!==JSON.stringify(Me.map(ye=>ye.id))?(de(Me,R),Me):G)}else if(Ne)try{const Y=await U.authFetch(`EmailBox/${n}`,{method:"GET"},!0,!1);try{const xe=Y.mails.toSorted((Me,G)=>new Date(G.dateSystem).getTime()-new Date(Me.dateSystem).getTime());if(xe){const Me=await qt.decryptEmailList(xe,j.sqliteClient.getAllEncryptionKeys());c&&Me.length>0&&A(Me[0].id),s(G=>JSON.stringify(G.map(ye=>ye.id))!==JSON.stringify(Me.map(ye=>ye.id))?(de(Me,R),Me):G)}}catch{const ae=Y;S(a("emails.apiErrors."+(ae==null?void 0:ae.code)));return}}catch{S(a("emails.errors.emailLoadError"));return}}catch(ge){console.error("Error loading emails:",ge),S(a("emails.errors.emailUnexpectedError"))}d(!1)};K();const ee=setInterval(K,2e3);return()=>clearInterval(ee)},[n,c,U,j,a,R]),k?C?h.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[h.jsx("div",{className:"flex items-center gap-2 mb-2",children:h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a("common.recentEmails")})}),h.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:h.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C})})]}):c?h.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a("common.recentEmails")}),h.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),a("common.loadingEmails")]}):r.length===0?h.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a("common.recentEmails")}),h.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),a("emails.noEmails")]}):h.jsxs("div",{className:"space-y-2 mb-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a("common.recentEmails")}),h.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),o.map(K=>E?h.jsxs("a",{href:`https://spamok.com/${n.split("@")[0]}/${K.id}`,target:"_blank",rel:"noopener noreferrer",className:`flex justify-between items-center p-2 ps-3 pe-3 rounded cursor-pointer bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 ${K.id>p?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[h.jsx("div",{className:"truncate flex-1",children:h.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[K.subject.substring(0,30),K.subject.length>30?"...":""]})}),h.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(K.dateSystem).toLocaleDateString()})]},K.id):h.jsxs(ic,{to:`/emails/${K.id}`,className:`flex justify-between items-center p-2 ps-3 pe-3 rounded cursor-pointer bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 ${K.id>p?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[h.jsx("span",{className:"truncate flex-1",children:h.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[K.subject.substring(0,30),K.subject.length>30?"...":""]})}),h.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(K.dateSystem).toLocaleDateString()})]},K.id)),V&&h.jsxs("button",{onClick:ce,className:"w-full mt-2 py-1 px-3 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md transition-colors duration-200 text-sm text-gray-600 dark:text-gray-300 hover:text-gray-800 dark:hover:text-gray-100 flex items-center justify-center gap-1",children:[h.jsx("span",{children:a("common.loadMore")}),h.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},pI=({email:n})=>{const a=ka();return(async s=>{var p;const o=(p=s.split("@")[1])==null?void 0:p.toLowerCase();if(!o)return!1;const u=await a.getVaultMetadata(),c=(u==null?void 0:u.publicEmailDomains)??[],d=(u==null?void 0:u.privateEmailDomains)??[];return[...c,...d].some(A=>o===A||o.endsWith(`.${A}`))})(n)?h.jsx(h.Fragment,{children:h.jsx(mI,{email:n})}):null},yI=({credential:n})=>h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx("img",{src:Hu.imgSrcFromBytes(n.Logo),alt:n.ServiceName,className:"w-12 h-12 rounded-lg mr-4"}),h.jsxs("div",{children:[h.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:n.ServiceName}),n.ServiceUrl&&(/^https?:\/\//i.test(n.ServiceUrl)?h.jsx("a",{href:n.ServiceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 break-all",children:n.ServiceUrl}):h.jsx("span",{className:"break-all",children:n.ServiceUrl}))]})]})}),EI=({credential:n})=>{var u,c,d,p;const{t:a}=gt(),r=(c=(u=n.Alias)==null?void 0:u.Email)==null?void 0:c.trim(),s=(d=n.Username)==null?void 0:d.trim(),o=(p=n.Password)==null?void 0:p.trim();return!r&&!s&&!o?null:h.jsxs("div",{className:"space-y-2",children:[h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:a("common.loginCredentials")}),r&&h.jsx(wi,{id:"email",label:a("common.email"),value:r}),s&&h.jsx(wi,{id:"username",label:a("common.username"),value:s}),o&&h.jsx(wi,{id:"password",label:a("common.password"),value:o,type:"password"})]})},bI=n=>{const a=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/g;return n.replace(a,r=>`<a href="${r.startsWith("http")?r:`http://${r}`}" target="_blank" rel="noopener noreferrer" class="text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300">${r}</a>`)},vI=({notes:n})=>{const{t:a}=gt();if(!n)return null;const r=bI(n);return h.jsxs("div",{children:[h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:a("common.notes")}),h.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:h.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:r}})})]})};//! otpauth 9.4.0 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! noble-hashes 1.7.1 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
const wI=n=>{const a=new ArrayBuffer(8),r=new Uint8Array(a);let s=n;for(let o=7;o>=0&&s!==0;o--)r[o]=s&255,s-=r[o],s/=256;return r};function Zu(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function xI(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function oc(n,...a){if(!xI(n))throw new Error("Uint8Array expected");if(a.length>0&&!a.includes(n.length))throw new Error("Uint8Array expected of length "+a+", got length="+n.length)}function CI(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Zu(n.outputLen),Zu(n.blockLen)}function Ys(n,a=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(a&&n.finished)throw new Error("Hash#digest() has already been called")}function qy(n,a){oc(n);const r=a.outputLen;if(n.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function II(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function zf(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function ir(n,a){return n<<32-a|n>>>a}function qf(n,a){return n<<a|n>>>32-a>>>0}const ip=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function BI(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}function sp(n){for(let a=0;a<n.length;a++)n[a]=BI(n[a])}function SI(n){if(typeof n!="string")throw new Error("utf8ToBytes expected string, got "+typeof n);return new Uint8Array(new TextEncoder().encode(n))}function uc(n){return typeof n=="string"&&(n=SI(n)),oc(n),n}class jA{clone(){return this._cloneInto()}}function Ws(n){const a=s=>n().update(uc(s)).digest(),r=n();return a.outputLen=r.outputLen,a.blockLen=r.blockLen,a.create=()=>n(),a}class Yy extends jA{update(a){return Ys(this),this.iHash.update(a),this}digestInto(a){Ys(this),oc(a,this.outputLen),this.finished=!0,this.iHash.digestInto(a),this.oHash.update(a),this.oHash.digestInto(a),this.destroy()}digest(){const a=new Uint8Array(this.oHash.outputLen);return this.digestInto(a),a}_cloneInto(a){a||(a=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:s,finished:o,destroyed:u,blockLen:c,outputLen:d}=this;return a=a,a.finished=o,a.destroyed=u,a.blockLen=c,a.outputLen=d,a.oHash=r._cloneInto(a.oHash),a.iHash=s._cloneInto(a.iHash),a}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(a,r){super(),this.finished=!1,this.destroyed=!1,CI(a);const s=uc(r);if(this.iHash=a.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,u=new Uint8Array(o);u.set(s.length>o?a.create().update(s).digest():s);for(let c=0;c<u.length;c++)u[c]^=54;this.iHash.update(u),this.oHash=a.create();for(let c=0;c<u.length;c++)u[c]^=106;this.oHash.update(u),u.fill(0)}}const mA=(n,a,r)=>new Yy(n,a).update(r).digest();mA.create=(n,a)=>new Yy(n,a);function NI(n,a,r,s){if(typeof n.setBigUint64=="function")return n.setBigUint64(a,r,s);const o=BigInt(32),u=BigInt(4294967295),c=Number(r>>o&u),d=Number(r&u),p=s?4:0,A=s?0:4;n.setUint32(a+p,c,s),n.setUint32(a+A,d,s)}function Ky(n,a,r){return n&a^~n&r}function Jy(n,a,r){return n&a^n&r^a&r}class OA extends jA{update(a){Ys(this);const{view:r,buffer:s,blockLen:o}=this;a=uc(a);const u=a.length;for(let c=0;c<u;){const d=Math.min(o-this.pos,u-c);if(d===o){const p=zf(a);for(;o<=u-c;c+=o)this.process(p,c);continue}s.set(a.subarray(c,c+d),this.pos),this.pos+=d,c+=d,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=a.length,this.roundClean(),this}digestInto(a){Ys(this),qy(a,this),this.finished=!0;const{buffer:r,view:s,blockLen:o,isLE:u}=this;let{pos:c}=this;r[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(s,0),c=0);for(let v=c;v<o;v++)r[v]=0;NI(s,o-8,BigInt(this.length*8),u),this.process(s,0);const d=zf(a),p=this.outputLen;if(p%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const A=p/4,E=this.get();if(A>E.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;v<A;v++)d.setUint32(4*v,E[v],u)}digest(){const{buffer:a,outputLen:r}=this;this.digestInto(a);const s=a.slice(0,r);return this.destroy(),s}_cloneInto(a){a||(a=new this.constructor),a.set(...this.get());const{blockLen:r,buffer:s,length:o,finished:u,destroyed:c,pos:d}=this;return a.length=o,a.pos=d,a.finished=u,a.destroyed=c,o%r&&a.buffer.set(s),a}constructor(a,r,s,o){super(),this.blockLen=a,this.outputLen=r,this.padOffset=s,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(a),this.view=zf(this.buffer)}}const Jl=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),gi=new Uint32Array(80);class kI extends OA{get(){const{A:a,B:r,C:s,D:o,E:u}=this;return[a,r,s,o,u]}set(a,r,s,o,u){this.A=a|0,this.B=r|0,this.C=s|0,this.D=o|0,this.E=u|0}process(a,r){for(let p=0;p<16;p++,r+=4)gi[p]=a.getUint32(r,!1);for(let p=16;p<80;p++)gi[p]=qf(gi[p-3]^gi[p-8]^gi[p-14]^gi[p-16],1);let{A:s,B:o,C:u,D:c,E:d}=this;for(let p=0;p<80;p++){let A,E;p<20?(A=Ky(o,u,c),E=1518500249):p<40?(A=o^u^c,E=1859775393):p<60?(A=Jy(o,u,c),E=2400959708):(A=o^u^c,E=3395469782);const v=qf(s,5)+A+d+E+gi[p]|0;d=c,c=u,u=qf(o,30),o=s,s=v}s=s+this.A|0,o=o+this.B|0,u=u+this.C|0,c=c+this.D|0,d=d+this.E|0,this.set(s,o,u,c,d)}roundClean(){gi.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=Jl[0]|0,this.B=Jl[1]|0,this.C=Jl[2]|0,this.D=Jl[3]|0,this.E=Jl[4]|0}}const TI=Ws(()=>new kI),DI=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),mi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pi=new Uint32Array(64);class Xy extends OA{get(){const{A:a,B:r,C:s,D:o,E:u,F:c,G:d,H:p}=this;return[a,r,s,o,u,c,d,p]}set(a,r,s,o,u,c,d,p){this.A=a|0,this.B=r|0,this.C=s|0,this.D=o|0,this.E=u|0,this.F=c|0,this.G=d|0,this.H=p|0}process(a,r){for(let v=0;v<16;v++,r+=4)pi[v]=a.getUint32(r,!1);for(let v=16;v<64;v++){const C=pi[v-15],S=pi[v-2],k=ir(C,7)^ir(C,18)^C>>>3,D=ir(S,17)^ir(S,19)^S>>>10;pi[v]=D+pi[v-7]+k+pi[v-16]|0}let{A:s,B:o,C:u,D:c,E:d,F:p,G:A,H:E}=this;for(let v=0;v<64;v++){const C=ir(d,6)^ir(d,11)^ir(d,25),S=E+C+Ky(d,p,A)+DI[v]+pi[v]|0,D=(ir(s,2)^ir(s,13)^ir(s,22))+Jy(s,o,u)|0;E=A,A=p,p=d,d=c+S|0,c=u,u=o,o=s,s=S+D|0}s=s+this.A|0,o=o+this.B|0,u=u+this.C|0,c=c+this.D|0,d=d+this.E|0,p=p+this.F|0,A=A+this.G|0,E=E+this.H|0,this.set(s,o,u,c,d,p,A,E)}roundClean(){pi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,32,8,!1),this.A=mi[0]|0,this.B=mi[1]|0,this.C=mi[2]|0,this.D=mi[3]|0,this.E=mi[4]|0,this.F=mi[5]|0,this.G=mi[6]|0,this.H=mi[7]|0}}class LI extends Xy{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const RI=Ws(()=>new Xy),QI=Ws(()=>new LI),Su=BigInt(2**32-1),pA=BigInt(32);function $y(n,a=!1){return a?{h:Number(n&Su),l:Number(n>>pA&Su)}:{h:Number(n>>pA&Su)|0,l:Number(n&Su)|0}}function Wy(n,a=!1){let r=new Uint32Array(n.length),s=new Uint32Array(n.length);for(let o=0;o<n.length;o++){const{h:u,l:c}=$y(n[o],a);[r[o],s[o]]=[u,c]}return[r,s]}const UI=(n,a)=>BigInt(n>>>0)<<pA|BigInt(a>>>0),MI=(n,a,r)=>n>>>r,_I=(n,a,r)=>n<<32-r|a>>>r,jI=(n,a,r)=>n>>>r|a<<32-r,OI=(n,a,r)=>n<<32-r|a>>>r,FI=(n,a,r)=>n<<64-r|a>>>r-32,VI=(n,a,r)=>n>>>r-32|a<<64-r,HI=(n,a)=>a,GI=(n,a)=>n,Zy=(n,a,r)=>n<<r|a>>>32-r,eE=(n,a,r)=>a<<r|n>>>32-r,tE=(n,a,r)=>a<<r-32|n>>>64-r,aE=(n,a,r)=>n<<r-32|a>>>64-r;function PI(n,a,r,s){const o=(a>>>0)+(s>>>0);return{h:n+r+(o/2**32|0)|0,l:o|0}}const zI=(n,a,r)=>(n>>>0)+(a>>>0)+(r>>>0),qI=(n,a,r,s)=>a+r+s+(n/2**32|0)|0,YI=(n,a,r,s)=>(n>>>0)+(a>>>0)+(r>>>0)+(s>>>0),KI=(n,a,r,s,o)=>a+r+s+o+(n/2**32|0)|0,JI=(n,a,r,s,o)=>(n>>>0)+(a>>>0)+(r>>>0)+(s>>>0)+(o>>>0),XI=(n,a,r,s,o,u)=>a+r+s+o+u+(n/2**32|0)|0,dt={fromBig:$y,split:Wy,toBig:UI,shrSH:MI,shrSL:_I,rotrSH:jI,rotrSL:OI,rotrBH:FI,rotrBL:VI,rotr32H:HI,rotr32L:GI,rotlSH:Zy,rotlSL:eE,rotlBH:tE,rotlBL:aE,add:PI,add3L:zI,add3H:qI,add4L:YI,add4H:KI,add5H:XI,add5L:JI},[$I,WI]=dt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),yi=new Uint32Array(80),Ei=new Uint32Array(80);class nE extends OA{get(){const{Ah:a,Al:r,Bh:s,Bl:o,Ch:u,Cl:c,Dh:d,Dl:p,Eh:A,El:E,Fh:v,Fl:C,Gh:S,Gl:k,Hh:D,Hl:R}=this;return[a,r,s,o,u,c,d,p,A,E,v,C,S,k,D,R]}set(a,r,s,o,u,c,d,p,A,E,v,C,S,k,D,R){this.Ah=a|0,this.Al=r|0,this.Bh=s|0,this.Bl=o|0,this.Ch=u|0,this.Cl=c|0,this.Dh=d|0,this.Dl=p|0,this.Eh=A|0,this.El=E|0,this.Fh=v|0,this.Fl=C|0,this.Gh=S|0,this.Gl=k|0,this.Hh=D|0,this.Hl=R|0}process(a,r){for(let j=0;j<16;j++,r+=4)yi[j]=a.getUint32(r),Ei[j]=a.getUint32(r+=4);for(let j=16;j<80;j++){const P=yi[j-15]|0,V=Ei[j-15]|0,de=dt.rotrSH(P,V,1)^dt.rotrSH(P,V,8)^dt.shrSH(P,V,7),ce=dt.rotrSL(P,V,1)^dt.rotrSL(P,V,8)^dt.shrSL(P,V,7),Z=yi[j-2]|0,X=Ei[j-2]|0,K=dt.rotrSH(Z,X,19)^dt.rotrBH(Z,X,61)^dt.shrSH(Z,X,6),ee=dt.rotrSL(Z,X,19)^dt.rotrBL(Z,X,61)^dt.shrSL(Z,X,6),pe=dt.add4L(ce,ee,Ei[j-7],Ei[j-16]),ge=dt.add4H(pe,de,K,yi[j-7],yi[j-16]);yi[j]=ge|0,Ei[j]=pe|0}let{Ah:s,Al:o,Bh:u,Bl:c,Ch:d,Cl:p,Dh:A,Dl:E,Eh:v,El:C,Fh:S,Fl:k,Gh:D,Gl:R,Hh:N,Hl:U}=this;for(let j=0;j<80;j++){const P=dt.rotrSH(v,C,14)^dt.rotrSH(v,C,18)^dt.rotrBH(v,C,41),V=dt.rotrSL(v,C,14)^dt.rotrSL(v,C,18)^dt.rotrBL(v,C,41),de=v&S^~v&D,ce=C&k^~C&R,Z=dt.add5L(U,V,ce,WI[j],Ei[j]),X=dt.add5H(Z,N,P,de,$I[j],yi[j]),K=Z|0,ee=dt.rotrSH(s,o,28)^dt.rotrBH(s,o,34)^dt.rotrBH(s,o,39),pe=dt.rotrSL(s,o,28)^dt.rotrBL(s,o,34)^dt.rotrBL(s,o,39),ge=s&u^s&d^u&d,Ne=o&c^o&p^c&p;N=D|0,U=R|0,D=S|0,R=k|0,S=v|0,k=C|0,{h:v,l:C}=dt.add(A|0,E|0,X|0,K|0),A=d|0,E=p|0,d=u|0,p=c|0,u=s|0,c=o|0;const Ee=dt.add3L(K,pe,Ne);s=dt.add3H(Ee,X,ee,ge),o=Ee|0}({h:s,l:o}=dt.add(this.Ah|0,this.Al|0,s|0,o|0)),{h:u,l:c}=dt.add(this.Bh|0,this.Bl|0,u|0,c|0),{h:d,l:p}=dt.add(this.Ch|0,this.Cl|0,d|0,p|0),{h:A,l:E}=dt.add(this.Dh|0,this.Dl|0,A|0,E|0),{h:v,l:C}=dt.add(this.Eh|0,this.El|0,v|0,C|0),{h:S,l:k}=dt.add(this.Fh|0,this.Fl|0,S|0,k|0),{h:D,l:R}=dt.add(this.Gh|0,this.Gl|0,D|0,R|0),{h:N,l:U}=dt.add(this.Hh|0,this.Hl|0,N|0,U|0),this.set(s,o,u,c,d,p,A,E,v,C,S,k,D,R,N,U)}roundClean(){yi.fill(0),Ei.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}}class ZI extends nE{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const e2=Ws(()=>new nE),t2=Ws(()=>new ZI),rE=[],iE=[],sE=[],a2=BigInt(0),Xl=BigInt(1),n2=BigInt(2),r2=BigInt(7),i2=BigInt(256),s2=BigInt(113);for(let n=0,a=Xl,r=1,s=0;n<24;n++){[r,s]=[s,(2*r+3*s)%5],rE.push(2*(5*s+r)),iE.push((n+1)*(n+2)/2%64);let o=a2;for(let u=0;u<7;u++)a=(a<<Xl^(a>>r2)*s2)%i2,a&n2&&(o^=Xl<<(Xl<<BigInt(u))-Xl);sE.push(o)}const[l2,o2]=Wy(sE,!0),lp=(n,a,r)=>r>32?tE(n,a,r):Zy(n,a,r),op=(n,a,r)=>r>32?aE(n,a,r):eE(n,a,r);function u2(n,a=24){const r=new Uint32Array(10);for(let s=24-a;s<24;s++){for(let c=0;c<10;c++)r[c]=n[c]^n[c+10]^n[c+20]^n[c+30]^n[c+40];for(let c=0;c<10;c+=2){const d=(c+8)%10,p=(c+2)%10,A=r[p],E=r[p+1],v=lp(A,E,1)^r[d],C=op(A,E,1)^r[d+1];for(let S=0;S<50;S+=10)n[c+S]^=v,n[c+S+1]^=C}let o=n[2],u=n[3];for(let c=0;c<24;c++){const d=iE[c],p=lp(o,u,d),A=op(o,u,d),E=rE[c];o=n[E],u=n[E+1],n[E]=p,n[E+1]=A}for(let c=0;c<50;c+=10){for(let d=0;d<10;d++)r[d]=n[c+d];for(let d=0;d<10;d++)n[c+d]^=~r[(d+2)%10]&r[(d+4)%10]}n[0]^=l2[s],n[1]^=o2[s]}r.fill(0)}class FA extends jA{keccak(){ip||sp(this.state32),u2(this.state32,this.rounds),ip||sp(this.state32),this.posOut=0,this.pos=0}update(a){Ys(this);const{blockLen:r,state:s}=this;a=uc(a);const o=a.length;for(let u=0;u<o;){const c=Math.min(r-this.pos,o-u);for(let d=0;d<c;d++)s[this.pos++]^=a[u++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:a,suffix:r,pos:s,blockLen:o}=this;a[s]^=r,(r&128)!==0&&s===o-1&&this.keccak(),a[o-1]^=128,this.keccak()}writeInto(a){Ys(this,!1),oc(a),this.finish();const r=this.state,{blockLen:s}=this;for(let o=0,u=a.length;o<u;){this.posOut>=s&&this.keccak();const c=Math.min(s-this.posOut,u-o);a.set(r.subarray(this.posOut,this.posOut+c),o),this.posOut+=c,o+=c}return a}xofInto(a){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(a)}xof(a){return Zu(a),this.xofInto(new Uint8Array(a))}digestInto(a){if(qy(a,this),this.finished)throw new Error("digest() was already called");return this.writeInto(a),this.destroy(),a}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(a){const{blockLen:r,suffix:s,outputLen:o,rounds:u,enableXOF:c}=this;return a||(a=new FA(r,s,o,c,u)),a.state32.set(this.state32),a.pos=this.pos,a.posOut=this.posOut,a.finished=this.finished,a.rounds=u,a.suffix=s,a.outputLen=o,a.enableXOF=c,a.destroyed=this.destroyed,a}constructor(a,r,s,o=!1,u=24){if(super(),this.blockLen=a,this.suffix=r,this.outputLen=s,this.enableXOF=o,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Zu(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=II(this.state)}}const cc=(n,a,r)=>Ws(()=>new FA(a,n,r)),c2=cc(6,144,224/8),d2=cc(6,136,256/8),f2=cc(6,104,384/8),A2=cc(6,72,512/8),Ks=(()=>{if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if(typeof __GLOBALTHIS__<"u")return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global})(),up={SHA1:TI,SHA224:QI,SHA256:RI,SHA384:t2,SHA512:e2,"SHA3-224":c2,"SHA3-256":d2,"SHA3-384":f2,"SHA3-512":A2},VA=n=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(n):return"SHA1";case/^SHA(?:2?-)?224$/i.test(n):return"SHA224";case/^SHA(?:2?-)?256$/i.test(n):return"SHA256";case/^SHA(?:2?-)?384$/i.test(n):return"SHA384";case/^SHA(?:2?-)?512$/i.test(n):return"SHA512";case/^SHA3-224$/i.test(n):return"SHA3-224";case/^SHA3-256$/i.test(n):return"SHA3-256";case/^SHA3-384$/i.test(n):return"SHA3-384";case/^SHA3-512$/i.test(n):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${n}`)}},h2=(n,a,r)=>{if(mA){const s=up[n]??up[VA(n)];return mA(s,a,r)}else throw new Error("Missing HMAC function")},yA="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",g2=n=>{n=n.replace(/ /g,"");let a=n.length;for(;n[a-1]==="=";)--a;n=(a<n.length?n.substring(0,a):n).toUpperCase();const r=new ArrayBuffer(n.length*5/8|0),s=new Uint8Array(r);let o=0,u=0,c=0;for(let d=0;d<n.length;d++){const p=yA.indexOf(n[d]);if(p===-1)throw new TypeError(`Invalid character found: ${n[d]}`);u=u<<5|p,o+=5,o>=8&&(o-=8,s[c++]=u>>>o)}return s},m2=n=>{let a=0,r=0,s="";for(let o=0;o<n.length;o++)for(r=r<<8|n[o],a+=8;a>=5;)s+=yA[r>>>a-5&31],a-=5;return a>0&&(s+=yA[r<<5-a&31]),s},p2=n=>{n=n.replace(/ /g,"");const a=new ArrayBuffer(n.length/2),r=new Uint8Array(a);for(let s=0;s<n.length;s+=2)r[s/2]=parseInt(n.substring(s,s+2),16);return r},y2=n=>{let a="";for(let r=0;r<n.length;r++){const s=n[r].toString(16);s.length===1&&(a+="0"),a+=s}return a.toUpperCase()},E2=n=>{const a=new ArrayBuffer(n.length),r=new Uint8Array(a);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s)&255;return r},b2=n=>{let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return a},cp=Ks.TextEncoder?new Ks.TextEncoder:null,dp=Ks.TextDecoder?new Ks.TextDecoder:null,v2=n=>{if(!cp)throw new Error("Encoding API not available");return cp.encode(n)},w2=n=>{if(!dp)throw new Error("Encoding API not available");return dp.decode(n)},x2=n=>{var a;if((a=Ks.crypto)!=null&&a.getRandomValues)return Ks.crypto.getRandomValues(new Uint8Array(n));throw new Error("Cryptography API not available")};class Ur{static fromLatin1(a){return new Ur({buffer:E2(a).buffer})}static fromUTF8(a){return new Ur({buffer:v2(a).buffer})}static fromBase32(a){return new Ur({buffer:g2(a).buffer})}static fromHex(a){return new Ur({buffer:p2(a).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:b2(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:w2(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:m2(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:y2(this.bytes)}),this.hex}constructor({buffer:a,size:r=20}={}){this.bytes=typeof a>"u"?x2(r):new Uint8Array(a),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const C2=(n,a)=>{{if(n.length!==a.length)throw new TypeError("Input strings must have the same length");let r=-1,s=0;for(;++r<n.length;)s|=n.charCodeAt(r)^a.charCodeAt(r);return s===0}};class Na{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:a,algorithm:r=Na.defaults.algorithm,digits:s=Na.defaults.digits,counter:o=Na.defaults.counter}){const u=h2(r,a.bytes,wI(o)),c=u[u.byteLength-1]&15;return(((u[c]&127)<<24|(u[c+1]&255)<<16|(u[c+2]&255)<<8|u[c+3]&255)%10**s).toString().padStart(s,"0")}generate({counter:a=this.counter++}={}){return Na.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:a})}static validate({token:a,secret:r,algorithm:s,digits:o=Na.defaults.digits,counter:u=Na.defaults.counter,window:c=Na.defaults.window}){if(a.length!==o)return null;let d=null;const p=A=>{const E=Na.generate({secret:r,algorithm:s,digits:o,counter:A});C2(a,E)&&(d=A-u)};p(u);for(let A=1;A<=c&&d===null&&(p(u-A),!(d!==null||(p(u+A),d!==null)));++A);return d}validate({token:a,counter:r=this.counter,window:s}){return Na.validate({token:a,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:r,window:s})}toString(){const a=encodeURIComponent;return`otpauth://hotp/${this.issuer.length>0?this.issuerInLabel?`${a(this.issuer)}:${a(this.label)}?issuer=${a(this.issuer)}&`:`${a(this.label)}?issuer=${a(this.issuer)}&`:`${a(this.label)}?`}secret=${a(this.secret.base32)}&algorithm=${a(this.algorithm)}&digits=${a(this.digits)}&counter=${a(this.counter)}`}constructor({issuer:a=Na.defaults.issuer,label:r=Na.defaults.label,issuerInLabel:s=Na.defaults.issuerInLabel,secret:o=new Ur,algorithm:u=Na.defaults.algorithm,digits:c=Na.defaults.digits,counter:d=Na.defaults.counter}={}){this.issuer=a,this.label=r,this.issuerInLabel=s,this.secret=typeof o=="string"?Ur.fromBase32(o):o,this.algorithm=VA(u),this.digits=c,this.counter=d}}class ya{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:a=ya.defaults.period,timestamp:r=Date.now()}={}){return Math.floor(r/1e3/a)}counter({timestamp:a=Date.now()}={}){return ya.counter({period:this.period,timestamp:a})}static remaining({period:a=ya.defaults.period,timestamp:r=Date.now()}={}){return a*1e3-r%(a*1e3)}remaining({timestamp:a=Date.now()}={}){return ya.remaining({period:this.period,timestamp:a})}static generate({secret:a,algorithm:r,digits:s,period:o=ya.defaults.period,timestamp:u=Date.now()}){return Na.generate({secret:a,algorithm:r,digits:s,counter:ya.counter({period:o,timestamp:u})})}generate({timestamp:a=Date.now()}={}){return ya.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:a})}static validate({token:a,secret:r,algorithm:s,digits:o,period:u=ya.defaults.period,timestamp:c=Date.now(),window:d}){return Na.validate({token:a,secret:r,algorithm:s,digits:o,counter:ya.counter({period:u,timestamp:c}),window:d})}validate({token:a,timestamp:r,window:s}){return ya.validate({token:a,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:r,window:s})}toString(){const a=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${a(this.issuer)}:${a(this.label)}?issuer=${a(this.issuer)}&`:`${a(this.label)}?issuer=${a(this.issuer)}&`:`${a(this.label)}?`}secret=${a(this.secret.base32)}&algorithm=${a(this.algorithm)}&digits=${a(this.digits)}&period=${a(this.period)}`}constructor({issuer:a=ya.defaults.issuer,label:r=ya.defaults.label,issuerInLabel:s=ya.defaults.issuerInLabel,secret:o=new Ur,algorithm:u=ya.defaults.algorithm,digits:c=ya.defaults.digits,period:d=ya.defaults.period}={}){this.issuer=a,this.label=r,this.issuerInLabel=s,this.secret=typeof o=="string"?Ur.fromBase32(o):o,this.algorithm=VA(u),this.digits=c,this.period=d}}const I2=({credentialId:n})=>{const{t:a}=gt(),[r,s]=Q.useState([]),[o,u]=Q.useState(!0),[c,d]=Q.useState({}),[p,A]=Q.useState(null),E=ka(),v=(D=30)=>{const R=new ya({secret:"dummy",algorithm:"SHA1",digits:6,period:D});return R.period-Math.floor(Date.now()/1e3)%R.period},C=()=>{const D=v();return Math.floor((30-D)/30*100)},S=D=>{try{return new ya({secret:D,algorithm:"SHA1",digits:6,period:30}).generate()}catch(R){return console.error("Error generating TOTP code:",R),"Error"}},k=async(D,R)=>{try{await navigator.clipboard.writeText(D),A(R),await ta("CLIPBOARD_COPIED",{value:D},"background"),setTimeout(()=>{A(null)},2e3)}catch(N){console.error("Failed to copy:",N)}};return Q.useEffect(()=>{(async()=>{if(E!=null&&E.sqliteClient)try{const R=E.sqliteClient.getTotpCodesForCredential(n);s(R)}catch(R){console.error("Error loading TOTP codes:",R)}finally{u(!1)}})()},[n,E==null?void 0:E.sqliteClient]),Q.useEffect(()=>{const D=U=>{const j={};return r.forEach(P=>{const V=S(P.SecretKey);V!=="Error"?j[P.Id]=V:j[P.Id]=U[P.Id]??"Error"}),j},R={};r.forEach(U=>{R[U.Id]=S(U.SecretKey)}),d(R);const N=setInterval(()=>{d(D)},1e3);return()=>{clearInterval(N)}},[r]),o?h.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:a("common.twoFactorAuthentication")}),a("common.loadingTotpCodes")]}):r.length===0?null:h.jsx("div",{className:"mb-4",children:h.jsxs("div",{className:"space-y-2",children:[h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:a("common.twoFactorAuthentication")}),h.jsx("div",{className:"grid grid-cols-1 gap-2",children:r.map(D=>h.jsx("button",{className:"w-full text-left p-2 ps-3 pe-3 rounded bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>k(c[D.Id],D.Id),"aria-label":`Copy ${D.Name} code`,children:h.jsxs("div",{className:"flex justify-between items-center gap-2",children:[h.jsx("div",{className:"flex items-center flex-1",children:h.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:D.Name})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex flex-col items-end",children:[h.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:c[D.Id]}),h.jsx("div",{className:"text-xs",children:p===D.Id?h.jsx("span",{className:"text-green-600 dark:text-green-400",children:a("common.copied")}):h.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[v(),"s"]})})]}),h.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:h.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${C()}%`,width:"100%"}})})]})]})},D.Id))})]})})};class Ea{static isPopup(){return new URLSearchParams(window.location.search).get("expanded")==="true"?!0:window.innerWidth>390}static openInNewPopup(a){const o=window.screen.width/2-400,u=window.screen.height/2-1e3/2,d=`popup.html?expanded=true#${a||window.location.hash.replace("#","")}`;window.open(d,"AliasVaultPopup",`width=800,height=1000,left=${o},top=${u},popup=true`),window.close()}}const B2=()=>{var E;const{t:n}=gt(),{id:a}=IA(),r=Ua(),s=ka(),[o,u]=Q.useState(null),{setIsInitialLoading:c}=Ma(),{setHeaderButtons:d}=dr(),p=Q.useCallback(()=>{Ea.openInNewPopup(`/credentials/${a}`)},[a]),A=Q.useCallback(()=>{r(`/credentials/${a}/edit`)},[a,r]);return Q.useEffect(()=>{if(Ea.isPopup()&&(window.history.replaceState({},"","popup.html#/credentials"),window.history.pushState({},"",`popup.html#/credentials/${a}`)),!(!(s!=null&&s.sqliteClient)||!a))try{const v=s.sqliteClient.getCredentialById(a);v?(u(v),c(!1)):(console.error("Credential not found"),r("/credentials"))}catch(v){console.error("Error loading credential:",v)}},[s.sqliteClient,a,r,c]),Q.useEffect(()=>{const v=h.jsxs("div",{className:"flex items-center gap-2",children:[!Ea.isPopup()&&h.jsx(ln,{onClick:p,title:n("common.openInNewWindow"),iconType:Xa.EXPAND}),h.jsx(ln,{onClick:A,title:n("credentials.editCredential"),iconType:Xa.EDIT})]});return d(v),()=>{}},[d,A,p,n]),Q.useEffect(()=>()=>d(null),[d]),o?h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{className:"flex justify-between items-center",children:h.jsx(yI,{credential:o})}),((E=o.Alias)==null?void 0:E.Email)&&h.jsx(pI,{email:o.Alias.Email}),h.jsx(I2,{credentialId:o.Id}),h.jsx(EI,{credential:o}),h.jsx(hI,{credential:o}),h.jsx(vI,{notes:o.Notes}),h.jsx(gI,{credentialId:o.Id})]}):h.jsx("div",{children:n("common.loading")})},S2=({credential:n})=>{const a=Ua(),r=o=>{var c;let u="";return o.Username&&(u=o.Username),(c=o.Alias)!=null&&c.Email&&(u=o.Alias.Email),u.length>33?u.slice(0,30)+"...":u},s=o=>{let u="Untitled";return o.ServiceName&&(u=o.ServiceName),u.length>33?u.slice(0,30)+"...":u};return h.jsx("li",{children:h.jsxs("button",{onClick:()=>a(`/credentials/${n.Id}`),className:"w-full p-2 border dark:border-gray-600 rounded flex items-center bg-white dark:bg-gray-800 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[h.jsx("img",{src:Hu.imgSrcFromBytes(n.Logo),alt:n.ServiceName,className:"w-8 h-8 mr-2 flex-shrink-0",onError:o=>{const u=o.target;u.src="/assets/images/service-placeholder.webp"}}),h.jsxs("div",{className:"text-left",children:[h.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s(n)}),h.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r(n)})]})]})})},EA=({onClick:n})=>h.jsxs("div",{className:"px-2 items-center",children:[h.jsxs("div",{className:"relative inline-flex items-center",children:[h.jsx("button",{onClick:n,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor",children:h.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})})}),h.jsxs("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})]}),h.jsx("span",{className:"sr-only",children:"Loading..."})]}),dc=(n=!1,a=300)=>{const[r,s]=Q.useState(n),o=Q.useRef(null),u=Q.useRef(null),c=Q.useCallback(d=>{if(d)s(!0),u.current=Date.now();else{const p=u.current?Date.now()-u.current:0,A=Math.max(0,a-p);A===0?s(!1):(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{s(!1)},A))}},[a]);return Q.useEffect(()=>{n&&(s(!0),u.current=Date.now())},[n,s]),Q.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),[r,c]},N2=()=>{const{t:n}=gt(),a=ka(),r=fr(),s=Ua(),{syncVault:o}=lc(),{setHeaderButtons:u}=dr(),[c,d]=Q.useState([]),[p,A]=Q.useState(""),{setIsInitialLoading:E}=Ma(),[v,C]=dc(!0,100),S=Q.useCallback(()=>{s("/credentials/add")},[s]),k=Q.useCallback(async()=>{if(a!=null&&a.sqliteClient)try{await o({onSuccess:async N=>{},_onOffline:()=>{},onError:async N=>{console.error("Error syncing vault:",N),await r.logout("Error while syncing vault, please re-authenticate."),s("/logout")}})}catch(N){console.error("Error refreshing credentials:",N),await r.logout("Error while syncing vault, please re-authenticate."),s("/logout")}},[a,r,o,s]),D=Q.useCallback(async()=>{C(!0),await k(),C(!1)},[k,C]);Q.useEffect(()=>{const N=h.jsxs("div",{className:"flex items-center gap-2",children:[!Ea.isPopup()&&h.jsx(ln,{onClick:()=>Ea.openInNewPopup(),title:"Open in new window",iconType:Xa.EXPAND}),h.jsx(ln,{onClick:S,title:"Add new credential",iconType:Xa.PLUS})]});return u(N),()=>u(null)},[u,S]),Q.useEffect(()=>{(async()=>{var U;if(a!=null&&a.sqliteClient){C(!0);const j=((U=a.sqliteClient)==null?void 0:U.getAllCredentials())??[];d(j),C(!1),E(!1)}})()},[a==null?void 0:a.sqliteClient,C,E]);const R=c.filter(N=>{var P,V,de,ce,Z,X;const U=p.toLowerCase();return[(P=N.ServiceName)==null?void 0:P.toLowerCase(),(V=N.Username)==null?void 0:V.toLowerCase(),(ce=(de=N.Alias)==null?void 0:de.Email)==null?void 0:ce.toLowerCase(),(Z=N.ServiceUrl)==null?void 0:Z.toLowerCase(),(X=N.Notes)==null?void 0:X.toLowerCase()].some(K=>K==null?void 0:K.includes(U))});return v?h.jsx("div",{className:"flex justify-center items-center p-8",children:h.jsx($s,{})}):h.jsxs("div",{children:[h.jsxs("div",{className:"flex justify-between items-center mb-4",children:[h.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("credentials.title")}),h.jsx(EA,{onClick:D})]}),c.length>0?h.jsx("div",{className:"mb-4",children:h.jsx("input",{type:"text",value:p,onChange:N=>A(N.target.value),placeholder:`${n("content.searchVault")}`,autoFocus:!0,className:"w-full p-2 border dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-blue-500 focus:border-blue-500"})}):h.jsx(h.Fragment,{}),c.length===0?h.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[h.jsx("p",{className:"text-sm",children:n("credentials.welcomeTitle")}),h.jsx("p",{className:"text-sm",children:n("credentials.welcomeDescription")})]}):h.jsx("ul",{className:"space-y-2",children:R.map(N=>h.jsx(S2,{credential:N},N.Id))})]})};class k2{convertAnchorTagsToOpenInNewTab(a){try{const s=new DOMParser().parseFromString(a,"text/html"),o=s.querySelectorAll("a[href]");return o.length>0&&o.forEach(u=>{if((!u.hasAttribute("target")||u.getAttribute("target")!=="_blank")&&u.setAttribute("target","_blank"),!u.hasAttribute("rel"))u.setAttribute("rel","noopener noreferrer");else{const c=u.getAttribute("rel")??"",d=new Set(c.split(" ").filter(p=>p.trim()!==""));d.add("noopener"),d.add("noreferrer"),u.setAttribute("rel",Array.from(d).join(" "))}}),s.documentElement.outerHTML}catch(r){return console.error(`Error in convertAnchorTagsToOpenInNewTab: ${r instanceof Error?r.message:String(r)}`),a}}normalizeUsername(a){return a.toLowerCase().trim()}}const Ps=new k2,T2=()=>{const{t:n}=gt(),{id:a}=IA(),r=Ua(),s=ka(),o=fr(),[u,c]=Q.useState(null),[d,p]=Q.useState(null),[A,E]=dc(!0,150),[v,C]=Q.useState(!1),{setIsInitialLoading:S}=Ma(),{setHeaderButtons:k}=dr(),[D,R]=Q.useState(!1);Q.useEffect(()=>{Ea.isPopup()&&(window.history.replaceState({},"","popup.html#/emails"),window.history.pushState({},"",`popup.html#/emails/${a}`)),(async()=>{try{if(E(!0),c(null),!(s!=null&&s.sqliteClient)||!a)return;const V=await o.get(`Email/${a}`),de=s.sqliteClient.getAllEncryptionKeys(),ce=await qt.decryptEmail(V,de);p(ce)}catch(V){c(V instanceof Error?V.message:"An error occurred")}finally{E(!1),S(!1)}})()},[a,s==null?void 0:s.sqliteClient,o,E,S]);const N=Q.useCallback(async()=>{try{await o.delete(`Email/${a}`),Ea.isPopup()?window.close():r("/emails")}catch(P){c(P instanceof Error?P.message:"Failed to delete email")}},[a,o,r]),U=Q.useCallback(()=>{Ea.openInNewPopup(`/emails/${a}`)},[a]),j=async P=>{try{const V=await o.downloadBlob(`Email/${a}/attachments/${P.id}`);if(!(s!=null&&s.sqliteClient)||!d){c("Database context or email not available");return}const de=s.sqliteClient.getAllEncryptionKeys(),ce=await qt.decryptAttachment(V,d,de);if(!ce){c("Failed to decrypt attachment");return}const Z=new Blob([new Uint8Array(ce)],{type:P.mimeType??"application/octet-stream"}),X=window.URL.createObjectURL(Z),K=document.createElement("a");K.href=X,K.download=P.filename,document.body.appendChild(K),K.click(),window.URL.revokeObjectURL(X),document.body.removeChild(K)}catch(V){console.error("handleDownloadAttachment error",V),c(V instanceof Error?V.message:"Failed to download attachment")}};return Q.useEffect(()=>{if(!D){const P=h.jsxs("div",{className:"flex items-center gap-2",children:[!Ea.isPopup()&&h.jsx(ln,{onClick:U,title:n("common.openInNewWindow"),iconType:Xa.EXPAND}),h.jsx(ln,{onClick:()=>C(!0),title:n("emails.deleteEmail"),iconType:Xa.DELETE,variant:"danger"})]});k(P),R(!0)}return()=>{}},[k,D,U,n]),Q.useEffect(()=>()=>k(null),[k]),A?h.jsx("div",{className:"flex justify-center items-center p-8",children:h.jsx($s,{})}):u?h.jsxs("div",{className:"text-red-500",children:[n("common.error")," ",u]}):d?h.jsxs("div",{className:"max-w-4xl mx-auto",children:[h.jsx($u,{isOpen:v,onClose:()=>C(!1),onConfirm:()=>{C(!1),N()},title:n("emails.deleteEmailTitle"),message:n("emails.deleteEmailConfirm"),confirmText:n("common.delete"),cancelText:n("common.cancel"),variant:"danger"}),h.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md",children:[h.jsxs("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:[h.jsx("div",{className:"flex justify-between items-start mb-4",children:h.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:d.subject})}),h.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400",children:[h.jsxs("p",{children:[n("emails.from")," ",d.fromDisplay," (",d.fromLocal,"@",d.fromDomain,")"]}),h.jsxs("p",{children:[n("emails.to")," ",d.toLocal,"@",d.toDomain]}),h.jsxs("p",{children:[n("emails.date")," ",new Date(d.dateSystem).toLocaleString()]})]})]}),h.jsx("div",{className:"bg-white",children:d.messageHtml?h.jsx("iframe",{srcDoc:Ps.convertAnchorTagsToOpenInNewTab(d.messageHtml),className:"w-full min-h-[500px] border-0",title:n("emails.emailContent")}):h.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:d.messagePlain})}),d.attachments&&d.attachments.length>0&&h.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:n("emails.attachments")}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:d.attachments.map(P=>h.jsxs("button",{onClick:()=>j(P),className:"flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 text-left",children:[h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"})}),h.jsxs("span",{children:[P.filename," (",Math.ceil(P.filesize/1024)," KB)"]})]},P.id))})]})]})]}):h.jsx("div",{className:"text-gray-500",children:n("emails.emailNotFound")})},D2=()=>{const{t:n}=gt(),a=ka(),r=fr(),{setHeaderButtons:s}=dr(),[o,u]=Q.useState(null),[c,d]=Q.useState([]),{setIsInitialLoading:p}=Ma(),[A,E]=dc(!0,100),v=Q.useCallback(async()=>{try{if(E(!0),u(null),!(a!=null&&a.sqliteClient))return;const S=a.sqliteClient.getAllEmailAddresses();try{const k=await r.post("EmailBox/bulk",{addresses:S,page:1,pageSize:50}),D=a.sqliteClient.getAllEncryptionKeys(),R=await qt.decryptEmailList(k.mails,D);d(R)}catch(k){throw console.error(k),new Error(n("emails.errors.emailLoadError"))}}catch(S){u(S instanceof Error?S.message:n("common.errors.unknownError"))}finally{E(!1),p(!1)}},[a==null?void 0:a.sqliteClient,r,E,p,n]);Q.useEffect(()=>{v()},[v]),Q.useEffect(()=>{const S=Ea.isPopup()?null:h.jsx(ln,{onClick:()=>Ea.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Xa.EXPAND});return s(S),()=>{s(null)}},[s,n]);const C=S=>{const k=new Date,D=new Date(S),R=Math.floor((k.getTime()-D.getTime())/1e3);if(R<60)return n("emails.dateFormat.justNow");if(R<3600){const N=Math.floor(R/60);return N===1?n("emails.dateFormat.minutesAgo_single",{count:N}):n("emails.dateFormat.minutesAgo_plural",{count:N})}else if(R<86400){const N=Math.floor(R/3600);return N===1?n("emails.dateFormat.hoursAgo_single",{count:N}):n("emails.dateFormat.hoursAgo_plural",{count:N})}else return R<172800?n("emails.dateFormat.yesterday"):D.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return A?h.jsx("div",{className:"flex justify-center items-center p-8",children:h.jsx($s,{})}):o?h.jsxs("div",{className:"text-red-500",children:[n("common.error"),": ",o]}):c.length===0?h.jsxs("div",{children:[h.jsxs("div",{className:"flex justify-between items-center mb-4",children:[h.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),h.jsx(EA,{onClick:v})]}),h.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:h.jsx("p",{className:"text-sm",children:n("emails.noEmailsDescription")})})]}):h.jsxs("div",{children:[h.jsxs("div",{className:"flex justify-between items-center mb-4",children:[h.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("emails.title")}),h.jsx(EA,{onClick:v})]}),h.jsx("div",{className:"space-y-2",children:c.map(S=>h.jsxs(ic,{to:`/emails/${S.id}`,className:"block p-4 bg-white dark:bg-gray-800 rounded-lg shadow hover:shadow-md transition-shadow border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",children:[h.jsxs("div",{className:"flex justify-between items-start mb-2",children:[h.jsx("div",{className:"text-sm text-gray-900 dark:text-white mb-1 font-bold",children:S.subject}),h.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:C(S.dateSystem)})]}),h.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:S.messagePreview})]},S.id))})]})},L2=()=>{const{isFullyInitialized:n}=jx();return n?h.jsx(aw,{to:"/reinitialize",replace:!0}):null},no=({onClick:n,children:a,type:r="button",variant:s="primary"})=>{const o={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return h.jsx("button",{className:`${o[s]} text-white font-medium rounded-lg px-4 py-2 text-sm w-full`,onClick:n,type:r,children:a})},lE=()=>{const[n,a]=Q.useState(da.DEFAULT_API_URL);return{apiUrl:n,setApiUrl:a,loadApiUrl:async()=>{const o=await Ke.getItem("local:apiUrl");o&&o.length>0?a(o):a(da.DEFAULT_API_URL)},getDisplayUrl:()=>{const o=n.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return o==="app.aliasvault.net"?"aliasvault.net":o}}},R2=()=>{const{loadApiUrl:n,getDisplayUrl:a}=lE(),r=Ua(),{t:s}=gt();Q.useEffect(()=>{n()},[n]);const o=()=>{r("/auth-settings")};return h.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 mb-4",children:["(",s("auth.connectingTo")," ",h.jsx("button",{onClick:o,type:"button",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500 underline",children:a()}),")"]})};var bi={},Yf={},Kf,fp;function oE(){return fp||(fp=1,Kf=function(a){if(typeof a!="object"||a===null||typeof a.byteLength!="number")throw new TypeError("Expected input to be an ArrayBuffer");for(var r=new Uint8Array(a),s="",o,u=0;u<r.length;u++)o=r[u].toString(16),s+=o.length===1?"0"+o:o;return s}),Kf}var Jf,Ap;function Q2(){return Ap||(Ap=1,Jf=function(a){for(var r=[],s=a.length,o=0;o<s;o++){var u=a.charCodeAt(o);if(u>=55296&&u<=56319&&s>o+1){var c=a.charCodeAt(o+1);c>=56320&&c<=57343&&(u=(u-55296)*1024+c-56320+65536,o+=1)}if(u<128){r.push(u);continue}if(u<2048){r.push(u>>6|192),r.push(u&63|128);continue}if(u<55296||u>=57344&&u<65536){r.push(u>>12|224),r.push(u>>6&63|128),r.push(u&63|128);continue}if(u>=65536&&u<=1114111){r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(u&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}),Jf}var Xf,hp;function U2(){return hp||(hp=1,Xf=function(a){if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a.length%2!==0)throw new RangeError("Expected string to be an even number of characters");for(var r=new Uint8Array(a.length/2),s=0;s<a.length;s+=2)r[s/2]=parseInt(a.substring(s,s+2),16);return r.buffer}),Xf}var $f,gp;function M2(){if(gp)return $f;gp=1;const n=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(s,o,u){let c,d,p,A,E,v,C,S,k,D,R,N,U,j=0,P=u.length;for(;P>=64;){for(c=o[0],d=o[1],p=o[2],A=o[3],E=o[4],v=o[5],C=o[6],S=o[7],D=0;D<16;D++)R=j+D*4,s[D]=(u[R]&255)<<24|(u[R+1]&255)<<16|(u[R+2]&255)<<8|u[R+3]&255;for(D=16;D<64;D++)k=s[D-2],N=(k>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,k=s[D-15],U=(k>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,s[D]=(N+s[D-7]|0)+(U+s[D-16]|0);for(D=0;D<64;D++)N=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&v^~E&C)|0)+(S+(n[D]+s[D]|0)|0)|0,U=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&d^c&p^d&p)|0,S=C,C=v,v=E,E=A+N|0,A=p,p=d,d=c,c=N+U|0;o[0]+=c,o[1]+=d,o[2]+=p,o[3]+=A,o[4]+=E,o[5]+=v,o[6]+=C,o[7]+=S,j+=64,P-=64}}function r(s){const o=s.length,u=o%64,c=o%64<56?64:128,d=new Uint8Array(c),p=o/536870912|0,A=o<<3;return d.set(s.subarray(o-u)),d[u]=128,d[c-8]=p>>>24&255,d[c-7]=p>>>16&255,d[c-6]=p>>>8&255,d[c-5]=p>>>0&255,d[c-4]=A>>>24&255,d[c-3]=A>>>16&255,d[c-2]=A>>>8&255,d[c-1]=A>>>0&255,d}return $f=function(o){const u=new Int32Array(8),c=new Int32Array(64);u[0]=1779033703,u[1]=3144134277,u[2]=1013904242,u[3]=2773480762,u[4]=1359893119,u[5]=2600822924,u[6]=528734635,u[7]=1541459225;const d=new Uint8Array(o),p=r(d);a(c,u,d),a(c,u,p);const A=new Uint8Array(32);for(let E=0;E<8;E++)A[E*4+0]=u[E]>>>24&255,A[E*4+1]=u[E]>>>16&255,A[E*4+2]=u[E]>>>8&255,A[E*4+3]=u[E]>>>0&255;return A.buffer},$f}var Wf,mp;function _2(){return mp||(mp=1,Wf=function(n,a,r){if(n==null||a==null)return n;var s=String(n),o=typeof a=="number"?a:parseInt(a,10);if(isNaN(o)||!isFinite(o))return s;var u=s.length;if(u>=o)return s;var c=r==null?"":String(r);c===""&&(c=" ");for(var d=o-u;c.length<d;)c+=c;var p=c.length>d?c.substr(0,d):c;return p+s}),Wf}var Zf,pp;function j2(){if(pp)return Zf;pp=1;const n=oE();return Zf=function(r){const s=new Uint8Array(r);if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(s);else if(typeof msCrypto=="object"&&typeof msCrypto.getRandomValues=="function")msCrypto.getRandomValues(s);else throw new Error("No secure random number generator available");return n(s.buffer)},Zf}var ju={exports:{}},O2=ju.exports,yp;function F2(){return yp||(yp=1,function(n,a){(function(){var r,s=0xdeadbeefcafe,o=(s&16777215)==15715070;function u(B,L,O){B!=null&&(typeof B=="number"?this.fromNumber(B,L,O):L==null&&typeof B!="string"?this.fromString(B,256):this.fromString(B,L))}function c(){return new u(null)}function d(B,L,O,te,Ie,Be){for(;--Be>=0;){var Ue=L*this[B++]+O[te]+Ie;Ie=Math.floor(Ue/67108864),O[te++]=Ue&67108863}return Ie}function p(B,L,O,te,Ie,Be){for(var Ue=L&32767,Fe=L>>15;--Be>=0;){var wt=this[B]&32767,je=this[B++]>>15,ha=Fe*wt+je*Ue;wt=Ue*wt+((ha&32767)<<15)+O[te]+(Ie&1073741823),Ie=(wt>>>30)+(ha>>>15)+Fe*je+(Ie>>>30),O[te++]=wt&1073741823}return Ie}function A(B,L,O,te,Ie,Be){for(var Ue=L&16383,Fe=L>>14;--Be>=0;){var wt=this[B]&16383,je=this[B++]>>14,ha=Fe*wt+je*Ue;wt=Ue*wt+((ha&16383)<<14)+O[te]+Ie,Ie=(wt>>28)+(ha>>14)+Fe*je,O[te++]=wt&268435455}return Ie}var E=typeof navigator<"u";E&&o&&navigator.appName=="Microsoft Internet Explorer"?(u.prototype.am=p,r=30):E&&o&&navigator.appName!="Netscape"?(u.prototype.am=d,r=26):(u.prototype.am=A,r=28),u.prototype.DB=r,u.prototype.DM=(1<<r)-1,u.prototype.DV=1<<r;var v=52;u.prototype.FV=Math.pow(2,v),u.prototype.F1=v-r,u.prototype.F2=2*r-v;var C="0123456789abcdefghijklmnopqrstuvwxyz",S=new Array,k,D;for(k=48,D=0;D<=9;++D)S[k++]=D;for(k=97,D=10;D<36;++D)S[k++]=D;for(k=65,D=10;D<36;++D)S[k++]=D;function R(B){return C.charAt(B)}function N(B,L){var O=S[B.charCodeAt(L)];return O??-1}function U(B){for(var L=this.t-1;L>=0;--L)B[L]=this[L];B.t=this.t,B.s=this.s}function j(B){this.t=1,this.s=B<0?-1:0,B>0?this[0]=B:B<-1?this[0]=B+this.DV:this.t=0}function P(B){var L=c();return L.fromInt(B),L}function V(B,L){var O;if(L==16)O=4;else if(L==8)O=3;else if(L==256)O=8;else if(L==2)O=1;else if(L==32)O=5;else if(L==4)O=2;else{this.fromRadix(B,L);return}this.t=0,this.s=0;for(var te=B.length,Ie=!1,Be=0;--te>=0;){var Ue=O==8?B[te]&255:N(B,te);if(Ue<0){B.charAt(te)=="-"&&(Ie=!0);continue}Ie=!1,Be==0?this[this.t++]=Ue:Be+O>this.DB?(this[this.t-1]|=(Ue&(1<<this.DB-Be)-1)<<Be,this[this.t++]=Ue>>this.DB-Be):this[this.t-1]|=Ue<<Be,Be+=O,Be>=this.DB&&(Be-=this.DB)}O==8&&(B[0]&128)!=0&&(this.s=-1,Be>0&&(this[this.t-1]|=(1<<this.DB-Be)-1<<Be)),this.clamp(),Ie&&u.ZERO.subTo(this,this)}function de(){for(var B=this.s&this.DM;this.t>0&&this[this.t-1]==B;)--this.t}function ce(B){if(this.s<0)return"-"+this.negate().toString(B);var L;if(B==16)L=4;else if(B==8)L=3;else if(B==2)L=1;else if(B==32)L=5;else if(B==4)L=2;else return this.toRadix(B);var O=(1<<L)-1,te,Ie=!1,Be="",Ue=this.t,Fe=this.DB-Ue*this.DB%L;if(Ue-- >0)for(Fe<this.DB&&(te=this[Ue]>>Fe)>0&&(Ie=!0,Be=R(te));Ue>=0;)Fe<L?(te=(this[Ue]&(1<<Fe)-1)<<L-Fe,te|=this[--Ue]>>(Fe+=this.DB-L)):(te=this[Ue]>>(Fe-=L)&O,Fe<=0&&(Fe+=this.DB,--Ue)),te>0&&(Ie=!0),Ie&&(Be+=R(te));return Ie?Be:"0"}function Z(){var B=c();return u.ZERO.subTo(this,B),B}function X(){return this.s<0?this.negate():this}function K(B){var L=this.s-B.s;if(L!=0)return L;var O=this.t;if(L=O-B.t,L!=0)return this.s<0?-L:L;for(;--O>=0;)if((L=this[O]-B[O])!=0)return L;return 0}function ee(B){var L=1,O;return(O=B>>>16)!=0&&(B=O,L+=16),(O=B>>8)!=0&&(B=O,L+=8),(O=B>>4)!=0&&(B=O,L+=4),(O=B>>2)!=0&&(B=O,L+=2),(O=B>>1)!=0&&(B=O,L+=1),L}function pe(){return this.t<=0?0:this.DB*(this.t-1)+ee(this[this.t-1]^this.s&this.DM)}function ge(B,L){var O;for(O=this.t-1;O>=0;--O)L[O+B]=this[O];for(O=B-1;O>=0;--O)L[O]=0;L.t=this.t+B,L.s=this.s}function Ne(B,L){for(var O=B;O<this.t;++O)L[O-B]=this[O];L.t=Math.max(this.t-B,0),L.s=this.s}function Ee(B,L){var O=B%this.DB,te=this.DB-O,Ie=(1<<te)-1,Be=Math.floor(B/this.DB),Ue=this.s<<O&this.DM,Fe;for(Fe=this.t-1;Fe>=0;--Fe)L[Fe+Be+1]=this[Fe]>>te|Ue,Ue=(this[Fe]&Ie)<<O;for(Fe=Be-1;Fe>=0;--Fe)L[Fe]=0;L[Be]=Ue,L.t=this.t+Be+1,L.s=this.s,L.clamp()}function Y(B,L){L.s=this.s;var O=Math.floor(B/this.DB);if(O>=this.t){L.t=0;return}var te=B%this.DB,Ie=this.DB-te,Be=(1<<te)-1;L[0]=this[O]>>te;for(var Ue=O+1;Ue<this.t;++Ue)L[Ue-O-1]|=(this[Ue]&Be)<<Ie,L[Ue-O]=this[Ue]>>te;te>0&&(L[this.t-O-1]|=(this.s&Be)<<Ie),L.t=this.t-O,L.clamp()}function ae(B,L){for(var O=0,te=0,Ie=Math.min(B.t,this.t);O<Ie;)te+=this[O]-B[O],L[O++]=te&this.DM,te>>=this.DB;if(B.t<this.t){for(te-=B.s;O<this.t;)te+=this[O],L[O++]=te&this.DM,te>>=this.DB;te+=this.s}else{for(te+=this.s;O<B.t;)te-=B[O],L[O++]=te&this.DM,te>>=this.DB;te-=B.s}L.s=te<0?-1:0,te<-1?L[O++]=this.DV+te:te>0&&(L[O++]=te),L.t=O,L.clamp()}function xe(B,L){var O=this.abs(),te=B.abs(),Ie=O.t;for(L.t=Ie+te.t;--Ie>=0;)L[Ie]=0;for(Ie=0;Ie<te.t;++Ie)L[Ie+O.t]=O.am(0,te[Ie],L,Ie,0,O.t);L.s=0,L.clamp(),this.s!=B.s&&u.ZERO.subTo(L,L)}function Me(B){for(var L=this.abs(),O=B.t=2*L.t;--O>=0;)B[O]=0;for(O=0;O<L.t-1;++O){var te=L.am(O,L[O],B,2*O,0,1);(B[O+L.t]+=L.am(O+1,2*L[O],B,2*O+1,te,L.t-O-1))>=L.DV&&(B[O+L.t]-=L.DV,B[O+L.t+1]=1)}B.t>0&&(B[B.t-1]+=L.am(O,L[O],B,2*O,0,1)),B.s=0,B.clamp()}function G(B,L,O){var te=B.abs();if(!(te.t<=0)){var Ie=this.abs();if(Ie.t<te.t){L!=null&&L.fromInt(0),O!=null&&this.copyTo(O);return}O==null&&(O=c());var Be=c(),Ue=this.s,Fe=B.s,wt=this.DB-ee(te[te.t-1]);wt>0?(te.lShiftTo(wt,Be),Ie.lShiftTo(wt,O)):(te.copyTo(Be),Ie.copyTo(O));var je=Be.t,ha=Be[je-1];if(ha!=0){var Wt=ha*(1<<this.F1)+(je>1?Be[je-2]>>this.F2:0),za=this.FV/Wt,un=(1<<this.F1)/Wt,Ut=1<<this.F2,Gt=O.t,ja=Gt-je,ra=L??c();for(Be.dlShiftTo(ja,ra),O.compareTo(ra)>=0&&(O[O.t++]=1,O.subTo(ra,O)),u.ONE.dlShiftTo(je,ra),ra.subTo(Be,Be);Be.t<je;)Be[Be.t++]=0;for(;--ja>=0;){var g=O[--Gt]==ha?this.DM:Math.floor(O[Gt]*za+(O[Gt-1]+Ut)*un);if((O[Gt]+=Be.am(0,g,O,ja,0,je))<g)for(Be.dlShiftTo(ja,ra),O.subTo(ra,O);O[Gt]<--g;)O.subTo(ra,O)}L!=null&&(O.drShiftTo(je,L),Ue!=Fe&&u.ZERO.subTo(L,L)),O.t=je,O.clamp(),wt>0&&O.rShiftTo(wt,O),Ue<0&&u.ZERO.subTo(O,O)}}}function re(B){var L=c();return this.abs().divRemTo(B,null,L),this.s<0&&L.compareTo(u.ZERO)>0&&B.subTo(L,L),L}function ye(B){this.m=B}function Re(B){return B.s<0||B.compareTo(this.m)>=0?B.mod(this.m):B}function Ve(B){return B}function Je(B){B.divRemTo(this.m,null,B)}function He(B,L,O){B.multiplyTo(L,O),this.reduce(O)}function Et(B,L){B.squareTo(L),this.reduce(L)}ye.prototype.convert=Re,ye.prototype.revert=Ve,ye.prototype.reduce=Je,ye.prototype.mulTo=He,ye.prototype.sqrTo=Et;function We(){if(this.t<1)return 0;var B=this[0];if((B&1)==0)return 0;var L=B&3;return L=L*(2-(B&15)*L)&15,L=L*(2-(B&255)*L)&255,L=L*(2-((B&65535)*L&65535))&65535,L=L*(2-B*L%this.DV)%this.DV,L>0?this.DV-L:-L}function bt(B){this.m=B,this.mp=B.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<B.DB-15)-1,this.mt2=2*B.t}function Kt(B){var L=c();return B.abs().dlShiftTo(this.m.t,L),L.divRemTo(this.m,null,L),B.s<0&&L.compareTo(u.ZERO)>0&&this.m.subTo(L,L),L}function Ta(B){var L=c();return B.copyTo(L),this.reduce(L),L}function Qt(B){for(;B.t<=this.mt2;)B[B.t++]=0;for(var L=0;L<this.m.t;++L){var O=B[L]&32767,te=O*this.mpl+((O*this.mph+(B[L]>>15)*this.mpl&this.um)<<15)&B.DM;for(O=L+this.m.t,B[O]+=this.m.am(0,te,B,L,0,this.m.t);B[O]>=B.DV;)B[O]-=B.DV,B[++O]++}B.clamp(),B.drShiftTo(this.m.t,B),B.compareTo(this.m)>=0&&B.subTo(this.m,B)}function Vt(B,L){B.squareTo(L),this.reduce(L)}function Ft(B,L,O){B.multiplyTo(L,O),this.reduce(O)}bt.prototype.convert=Kt,bt.prototype.revert=Ta,bt.prototype.reduce=Qt,bt.prototype.mulTo=Ft,bt.prototype.sqrTo=Vt;function va(){return(this.t>0?this[0]&1:this.s)==0}function Te(B,L){if(B>4294967295||B<1)return u.ONE;var O=c(),te=c(),Ie=L.convert(this),Be=ee(B)-1;for(Ie.copyTo(O);--Be>=0;)if(L.sqrTo(O,te),(B&1<<Be)>0)L.mulTo(te,Ie,O);else{var Ue=O;O=te,te=Ue}return L.revert(O)}function Oe(B,L){var O;return B<256||L.isEven()?O=new ye(L):O=new bt(L),this.exp(B,O)}u.prototype.copyTo=U,u.prototype.fromInt=j,u.prototype.fromString=V,u.prototype.clamp=de,u.prototype.dlShiftTo=ge,u.prototype.drShiftTo=Ne,u.prototype.lShiftTo=Ee,u.prototype.rShiftTo=Y,u.prototype.subTo=ae,u.prototype.multiplyTo=xe,u.prototype.squareTo=Me,u.prototype.divRemTo=G,u.prototype.invDigit=We,u.prototype.isEven=va,u.prototype.exp=Te,u.prototype.toString=ce,u.prototype.negate=Z,u.prototype.abs=X,u.prototype.compareTo=K,u.prototype.bitLength=pe,u.prototype.mod=re,u.prototype.modPowInt=Oe,u.ZERO=P(0),u.ONE=P(1);function nt(){var B=c();return this.copyTo(B),B}function lt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function F(){return this.t==0?this.s:this[0]<<24>>24}function J(){return this.t==0?this.s:this[0]<<16>>16}function ie(B){return Math.floor(Math.LN2*this.DB/Math.log(B))}function ke(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function Le(B){if(B==null&&(B=10),this.signum()==0||B<2||B>36)return"0";var L=this.chunkSize(B),O=Math.pow(B,L),te=P(O),Ie=c(),Be=c(),Ue="";for(this.divRemTo(te,Ie,Be);Ie.signum()>0;)Ue=(O+Be.intValue()).toString(B).substr(1)+Ue,Ie.divRemTo(te,Ie,Be);return Be.intValue().toString(B)+Ue}function we(B,L){this.fromInt(0),L==null&&(L=10);for(var O=this.chunkSize(L),te=Math.pow(L,O),Ie=!1,Be=0,Ue=0,Fe=0;Fe<B.length;++Fe){var wt=N(B,Fe);if(wt<0){B.charAt(Fe)=="-"&&this.signum()==0&&(Ie=!0);continue}Ue=L*Ue+wt,++Be>=O&&(this.dMultiply(te),this.dAddOffset(Ue,0),Be=0,Ue=0)}Be>0&&(this.dMultiply(Math.pow(L,Be)),this.dAddOffset(Ue,0)),Ie&&u.ZERO.subTo(this,this)}function Ge(B,L,O){if(typeof L=="number")if(B<2)this.fromInt(1);else for(this.fromNumber(B,O),this.testBit(B-1)||this.bitwiseTo(u.ONE.shiftLeft(B-1),Qe,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(L);)this.dAddOffset(2,0),this.bitLength()>B&&this.subTo(u.ONE.shiftLeft(B-1),this);else{var te=new Array,Ie=B&7;te.length=(B>>3)+1,L.nextBytes(te),Ie>0?te[0]&=(1<<Ie)-1:te[0]=0,this.fromString(te,256)}}function T(){var B=this.t,L=new Array;L[0]=this.s;var O=this.DB-B*this.DB%8,te,Ie=0;if(B-- >0)for(O<this.DB&&(te=this[B]>>O)!=(this.s&this.DM)>>O&&(L[Ie++]=te|this.s<<this.DB-O);B>=0;)O<8?(te=(this[B]&(1<<O)-1)<<8-O,te|=this[--B]>>(O+=this.DB-8)):(te=this[B]>>(O-=8)&255,O<=0&&(O+=this.DB,--B)),(te&128)!=0&&(te|=-256),Ie==0&&(this.s&128)!=(te&128)&&++Ie,(Ie>0||te!=this.s)&&(L[Ie++]=te);return L}function b(B){return this.compareTo(B)==0}function w(B){return this.compareTo(B)<0?this:B}function H(B){return this.compareTo(B)>0?this:B}function $(B,L,O){var te,Ie,Be=Math.min(B.t,this.t);for(te=0;te<Be;++te)O[te]=L(this[te],B[te]);if(B.t<this.t){for(Ie=B.s&this.DM,te=Be;te<this.t;++te)O[te]=L(this[te],Ie);O.t=this.t}else{for(Ie=this.s&this.DM,te=Be;te<B.t;++te)O[te]=L(Ie,B[te]);O.t=B.t}O.s=L(this.s,B.s),O.clamp()}function Ae(B,L){return B&L}function be(B){var L=c();return this.bitwiseTo(B,Ae,L),L}function Qe(B,L){return B|L}function mt(B){var L=c();return this.bitwiseTo(B,Qe,L),L}function ft(B,L){return B^L}function vt(B){var L=c();return this.bitwiseTo(B,ft,L),L}function ot(B,L){return B&~L}function ns(B){var L=c();return this.bitwiseTo(B,ot,L),L}function on(){for(var B=c(),L=0;L<this.t;++L)B[L]=this.DM&~this[L];return B.t=this.t,B.s=~this.s,B}function jr(B){var L=c();return B<0?this.rShiftTo(-B,L):this.lShiftTo(B,L),L}function Jn(B){var L=c();return B<0?this.lShiftTo(-B,L):this.rShiftTo(B,L),L}function rs(B){if(B==0)return-1;var L=0;return(B&65535)==0&&(B>>=16,L+=16),(B&255)==0&&(B>>=8,L+=8),(B&15)==0&&(B>>=4,L+=4),(B&3)==0&&(B>>=2,L+=2),(B&1)==0&&++L,L}function _e(){for(var B=0;B<this.t;++B)if(this[B]!=0)return B*this.DB+rs(this[B]);return this.s<0?this.t*this.DB:-1}function is(B){for(var L=0;B!=0;)B&=B-1,++L;return L}function Ii(){for(var B=0,L=this.s&this.DM,O=0;O<this.t;++O)B+=is(this[O]^L);return B}function wa(B){var L=Math.floor(B/this.DB);return L>=this.t?this.s!=0:(this[L]&1<<B%this.DB)!=0}function Or(B,L){var O=u.ONE.shiftLeft(B);return this.bitwiseTo(O,L,O),O}function Bi(B){return this.changeBit(B,Qe)}function $a(B){return this.changeBit(B,ot)}function _t(B){return this.changeBit(B,ft)}function fa(B,L){for(var O=0,te=0,Ie=Math.min(B.t,this.t);O<Ie;)te+=this[O]+B[O],L[O++]=te&this.DM,te>>=this.DB;if(B.t<this.t){for(te+=B.s;O<this.t;)te+=this[O],L[O++]=te&this.DM,te>>=this.DB;te+=this.s}else{for(te+=this.s;O<B.t;)te+=B[O],L[O++]=te&this.DM,te>>=this.DB;te+=B.s}L.s=te<0?-1:0,te>0?L[O++]=te:te<-1&&(L[O++]=this.DV+te),L.t=O,L.clamp()}function Jt(B){var L=c();return this.addTo(B,L),L}function Fr(B){var L=c();return this.subTo(B,L),L}function Xn(B){var L=c();return this.multiplyTo(B,L),L}function ss(){var B=c();return this.squareTo(B),B}function Si(B){var L=c();return this.divRemTo(B,L,null),L}function bn(B){var L=c();return this.divRemTo(B,null,L),L}function aa(B){var L=c(),O=c();return this.divRemTo(B,L,O),new Array(L,O)}function Un(B){this[this.t]=this.am(0,B-1,this,0,0,this.t),++this.t,this.clamp()}function $n(B,L){if(B!=0){for(;this.t<=L;)this[this.t++]=0;for(this[L]+=B;this[L]>=this.DV;)this[L]-=this.DV,++L>=this.t&&(this[this.t++]=0),++this[L]}}function Pa(){}function Mn(B){return B}function Ht(B,L,O){B.multiplyTo(L,O)}function Ni(B,L){B.squareTo(L)}Pa.prototype.convert=Mn,Pa.prototype.revert=Mn,Pa.prototype.mulTo=Ht,Pa.prototype.sqrTo=Ni;function Ar(B){return this.exp(B,new Pa)}function _n(B,L,O){var te=Math.min(this.t+B.t,L);for(O.s=0,O.t=te;te>0;)O[--te]=0;var Ie;for(Ie=O.t-this.t;te<Ie;++te)O[te+this.t]=this.am(0,B[te],O,te,0,this.t);for(Ie=Math.min(B.t,L);te<Ie;++te)this.am(0,B[te],O,te,0,L-te);O.clamp()}function Aa(B,L,O){--L;var te=O.t=this.t+B.t-L;for(O.s=0;--te>=0;)O[te]=0;for(te=Math.max(L-this.t,0);te<B.t;++te)O[this.t+te-L]=this.am(L-te,B[te],O,0,0,this.t+te-L);O.clamp(),O.drShiftTo(1,O)}function Wa(B){this.r2=c(),this.q3=c(),u.ONE.dlShiftTo(2*B.t,this.r2),this.mu=this.r2.divide(B),this.m=B}function Vr(B){if(B.s<0||B.t>2*this.m.t)return B.mod(this.m);if(B.compareTo(this.m)<0)return B;var L=c();return B.copyTo(L),this.reduce(L),L}function ki(B){return B}function ls(B){for(B.drShiftTo(this.m.t-1,this.r2),B.t>this.m.t+1&&(B.t=this.m.t+1,B.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);B.compareTo(this.r2)<0;)B.dAddOffset(1,this.m.t+1);for(B.subTo(this.r2,B);B.compareTo(this.m)>=0;)B.subTo(this.m,B)}function vn(B,L){B.squareTo(L),this.reduce(L)}function hr(B,L,O){B.multiplyTo(L,O),this.reduce(O)}Wa.prototype.convert=Vr,Wa.prototype.revert=ki,Wa.prototype.reduce=ls,Wa.prototype.mulTo=hr,Wa.prototype.sqrTo=vn;function _a(B,L){var O=B.bitLength(),te,Ie=P(1),Be;if(O<=0)return Ie;O<18?te=1:O<48?te=3:O<144?te=4:O<768?te=5:te=6,O<8?Be=new ye(L):L.isEven()?Be=new Wa(L):Be=new bt(L);var Ue=new Array,Fe=3,wt=te-1,je=(1<<te)-1;if(Ue[1]=Be.convert(this),te>1){var ha=c();for(Be.sqrTo(Ue[1],ha);Fe<=je;)Ue[Fe]=c(),Be.mulTo(ha,Ue[Fe-2],Ue[Fe]),Fe+=2}var Wt=B.t-1,za,un=!0,Ut=c(),Gt;for(O=ee(B[Wt])-1;Wt>=0;){for(O>=wt?za=B[Wt]>>O-wt&je:(za=(B[Wt]&(1<<O+1)-1)<<wt-O,Wt>0&&(za|=B[Wt-1]>>this.DB+O-wt)),Fe=te;(za&1)==0;)za>>=1,--Fe;if((O-=Fe)<0&&(O+=this.DB,--Wt),un)Ue[za].copyTo(Ie),un=!1;else{for(;Fe>1;)Be.sqrTo(Ie,Ut),Be.sqrTo(Ut,Ie),Fe-=2;Fe>0?Be.sqrTo(Ie,Ut):(Gt=Ie,Ie=Ut,Ut=Gt),Be.mulTo(Ut,Ue[za],Ie)}for(;Wt>=0&&(B[Wt]&1<<O)==0;)Be.sqrTo(Ie,Ut),Gt=Ie,Ie=Ut,Ut=Gt,--O<0&&(O=this.DB-1,--Wt)}return Be.revert(Ie)}function Hr(B){var L=this.s<0?this.negate():this.clone(),O=B.s<0?B.negate():B.clone();if(L.compareTo(O)<0){var te=L;L=O,O=te}var Ie=L.getLowestSetBit(),Be=O.getLowestSetBit();if(Be<0)return L;for(Ie<Be&&(Be=Ie),Be>0&&(L.rShiftTo(Be,L),O.rShiftTo(Be,O));L.signum()>0;)(Ie=L.getLowestSetBit())>0&&L.rShiftTo(Ie,L),(Ie=O.getLowestSetBit())>0&&O.rShiftTo(Ie,O),L.compareTo(O)>=0?(L.subTo(O,L),L.rShiftTo(1,L)):(O.subTo(L,O),O.rShiftTo(1,O));return Be>0&&O.lShiftTo(Be,O),O}function jn(B){if(B<=0)return 0;var L=this.DV%B,O=this.s<0?B-1:0;if(this.t>0)if(L==0)O=this[0]%B;else for(var te=this.t-1;te>=0;--te)O=(L*O+this[te])%B;return O}function wn(B){var L=B.isEven();if(this.isEven()&&L||B.signum()==0)return u.ZERO;for(var O=B.clone(),te=this.clone(),Ie=P(1),Be=P(0),Ue=P(0),Fe=P(1);O.signum()!=0;){for(;O.isEven();)O.rShiftTo(1,O),L?((!Ie.isEven()||!Be.isEven())&&(Ie.addTo(this,Ie),Be.subTo(B,Be)),Ie.rShiftTo(1,Ie)):Be.isEven()||Be.subTo(B,Be),Be.rShiftTo(1,Be);for(;te.isEven();)te.rShiftTo(1,te),L?((!Ue.isEven()||!Fe.isEven())&&(Ue.addTo(this,Ue),Fe.subTo(B,Fe)),Ue.rShiftTo(1,Ue)):Fe.isEven()||Fe.subTo(B,Fe),Fe.rShiftTo(1,Fe);O.compareTo(te)>=0?(O.subTo(te,O),L&&Ie.subTo(Ue,Ie),Be.subTo(Fe,Be)):(te.subTo(O,te),L&&Ue.subTo(Ie,Ue),Fe.subTo(Be,Fe))}if(te.compareTo(u.ONE)!=0)return u.ZERO;if(Fe.compareTo(B)>=0)return Fe.subtract(B);if(Fe.signum()<0)Fe.addTo(B,Fe);else return Fe;return Fe.signum()<0?Fe.add(B):Fe}var $t=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Gr=(1<<26)/$t[$t.length-1];function os(B){var L,O=this.abs();if(O.t==1&&O[0]<=$t[$t.length-1]){for(L=0;L<$t.length;++L)if(O[0]==$t[L])return!0;return!1}if(O.isEven())return!1;for(L=1;L<$t.length;){for(var te=$t[L],Ie=L+1;Ie<$t.length&&te<Gr;)te*=$t[Ie++];for(te=O.modInt(te);L<Ie;)if(te%$t[L++]==0)return!1}return O.millerRabin(B)}function us(B){var L=this.subtract(u.ONE),O=L.getLowestSetBit();if(O<=0)return!1;var te=L.shiftRight(O);B=B+1>>1,B>$t.length&&(B=$t.length);for(var Ie=c(),Be=0;Be<B;++Be){Ie.fromInt($t[Math.floor(Math.random()*$t.length)]);var Ue=Ie.modPow(te,this);if(Ue.compareTo(u.ONE)!=0&&Ue.compareTo(L)!=0){for(var Fe=1;Fe++<O&&Ue.compareTo(L)!=0;)if(Ue=Ue.modPowInt(2,this),Ue.compareTo(u.ONE)==0)return!1;if(Ue.compareTo(L)!=0)return!1}}return!0}u.prototype.chunkSize=ie,u.prototype.toRadix=Le,u.prototype.fromRadix=we,u.prototype.fromNumber=Ge,u.prototype.bitwiseTo=$,u.prototype.changeBit=Or,u.prototype.addTo=fa,u.prototype.dMultiply=Un,u.prototype.dAddOffset=$n,u.prototype.multiplyLowerTo=_n,u.prototype.multiplyUpperTo=Aa,u.prototype.modInt=jn,u.prototype.millerRabin=us,u.prototype.clone=nt,u.prototype.intValue=lt,u.prototype.byteValue=F,u.prototype.shortValue=J,u.prototype.signum=ke,u.prototype.toByteArray=T,u.prototype.equals=b,u.prototype.min=w,u.prototype.max=H,u.prototype.and=be,u.prototype.or=mt,u.prototype.xor=vt,u.prototype.andNot=ns,u.prototype.not=on,u.prototype.shiftLeft=jr,u.prototype.shiftRight=Jn,u.prototype.getLowestSetBit=_e,u.prototype.bitCount=Ii,u.prototype.testBit=wa,u.prototype.setBit=Bi,u.prototype.clearBit=$a,u.prototype.flipBit=_t,u.prototype.add=Jt,u.prototype.subtract=Fr,u.prototype.multiply=Xn,u.prototype.divide=Si,u.prototype.remainder=bn,u.prototype.divideAndRemainder=aa,u.prototype.modPow=_a,u.prototype.modInverse=wn,u.prototype.pow=Ar,u.prototype.gcd=Hr,u.prototype.isProbablePrime=os,u.prototype.square=ss,u.prototype.Barrett=Wa;var jt,ut,kt;function On(B){ut[kt++]^=B&255,ut[kt++]^=B>>8&255,ut[kt++]^=B>>16&255,ut[kt++]^=B>>24&255,kt>=mr&&(kt-=mr)}function Wn(){On(new Date().getTime())}if(ut==null){ut=new Array,kt=0;var na;if(typeof window<"u"&&window.crypto){if(window.crypto.getRandomValues){var Pr=new Uint8Array(32);for(window.crypto.getRandomValues(Pr),na=0;na<32;++na)ut[kt++]=Pr[na]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Da=window.crypto.random(32);for(na=0;na<Da.length;++na)ut[kt++]=Da.charCodeAt(na)&255}}for(;kt<mr;)na=Math.floor(65536*Math.random()),ut[kt++]=na>>>8,ut[kt++]=na&255;kt=0,Wn()}function Ti(){if(jt==null){for(Wn(),jt=Cn(),jt.init(ut),kt=0;kt<ut.length;++kt)ut[kt]=0;kt=0}return jt.next()}function Zn(B){var L;for(L=0;L<B.length;++L)B[L]=Ti()}function gr(){}gr.prototype.nextBytes=Zn;function xn(){this.i=0,this.j=0,this.S=new Array}function zr(B){var L,O,te;for(L=0;L<256;++L)this.S[L]=L;for(O=0,L=0;L<256;++L)O=O+this.S[L]+B[L%B.length]&255,te=this.S[L],this.S[L]=this.S[O],this.S[O]=te;this.i=0,this.j=0}function Di(){var B;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,B=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=B,this.S[B+this.S[this.i]&255]}xn.prototype.init=zr,xn.prototype.next=Di;function Cn(){return new xn}var mr=256;n.exports={default:u,BigInteger:u,SecureRandom:gr}}).call(O2)}(ju)),ju.exports}var eA,Ep;function HA(){if(Ep)return eA;Ep=1;const n=_2(),a=j2(),{BigInteger:r}=F2(),s=Symbol("big-integer"),o=Symbol("hex-length");class u{constructor(d,p){this[s]=d,this[o]=p}add(d){return new u(this[s].add(d[s]),null)}equals(d){return this[s].equals(d[s])}multiply(d){return new u(this[s].multiply(d[s]),null)}modPow(d,p){return new u(this[s].modPow(d[s],p[s]),p[o])}mod(d){return new u(this[s].mod(d[s]),d[o])}subtract(d){return new u(this[s].subtract(d[s]),this[o])}xor(d){return new u(this[s].xor(d[s]),this[o])}pad(d){if(d<this[o])throw new Error("Cannot pad to a shorter length");return new u(this[s],d)}inspect(){const d=this[s].toString(16);return`<SRPInteger ${d.slice(0,16)}${d.length>16?"...":""}>`}toHex(){if(this[o]===null)throw new Error("This SRPInteger has no specified length");return n(this[s].toString(16),this[o],"0")}}return u.fromHex=function(c){return new u(new r(c,16),c.length)},u.randomInteger=function(c){return u.fromHex(a(c))},u.ZERO=new u(new r("0"),null),eA=u,eA}var tA,bp;function V2(){if(bp)return tA;bp=1;const n=oE(),a=Q2(),r=U2(),s=M2(),o=HA();function u(c){const d=c.reduce((A,E)=>A+E.byteLength,0),p=new Uint8Array(d);return c.reduce((A,E)=>(p.set(new Uint8Array(E),A),A+E.byteLength),0),p.buffer}return tA=function(...d){const p=u(d.map(A=>{if(A instanceof o)return r(A.toHex());if(typeof A=="string")return a(A);throw new TypeError("Expected string or SRPInteger")}));return o.fromHex(n(s(p)))},tA}var vp;function H2(){return vp||(vp=1,function(n){const a=V2(),r=HA(),s={largeSafePrime:`
    AC6BDB41 324A9A9B F166DE5E 1389582F AF72B665 1987EE07 FC319294
    3DB56050 A37329CB B4A099ED 8193E075 7767A13D D52312AB 4B03310D
    CD7F48A9 DA04FD50 E8083969 EDB767B0 CF609517 9A163AB3 661A05FB
    D5FAAAE8 2918A996 2F0B93B8 55F97993 EC975EEA A80D740A DBF4FF74
    7359D041 D5C33EA7 1D281E44 6B14773B CA97B43A 23FB8016 76BD207A
    436C6481 F1D2B907 8717461A 5B9D32E6 88F87748 544523B5 24B0D57D
    5EA77A27 75D2ECFA 032CFBDB F52FB378 61602790 04E57AE6 AF874E73
    03CE5329 9CCC041C 7BC308D8 2A5698F3 A8D0C382 71AE35F8 E9DBFBB6
    94B5C803 D89F7AE4 35DE236D 525F5475 9B65E372 FCD68EF2 0FA7111F
    9E4AFF73
  `,generatorModulo:"02",hashOutputBytes:256/8,paddedLength:512};function o(u){return u.pad(s.paddedLength)}n.N=r.fromHex(s.largeSafePrime.replace(/\s+/g,"")),n.g=r.fromHex(s.generatorModulo.replace(/\s+/g,"")),n.k=a(n.N,o(n.g)),n.H=a,n.PAD=o,n.hashOutputBytes=s.hashOutputBytes}(Yf)),Yf}var wp;function G2(){if(wp)return bi;wp=1;const n=H2(),a=HA();return bi.generateSalt=function(){return a.randomInteger(n.hashOutputBytes).toHex()},bi.derivePrivateKey=function(r,s,o){const{H:u}=n,c=a.fromHex(r),d=String(s),p=String(o);return u(c,u(`${d}:${p}`)).toHex()},bi.deriveVerifier=function(r){const{N:s,g:o}=n,u=a.fromHex(r);return o.modPow(u,s).toHex()},bi.generateEphemeral=function(){const{N:r,g:s}=n,o=a.randomInteger(n.hashOutputBytes),u=s.modPow(o,r);return{secret:o.toHex(),public:u.toHex()}},bi.deriveSession=function(r,s,o,u,c){const{N:d,g:p,k:A,H:E,PAD:v}=n,C=a.fromHex(r),S=a.fromHex(s),k=a.fromHex(o),D=String(u),R=a.fromHex(c),N=p.modPow(C,d);if(S.mod(d).equals(a.ZERO))throw new Error("The server sent an invalid public ephemeral");const U=E(v(N),v(S)),j=S.subtract(A.multiply(p.modPow(R,d))).modPow(C.add(U.multiply(R)),d),P=E(j),V=E(E(d).xor(E(p)),E(D),k,N,S,P);return{key:P.toHex(),proof:V.toHex()}},bi.verifySession=function(r,s,o){const{H:u}=n,c=a.fromHex(r),d=a.fromHex(s.proof),p=a.fromHex(s.key),A=u(c,d,p);if(!a.fromHex(o).equals(A))throw new Error("Server provided session proof is invalid")},bi}var P2=G2();const Vs=Ci(P2);class ro extends Error{constructor(a){super(a),this.name="ApiAuthError"}}class uE{constructor(a){Sa(this,"webApiService");this.webApiService=a}async initiateLogin(a){const r={username:a.toLowerCase().trim()},s=await this.webApiService.rawFetch("Auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(s.status===400){const u=await s.json();throw new ro(u.title)}return await s.json()}async validateLogin(a,r,s,o){const u=Vs.generateEphemeral(),c=Vs.derivePrivateKey(o.salt,a,r),d=Vs.deriveSession(u.secret,o.serverEphemeral,o.salt,a,c),p={username:a.toLowerCase().trim(),rememberMe:s,clientPublicEphemeral:u.public,clientSessionProof:d.proof},A=await this.webApiService.rawFetch("Auth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(A.status===400){const v=await A.json();throw new ro(v.title)}return await A.json()}async validateLogin2Fa(a,r,s,o,u){const c=Vs.generateEphemeral(),d=Vs.derivePrivateKey(o.salt,a,r),p=Vs.deriveSession(c.secret,o.serverEphemeral,o.salt,a,d),A={username:a.toLowerCase().trim(),rememberMe:s,clientPublicEphemeral:c.public,clientSessionProof:p.proof,code2Fa:u},E=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(E.status===400){const C=await E.json();throw new ro(C.title)}return await E.json()}}const z2=()=>{const{t:n}=gt(),a=Ua(),r=Kn(),s=ka(),{setHeaderButtons:o}=dr(),[u,c]=Q.useState({username:"",password:""}),{showLoading:d,hideLoading:p,setIsInitialLoading:A}=Ma(),[E,v]=Q.useState(!0),[C,S]=Q.useState(null),[k,D]=Q.useState(null),[R,N]=Q.useState(null),[U,j]=Q.useState(!1),[P,V]=Q.useState(""),[de,ce]=Q.useState(null),[Z,X]=Q.useState(null),K=fr(),ee=new uE(K),pe=async(Y,ae,xe,Me,G)=>{const re=await K.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ae}`}}),ye=K.validateVaultResponse(re,n);if(ye){X(ye),p();return}await r.setAuthTokens(Y,ae,xe),await s.storeEncryptionKey(Me),await s.storeEncryptionKeyDerivationParams({salt:G.salt,encryptionType:G.encryptionType,encryptionSettings:G.encryptionSettings});const Re=await s.initializeDatabase(re,Me);await r.login();try{if(await Re.hasPendingMigrations()){a("/upgrade",{replace:!0}),p();return}}catch(Ve){await r.logout(),X(Ve instanceof Error?Ve.message:n("auth.errors.migrationError")),p();return}a("/reinitialize",{replace:!0}),p()};Q.useEffect(()=>{(async()=>{const ae=await Ke.getItem("local:clientUrl");let xe=da.DEFAULT_CLIENT_URL;ae&&ae.length>0&&(xe=ae),ce(xe),A(!1)})()},[A]),Q.useEffect(()=>{const Y=Ea.isPopup()?null:h.jsx(h.Fragment,{children:h.jsx(ln,{onClick:()=>Ea.openInNewPopup(),title:"Open in new window",iconType:Xa.EXPAND})});return o(Y),()=>{o(null)}},[o]);const ge=async Y=>{Y.preventDefault(),X(null);try{d(),r.clearGlobalMessage();const ae=await ee.initiateLogin(Ps.normalizeUsername(u.username)),xe=await qt.deriveKeyFromPassword(u.password,ae.salt,ae.encryptionType,ae.encryptionSettings),Me=Zi.Buffer.from(xe).toString("hex").toUpperCase(),G=Zi.Buffer.from(xe).toString("base64"),re=await ee.validateLogin(Ps.normalizeUsername(u.username),Me,E,ae);if(re.requiresTwoFactor){S(ae),D(Me),N(G),j(!0),p();return}if(!re.token)throw new Error(n("auth.errors.noToken"));await pe(Ps.normalizeUsername(u.username),re.token.token,re.token.refreshToken,G,ae)}catch(ae){ae instanceof ro?X(n("common.apiErrors."+ae.message)):X(n("auth.errors.serverError")),p()}},Ne=async Y=>{Y.preventDefault(),X(null);try{if(d(),!k||!R||!C)throw new Error(n("auth.errors.loginDataMissing"));const ae=P.trim();if(!/^\d{6}$/.test(ae))throw new Error(n("auth.errors.invalidCode"));const xe=await ee.validateLogin2Fa(Ps.normalizeUsername(u.username),k,E,C,parseInt(P));if(!xe.token)throw new Error(n("auth.errors.noToken"));await pe(Ps.normalizeUsername(u.username),xe.token.token,xe.token.refreshToken,R,C),j(!1),V(""),D(null),N(null),S(null)}catch(ae){console.error("2FA error:",ae),ae instanceof ro?X(n("common.apiErrors."+ae.message)):X(n("auth.errors.serverError")),p()}},Ee=Y=>{const{name:ae,value:xe}=Y.target;c(Me=>({...Me,[ae]:xe}))};return U?h.jsx("div",{children:h.jsxs("form",{onSubmit:Ne,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[Z&&h.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Z}),h.jsxs("div",{className:"mb-6",children:[h.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:n("auth.twoFactorTitle")}),h.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:n("auth.authCode")}),h.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 leading-tight focus:outline-none focus:shadow-outline",id:"twoFactorCode",type:"text",value:P,onChange:Y=>V(Y.target.value),placeholder:n("auth.authCodePlaceholder"),required:!0})]}),h.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[h.jsx(no,{type:"submit",children:n("auth.verify")}),h.jsx(no,{type:"button",onClick:()=>{c({username:"",password:""}),j(!1),V(""),D(null),N(null),S(null),X(null)},variant:"secondary",children:n("auth.cancel")})]}),h.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:n("auth.twoFactorNote")})]})}):h.jsxs("div",{children:[h.jsxs("form",{onSubmit:ge,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[Z&&h.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Z}),h.jsx("h2",{className:"text-xl font-bold dark:text-gray-200",children:n("auth.loginTitle")}),h.jsx(R2,{}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"username",children:n("auth.username")}),h.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 leading-tight focus:outline-none focus:shadow-outline",id:"username",type:"text",name:"username",placeholder:n("auth.usernamePlaceholder"),value:u.username,onChange:Ee,required:!0})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"password",children:n("auth.password")}),h.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 mb-3 leading-tight focus:outline-none focus:shadow-outline",id:"password",type:"password",name:"password",placeholder:n("auth.passwordPlaceholder"),value:u.password,onChange:Ee,required:!0})]}),h.jsx("div",{className:"mb-6",children:h.jsxs("label",{className:"flex items-center",children:[h.jsx("input",{type:"checkbox",checked:E,onChange:Y=>v(Y.target.checked),className:"mr-2"}),h.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:n("auth.rememberMe")})]})}),h.jsx("div",{className:"flex w-full",children:h.jsx(no,{type:"submit",children:n("auth.loginButton")})})]}),h.jsxs("div",{className:"text-center text-sm text-gray-600 dark:text-gray-400",children:[n("auth.noAccount")," ",h.jsx("a",{href:de??"",target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500",children:n("auth.createVault")})]})]})},q2=()=>{const n=Kn(),a=fr(),r=Ua();return Q.useEffect(()=>{(async()=>{await a.logout(),r("/login")})()},[n,r,a]),null},xp="session:lastVisitedPage",Cp="session:lastVisitedTime",Ip="session:navigationHistory",Y2=120*1e3,K2=()=>{const n=Ua(),{setIsInitialLoading:a}=Ma(),{syncVault:r}=lc(),s=Q.useRef(!1),{isInitialized:o,isLoggedIn:u}=Kn(),{dbInitialized:c,dbAvailable:d}=ka(),p=o&&c,A=p&&(!u||!d),E=Q.useCallback(async()=>{const[v,C,S]=await Promise.all([Ke.getItem(xp),Ke.getItem(Cp),Ke.getItem(Ip)]);if(v&&C&&Date.now()-C<=Y2){if(S!=null&&S.length){n("/credentials",{replace:!0});for(const D of S)n(D.pathname+D.search+D.hash);return}n("/credentials",{replace:!0}),n(v,{replace:!0});return}await Promise.all([Ke.removeItem(xp),Ke.removeItem(Cp),Ke.removeItem(Ip),ta("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),n("/credentials",{replace:!0})},[n]);return Q.useEffect(()=>{const C=new URLSearchParams(window.location.search).get("mode")==="inline_unlock";if(p){const S=!s.current;A?(a(!1),u?d||n("/unlock",{replace:!0}):n("/login",{replace:!0})):S?(s.current=!0,r({initialSync:!1,onSuccess:async()=>{C?(a(!1),n("/unlock-success",{replace:!0})):await E()},onError:k=>{console.error("Vault sync error during initialization:",k),E().then(()=>{a(!1)})},onUpgradeRequired:()=>{n("/upgrade",{replace:!0}),a(!1)}})):(a(!1),E())}},[p,A,u,d,n,a,r,E]),null};var Pp,zp;const J2=(zp=(Pp=globalThis.browser)==null?void 0:Pp.runtime)!=null&&zp.id?globalThis.browser:globalThis.chrome,Wl=J2,Bp="local:theme",cE=Q.createContext(void 0),X2=({children:n})=>{const[a,r]=Q.useState("system"),[s,o]=Q.useState(!1);Q.useEffect(()=>{(async()=>{const E=await c();r(E)})()},[]);const u=Q.useCallback(A=>{r(A),d(A)},[]),c=async()=>await Ke.getItem(Bp)||"system",d=async A=>{await Ke.setItem(Bp,A)};Q.useEffect(()=>{const A=()=>{if(a==="system"){const E=window.matchMedia("(prefers-color-scheme: dark)").matches;o(E),document.documentElement.classList.toggle("dark",E)}else{const E=a==="dark";o(E),document.documentElement.classList.toggle("dark",E)}};if(A(),a==="system"){const E=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>A();return E.addEventListener("change",v),()=>E.removeEventListener("change",v)}},[a]);const p=Q.useMemo(()=>({theme:a,setTheme:u,isDarkMode:s}),[a,s,u]);return h.jsx(cE.Provider,{value:p,children:n})},$2=()=>{const n=Q.useContext(cE);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n},W2=()=>{var j,P;const{t:n}=gt(),{theme:a,setTheme:r}=$2(),s=Kn(),{setHeaderButtons:o}=dr(),{setIsInitialLoading:u}=Ma(),{loadApiUrl:c,getDisplayUrl:d}=lE(),p=Ua(),A=async()=>{const V=await Wl.storage.local.get("clientUrl");let de=da.DEFAULT_CLIENT_URL;V!=null&&V.clientUrl&&V.clientUrl.length>0&&(de=V.clientUrl),window.open(de,"_blank")};Q.useEffect(()=>{const V=h.jsxs("div",{className:"flex items-center gap-2",children:[!Ea.isPopup()&&h.jsx(h.Fragment,{children:h.jsx(ln,{onClick:()=>Ea.openInNewPopup(),title:n("settings.openInNewWindow"),iconType:Xa.EXPAND})}),h.jsx(ln,{onClick:A,title:n("settings.openWebApp"),iconType:Xa.EXTERNAL_LINK})]});return o(V),()=>o(null)},[o,n]);const E=Q.useCallback(async()=>{await c(),u(!1)},[u,c]);Q.useEffect(()=>{E()},[E]);const v=async V=>{r(V)},C=async()=>{const V=navigator.userAgent.toLowerCase(),de=V.includes("firefox"),ce=V.includes("safari")&&!V.includes("chrome");de?await Wl.tabs.create({url:"about:addons"}):ce?await Wl.tabs.create({url:"safari-extension://shortcuts"}):await Wl.tabs.create({url:"chrome://extensions/shortcuts"})},S=async()=>{p("/logout",{replace:!0})},k=()=>{p("/settings/autofill")},D=()=>{p("/settings/clipboard")},R=()=>{p("/settings/language")},N=()=>{p("/settings/auto-lock")},U=()=>{p("/settings/context-menu")};return h.jsxs("div",{className:"space-y-6",children:[h.jsx("div",{className:"flex justify-between items-center mb-4",children:h.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:n("settings.title")})}),h.jsx("section",{children:h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center space-x-3",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:h.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((P=(j=s.username)==null?void 0:j[0])==null?void 0:P.toUpperCase())||"?"})})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:s.username}),h.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n("settings.loggedIn")})]})]}),h.jsx("button",{onClick:S,title:n("settings.logout"),className:"p-2 bg-red-100 hover:bg-red-200 dark:bg-red-900/30 dark:hover:bg-red-900/50 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 rounded-md transition-colors",children:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":n("settings.logout"),children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})})})]})})})}),h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.preferences")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[h.jsxs("button",{onClick:k,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),h.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n("settings.autofillSettings")})]}),h.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),h.jsxs("button",{onClick:U,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),h.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n("settings.contextMenuSettings")})]}),h.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),h.jsxs("button",{onClick:N,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),h.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")})]}),h.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),h.jsxs("button",{onClick:D,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7v8a2 2 0 002 2h6M8 7V5a2 2 0 012-2h4.586a1 1 0 01.707.293l4.414 4.414a1 1 0 01.293.707V15a2 2 0 01-2 2h-2M8 7H6a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2v-2"})}),h.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n("settings.clipboardSettings")})]}),h.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),h.jsxs("button",{onClick:R,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})}),h.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:n("settings.language")})]}),h.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})]}),h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.appearance")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:n("settings.theme")}),h.jsxs("div",{className:"flex flex-col space-y-2",children:[h.jsxs("label",{className:"flex items-center",children:[h.jsx("input",{type:"radio",name:"theme",value:"system",checked:a==="system",onChange:()=>v("system"),className:"mr-2"}),h.jsx("span",{className:"text-xs text-gray-700 dark:text-gray-300",children:n("settings.useDefault")})]}),h.jsxs("label",{className:"flex items-center",children:[h.jsx("input",{type:"radio",name:"theme",value:"light",checked:a==="light",onChange:()=>v("light"),className:"mr-2"}),h.jsx("span",{className:"text-xs text-gray-700 dark:text-gray-300",children:n("settings.light")})]}),h.jsxs("label",{className:"flex items-center",children:[h.jsx("input",{type:"radio",name:"theme",value:"dark",checked:a==="dark",onChange:()=>v("dark"),className:"mr-2"}),h.jsx("span",{className:"text-xs text-gray-700 dark:text-gray-300",children:n("settings.dark")})]})]})]})})})]}),h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.keyboardShortcuts")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{children:h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.configureKeyboardShortcuts")})}),h.jsx("button",{onClick:C,className:"px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-md transition-colors",children:n("settings.configure")})]})})})]}),h.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[n("settings.versionPrefix"),da.VERSION," (",d(),")"]})]})},Ln={username:["username","login","identifier","user"],fullName:["fullname","full-name","full name"],firstName:["firstname","first-name","first_name","fname","name","given-name"],lastName:["lastname","last-name","last_name","lname","surname","family-name"],email:["email","mail","emailaddress"],emailConfirm:["confirm","verification","repeat","retype","verify","email2"],password:["password","pwd","pass"],birthdate:["birthdate","birth-date","dob","date-of-birth"],gender:["gender","sex"],birthDateDay:["birth-day","birthday","day","birthdate_d"],birthDateMonth:["birth-month","birthmonth","month","birthdate_m"],birthDateYear:["birth-year","birthyear","year","birthdate_y"]},aA={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},Z2=new Set(["login","signin","sign","register","signup","account","authentication","password","access","auth","session","authenticate","credentials","logout","signout","portal","dashboard","home","welcome","page","site","secure","member","user","profile","settings","menu","overview","index","main","start","landing","free","create","new","your","special","offer","deal","discount","promotion","newsletter","help","support","contact","about","faq","terms","privacy","cookie","service","services","products","shop","store","cart","checkout","online","web","digital","mobile","my","personal","private","general","default","standard","website","system","admin","administrator","platform","portal","gateway","api","interface","console","today","now","current","latest","newest","recent","the","and","or","but","to","up"]),Rn={username:["gebruikersnaam","gebruiker","login","identifier"],fullName:["volledige naam"],firstName:["voornaam","naam"],lastName:["achternaam"],email:["e-mailadres","e-mail"],emailConfirm:["bevestig","herhaal","verificatie"],password:["wachtwoord","pwd"],birthdate:["geboortedatum","geboorte-datum"],gender:["geslacht","aanhef"],birthDateDay:["dag"],birthDateMonth:["maand"],birthDateYear:["jaar"]},nA={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},eB=new Set(["inloggen","registreren","registratie","aanmelden","inschrijven","uitloggen","wachtwoord","toegang","authenticatie","account","portaal","overzicht","startpagina","welkom","pagina","beveiligd","lid","gebruiker","profiel","instellingen","menu","begin","hoofdpagina","gratis","nieuw","jouw","schrijf","nieuwsbrief","aanbieding","korting","speciaal","actie","hulp","ondersteuning","contact","over","voorwaarden","privacy","cookie","dienst","diensten","producten","winkel","bestellen","winkelwagen","online","web","digitaal","mobiel","mijn","persoonlijk","privé","algemeen","standaard","systeem","beheer","beheerder","platform","portaal","interface","console","vandaag","nu","huidig","recent","nieuwste","je","in","op","de","van","ons","allemaal"]);[...new Set([...Ln.username,...Rn.username])],[...new Set([...Ln.fullName,...Rn.fullName])],[...new Set([...Ln.firstName,...Rn.firstName])],[...new Set([...Ln.lastName,...Rn.lastName])],[...new Set([...Rn.email,...Ln.email])],[...new Set([...Ln.emailConfirm,...Rn.emailConfirm])],[...new Set([...Ln.password,...Rn.password])],[...new Set([...Ln.birthdate,...Rn.birthdate])],[...new Set([...Ln.gender,...Rn.gender])],[...new Set([...Ln.birthDateDay,...Rn.birthDateDay])],[...new Set([...Ln.birthDateMonth,...Rn.birthDateMonth])],[...new Set([...Ln.birthDateYear,...Rn.birthDateYear])];[...new Set([...aA.male,...nA.male])],[...new Set([...aA.female,...nA.female])],[...new Set([...aA.other,...nA.other])];[...Z2,...eB];var zs=(n=>(n.DEFAULT="default",n.URL_EXACT="url_exact",n.URL_SUBDOMAIN="url_subdomain",n))(zs||{});const tB=()=>{const{t:n}=gt(),{setIsInitialLoading:a}=Ma(),[r,s]=Q.useState({disabledUrls:[],temporaryDisabledUrls:{},currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),[o,u]=Q.useState(zs.DEFAULT),c=async()=>{const C={active:!0,currentWindow:!0},[S]=await Wl.tabs.query(C);return S},d=Q.useCallback(async()=>{const C=await c(),S=new URL(C.url??"").hostname,k=await Ke.getItem(Qu)??[],D=await Ke.getItem(xu)??{},R=await Ke.getItem(Gu)!==!1,N=Date.now(),U=Object.fromEntries(Object.entries(D).filter(([P,V])=>V>N));Object.keys(U).length!==Object.keys(D).length&&await Ke.setItem(xu,U);const j=await Ke.getItem(Q0)??zs.DEFAULT;u(j),s({disabledUrls:k,temporaryDisabledUrls:U,currentUrl:S,isEnabled:!k.includes(S)&&!(S in U),isGloballyEnabled:R}),a(!1)},[a]);Q.useEffect(()=>{d()},[d]);const p=async()=>{const{currentUrl:C,disabledUrls:S,temporaryDisabledUrls:k,isEnabled:D}=r;let R=[...S],N={...k};D?(R.includes(C)||R.push(C),delete N[C]):(R=R.filter(U=>U!==C),delete N[C]),await Ke.setItem(Qu,R),await Ke.setItem(xu,N),s(U=>({...U,disabledUrls:R,temporaryDisabledUrls:N,isEnabled:!D}))},A=async()=>{await Ke.setItem(Qu,[]),await Ke.setItem(xu,{}),s(C=>({...C,disabledUrls:[],temporaryDisabledUrls:{},isEnabled:!0}))},E=async()=>{const C=!r.isGloballyEnabled;await Ke.setItem(Gu,C),s(S=>({...S,isGloballyEnabled:C}))},v=async C=>{await Ke.setItem(Q0,C),u(C)};return h.jsxs("div",{className:"space-y-6",children:[h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.globalSettings")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.autofillPopup")}),h.jsx("p",{className:`text-xs mt-1 ${r.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r.isGloballyEnabled?n("settings.activeOnAllSites"):n("settings.disabledOnAllSites")})]}),h.jsx("button",{onClick:E,className:`px-4 py-2 rounded-md transition-colors ${r.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isGloballyEnabled?n("settings.enabled"):n("settings.disabled")})]})})})]}),r.isGloballyEnabled&&h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.siteSpecificSettings")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsxs("div",{className:"p-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[n("settings.autofillPopupOn"),r.currentUrl]}),h.jsx("p",{className:`text-xs mt-1 ${r.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r.isEnabled?n("settings.enabledForThisSite"):n("settings.disabledForThisSite")}),!r.isEnabled&&r.temporaryDisabledUrls[r.currentUrl]&&h.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[n("settings.temporarilyDisabledUntil"),new Date(r.temporaryDisabledUrls[r.currentUrl]).toLocaleTimeString()]})]}),r.isGloballyEnabled&&h.jsx("button",{onClick:p,className:`px-4 py-2 ml-1 rounded-md transition-colors ${r.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r.isEnabled?n("settings.enabled"):n("settings.disabled")})]}),h.jsx("div",{className:"mt-4",children:h.jsx("button",{onClick:A,className:"w-full px-4 py-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md text-gray-700 dark:text-gray-300 transition-colors text-sm",children:n("settings.resetAllSiteSettings")})})]})})]}),h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autofillMatching")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:n("settings.autofillMatchingMode")}),h.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autofillMatchingModeDescription")}),h.jsxs("select",{value:o,onChange:C=>v(C.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[h.jsx("option",{value:zs.DEFAULT,children:n("settings.autofillMatchingDefault")}),h.jsx("option",{value:zs.URL_SUBDOMAIN,children:n("settings.autofillMatchingUrlSubdomain")}),h.jsx("option",{value:zs.URL_EXACT,children:n("settings.autofillMatchingUrlExact")})]})]})})})]})]})},aB=({titleKey:n,contentKey:a,className:r=""})=>{const{t:s}=gt(),[o,u]=Q.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>u(!0),className:`${r}`,type:"button","aria-label":"Help",children:h.jsx("svg",{className:"w-4 h-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 cursor-help",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o&&h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:h.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-sm w-full",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:s(n)}),h.jsx("button",{onClick:()=>u(!1),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":s("common.close"),children:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),h.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:s(a)}),h.jsx("button",{onClick:()=>u(!1),className:"mt-4 w-full px-4 py-2 bg-primary-600 hover:bg-primary-700 text-white rounded-md transition-colors",children:s("common.close")})]})})]})},nB=()=>{const{t:n}=gt(),{setIsInitialLoading:a}=Ma(),[r,s]=Q.useState(0);Q.useEffect(()=>{(async()=>{const c=await Ke.getItem(R0)??0;s(c),a(!1)})()},[a]);const o=async u=>{await Ke.setItem(R0,u),await ta("SET_AUTO_LOCK_TIMEOUT",u,"background"),s(u)};return h.jsx("div",{className:"space-y-6",children:h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.autoLockTimeout")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center mb-2",children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.autoLockTimeout")}),h.jsx(aB,{titleKey:"settings.autoLockTimeout",contentKey:"settings.autoLockTimeoutHelp",className:"ml-2"})]}),h.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:n("settings.autoLockTimeoutDescription")}),h.jsxs("select",{value:r,onChange:u=>o(Number(u.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[h.jsx("option",{value:"0",children:n("settings.autoLockNever")}),h.jsx("option",{value:"15",children:n("settings.autoLock15Seconds")}),h.jsx("option",{value:"60",children:n("settings.autoLock1Minute")}),h.jsx("option",{value:"300",children:n("settings.autoLock5Minutes")}),h.jsx("option",{value:"900",children:n("settings.autoLock15Minutes")}),h.jsx("option",{value:"1800",children:n("settings.autoLock30Minutes")}),h.jsx("option",{value:"3600",children:n("settings.autoLock1Hour")}),h.jsx("option",{value:"14400",children:n("settings.autoLock4Hours")}),h.jsx("option",{value:"28800",children:n("settings.autoLock8Hours")}),h.jsx("option",{value:"86400",children:n("settings.autoLock24Hours")})]})]})})})]})})},rB=()=>{const{t:n}=gt(),{setIsInitialLoading:a}=Ma(),[r,s]=Q.useState(10);Q.useEffect(()=>{(async()=>{const c=await Ke.getItem(L0)??10;s(c),a(!1)})()},[a]);const o=async u=>{await Ke.setItem(L0,u),await ta("SET_CLIPBOARD_CLEAR_TIMEOUT",u,"background"),s(u)};return h.jsx("div",{className:"space-y-6",children:h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.clipboardSettings")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:n("settings.clipboardClearTimeout")}),h.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:n("settings.clipboardClearTimeoutDescription")}),h.jsxs("select",{value:r,onChange:u=>o(Number(u.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[h.jsx("option",{value:"0",children:n("settings.clipboardClearDisabled")}),h.jsx("option",{value:"5",children:n("settings.clipboardClear5Seconds")}),h.jsx("option",{value:"10",children:n("settings.clipboardClear10Seconds")}),h.jsx("option",{value:"15",children:n("settings.clipboardClear15Seconds")})]})]})})})]})})},iB=()=>{const{t:n}=gt(),{setIsInitialLoading:a}=Ma(),[r,s]=Q.useState(!0),o=Q.useCallback(async()=>{const c=await Ke.getItem(D0)!==!1;s(c),a(!1)},[a]);Q.useEffect(()=>{o()},[o]);const u=async()=>{const c=!r;await Ke.setItem(D0,c),await ta("TOGGLE_CONTEXT_MENU",{enabled:c},"background"),s(c)};return h.jsx("div",{className:"space-y-6",children:h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.contextMenu")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n("settings.rightClickContextMenu")}),h.jsx("p",{className:`text-xs mt-1 ${r?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n(r?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),h.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-2",children:n("settings.contextMenuDescription")})]}),h.jsx("button",{onClick:u,className:`px-4 py-2 rounded-md transition-colors ${r?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n(r?"settings.enabled":"settings.disabled")})]})})})]})})},sB=()=>{const{t:n}=gt();return h.jsx("div",{className:"space-y-6",children:h.jsxs("section",{children:[h.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:n("settings.language")}),h.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:n("settings.selectLanguage")}),h.jsx(Ty,{variant:"dropdown",size:"sm"})]})})})]})})},lB=()=>{var R,N;const{t:n}=gt(),a=Kn(),r=ka(),s=Ua(),{setHeaderButtons:o}=dr(),u=fr(),c=new uE(u),[d,p]=Q.useState(""),[A,E]=Q.useState(null),{showLoading:v,hideLoading:C,setIsInitialLoading:S}=Ma();Q.useEffect(()=>{(async()=>{const j=await u.getStatus(),P=u.validateStatusResponse(j);P!==null&&(await u.logout(n("common.errors."+P)),s("/logout")),S(!1)})()},[u,a,S,s,n]),Q.useEffect(()=>{const U=Ea.isPopup()?null:h.jsx(ln,{onClick:()=>Ea.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Xa.EXPAND});return o(U),()=>{o(null)}},[o,n]);const k=async U=>{U.preventDefault(),E(null),v();try{const j=await c.initiateLogin(a.username),P=await qt.deriveKeyFromPassword(d,j.salt,j.encryptionType,j.encryptionSettings),V=await u.get("Vault"),de=u.validateVaultResponse(V,n);if(de){E(n("common.apiErrors."+de)),C();return}const ce=Zi.Buffer.from(P).toString("base64");await r.storeEncryptionKey(ce),await r.initializeDatabase(V,ce),await Ke.setItem(Pu,0),s("/reinitialize",{replace:!0})}catch(j){E(n("auth.errors.wrongPassword")),console.error("Unlock error:",j)}finally{C()}},D=()=>{s("/logout",{replace:!0})};return h.jsx("div",{children:h.jsxs("form",{onSubmit:k,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[h.jsxs("div",{className:"flex items-center space-x-3 mb-6",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:h.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((N=(R=a.username)==null?void 0:R[0])==null?void 0:N.toUpperCase())||"?"})})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:a.username}),h.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n("auth.loggedIn")})]})]}),h.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:n("auth.unlockTitle")}),A&&h.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:A}),h.jsxs("div",{className:"mb-2",children:[h.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"password",children:n("auth.masterPassword")}),h.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 mb-3 leading-tight focus:outline-none focus:shadow-outline",id:"password",type:"password",value:d,onChange:U=>p(U.target.value),placeholder:n("auth.passwordPlaceholder"),required:!0,autoFocus:!0})]}),h.jsx(no,{type:"submit",children:n("auth.unlockVault")}),h.jsxs("div",{className:"text-sm font-medium text-gray-500 dark:text-gray-200 mt-6",children:[n("auth.switchAccounts")," ",h.jsx("button",{onClick:D,className:"text-primary-700 hover:underline dark:text-primary-500",children:n("auth.logout")})]})]})})},oB=()=>{const n=Ua(),{t:a}=gt(),r=()=>{const s=new URL(window.location.href);s.searchParams.delete("mode"),window.history.replaceState({},"",s),n("/credentials")};return h.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[h.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:h.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),h.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:a("auth.unlockSuccessTitle")}),h.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:a("auth.unlockSuccessDescription")}),h.jsxs("div",{className:"space-y-3 w-full",children:[h.jsx("button",{onClick:()=>window.close(),className:"w-full px-4 py-2 text-white bg-primary-600 rounded hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",children:a("auth.closePopup")}),h.jsx("button",{onClick:r,className:"w-full px-4 py-2 text-gray-700 bg-gray-100 rounded hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",children:a("auth.browseVault")})]})]})},uB=()=>{var Ne;const{t:n}=gt(),{username:a}=Kn(),r=ka(),{sqliteClient:s}=r,{setHeaderButtons:o}=dr(),[u,c]=Q.useState(!1),[d,p]=Q.useState(null),[A,E]=Q.useState(null),[v,C]=Q.useState(null),[S,k]=Q.useState(!1),[D,R]=Q.useState(!1),{setIsInitialLoading:N}=Ma(),U=fr(),{executeVaultMutation:j,isLoading:P,syncStatus:V}=Hy(),{syncVault:de}=lc(),ce=Ua();Q.useEffect(()=>{const Ee=Ea.isPopup()?null:h.jsx(h.Fragment,{children:h.jsx(ln,{onClick:()=>Ea.openInNewPopup(),title:n("common.openInNewWindow"),iconType:Xa.EXPAND})});return o(Ee),()=>{o(null)}},[o,n]);const Z=Q.useCallback(async()=>{try{if(s){const Ee=s.getDatabaseVersion(),Y=await s.getLatestDatabaseVersion();p(Ee),E(Y)}N(!1)}catch(Ee){console.error("Failed to load version information:",Ee),C(n("upgrade.alerts.unableToGetVersionInfo"))}},[s,N,n]);Q.useEffect(()=>{Z()},[Z]);const X=async()=>{if(!s||!d||!A){C(n("upgrade.alerts.unableToGetVersionInfo"));return}if(await U.isSelfHosted()){k(!0);return}await K()},K=async()=>{if(!s||!d||!A){C(n("upgrade.alerts.unableToGetVersionInfo"));return}c(!0),C(null);try{const Y=new fA().getUpgradeVaultSql(d.revision,A.revision);if(!Y.success)throw new Error(Y.error??n("upgrade.alerts.upgradeFailed"));if(Y.sqlCommands.length===0){await ee();return}await j(async()=>{s.beginTransaction();for(let ae=0;ae<Y.sqlCommands.length;ae++){const xe=Y.sqlCommands[ae];try{s.executeRaw(xe)}catch(Me){throw console.error(`Error executing SQL command ${ae+1}:`,xe,Me),s.rollbackTransaction(),new Error(n("upgrade.alerts.failedToApplyMigration",{current:ae+1,total:Y.sqlCommands.length}))}}s.commitTransaction()},{skipSyncCheck:!0,onSuccess:()=>{ee()},onError:ae=>{console.error("Upgrade failed:",ae),C(ae.message)}}),console.debug("executeVaultMutation done?")}catch(Ee){console.error("Upgrade failed:",Ee),C(Ee instanceof Error?Ee.message:n("upgrade.alerts.unknownErrorDuringUpgrade"))}finally{c(!1)}},ee=async()=>{try{await de({onSuccess:()=>{ce("/credentials")},onError:Ee=>{console.error("Sync error after upgrade:",Ee),ce("/credentials")}})}catch(Ee){console.error("Error during post-upgrade sync:",Ee),ce("/credentials")}},pe=async()=>{ce("/logout")},ge=()=>{R(!0)};return h.jsxs("div",{children:[(u||P)&&h.jsxs("div",{className:"fixed inset-0 flex flex-col justify-center items-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-50",children:[h.jsx($s,{}),h.jsx("div",{className:"text-sm text-gray-500 mt-2",children:V||n("upgrade.upgrading")})]}),h.jsx($u,{isOpen:S,onClose:()=>k(!1),onConfirm:()=>{k(!1),K()},title:n("upgrade.alerts.selfHostedServer"),message:n("upgrade.alerts.selfHostedWarning"),confirmText:n("upgrade.alerts.continueUpgrade"),cancelText:n("upgrade.alerts.cancel")}),h.jsx($u,{isOpen:D,onClose:()=>R(!1),onConfirm:()=>R(!1),title:n("upgrade.whatsNew"),message:`${n("upgrade.whatsNewDescription")}

${(A==null?void 0:A.description)??n("upgrade.noDescriptionAvailable")}`}),h.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[v&&h.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:v}),h.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:h.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((Ne=a==null?void 0:a[0])==null?void 0:Ne.toUpperCase())||"?"})})}),h.jsx("div",{children:h.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:a})})]}),h.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:n("upgrade.title")}),h.jsxs("div",{className:"mb-6",children:[h.jsx("p",{className:"text-gray-700 dark:text-gray-200 text-sm mb-4",children:n("upgrade.subtitle")}),h.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-200",children:n("upgrade.versionInformation")}),h.jsx("button",{type:"button",onClick:ge,className:"bg-gray-200 dark:bg-gray-600 text-gray-800 dark:text-gray-200 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold hover:bg-gray-300 dark:hover:bg-gray-500",title:n("upgrade.whatsNew"),children:"?"})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.yourVault")}),h.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(d==null?void 0:d.releaseVersion)??"..."})]}),h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:n("upgrade.newVersion")}),h.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(A==null?void 0:A.releaseVersion)??"..."})]})]})]})]}),h.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[h.jsx(no,{type:"button",onClick:X,children:u||P?V||n("upgrade.upgrading"):n("upgrade.upgrade")}),h.jsx("button",{type:"button",onClick:pe,className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 text-sm font-medium py-2",disabled:u||P,children:n("upgrade.logout")})]})]})]})},cB=()=>{const{t:n}=gt(),a=Kn(),{isInitialLoading:r}=Ma(),[s,o]=dc(!0,150),[u,c]=Q.useState(null),{headerButtons:d}=dr(),p=En.useMemo(()=>[{path:"/",element:h.jsx(L2,{}),showBackButton:!1},{path:"/reinitialize",element:h.jsx(K2,{}),showBackButton:!1},{path:"/login",element:h.jsx(z2,{}),showBackButton:!1},{path:"/unlock",element:h.jsx(lB,{}),showBackButton:!1},{path:"/unlock-success",element:h.jsx(oB,{}),showBackButton:!1},{path:"/upgrade",element:h.jsx(uB,{}),showBackButton:!1},{path:"/auth-settings",element:h.jsx(w1,{}),showBackButton:!0,title:n("settings.title")},{path:"/credentials",element:h.jsx(N2,{}),showBackButton:!1},{path:"/credentials/add",element:h.jsx(rp,{}),showBackButton:!0,title:n("credentials.addCredential")},{path:"/credentials/:id",element:h.jsx(B2,{}),showBackButton:!0,title:n("credentials.credentialDetails")},{path:"/credentials/:id/edit",element:h.jsx(rp,{}),showBackButton:!0,title:n("credentials.editCredential")},{path:"/emails",element:h.jsx(D2,{}),showBackButton:!1},{path:"/emails/:id",element:h.jsx(T2,{}),showBackButton:!0,title:n("emails.title")},{path:"/settings",element:h.jsx(W2,{}),showBackButton:!1},{path:"/settings/autofill",element:h.jsx(tB,{}),showBackButton:!0,title:n("settings.autofillSettings")},{path:"/settings/context-menu",element:h.jsx(iB,{}),showBackButton:!0,title:n("settings.contextMenuSettings")},{path:"/settings/clipboard",element:h.jsx(rB,{}),showBackButton:!0,title:n("settings.clipboardSettings")},{path:"/settings/language",element:h.jsx(sB,{}),showBackButton:!0,title:n("settings.language")},{path:"/settings/auto-lock",element:h.jsx(nB,{}),showBackButton:!0,title:n("settings.autoLockTimeout")},{path:"/logout",element:h.jsx(q2,{}),showBackButton:!1}],[n]);return Q.useEffect(()=>{r||o(!1)},[r,o]),Q.useEffect(()=>{ta("POPUP_HEARTBEAT",{},"background").catch(()=>{});const A=setInterval(()=>{ta("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(A)}},[]),Q.useEffect(()=>{a.globalMessage?c(a.globalMessage):c(null)},[a,a.globalMessage]),h.jsx(Nw,{children:h.jsx(_x,{children:h.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[s&&h.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:h.jsx($s,{})}),h.jsx(sx,{}),h.jsx(Tx,{routes:p,rightButtons:d}),h.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"calc(100% - 120px)"},children:h.jsxs("div",{className:"p-4 mb-16",children:[u&&h.jsx("p",{className:"text-red-500 mb-4",children:u}),h.jsx(rw,{children:p.map(A=>h.jsx(ry,{path:A.path,element:A.element},A.path))})]})}),h.jsx(lx,{})]})})})},it=n=>typeof n=="string",$l=()=>{let n,a;const r=new Promise((s,o)=>{n=s,a=o});return r.resolve=n,r.reject=a,r},Sp=n=>n==null?"":""+n,dB=(n,a,r)=>{n.forEach(s=>{a[s]&&(r[s]=a[s])})},fB=/###/g,Np=n=>n&&n.indexOf("###")>-1?n.replace(fB,"."):n,kp=n=>!n||it(n),io=(n,a,r)=>{const s=it(a)?a.split("."):a;let o=0;for(;o<s.length-1;){if(kp(n))return{};const u=Np(s[o]);!n[u]&&r&&(n[u]=new r),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++o}return kp(n)?{}:{obj:n,k:Np(s[o])}},Tp=(n,a,r)=>{const{obj:s,k:o}=io(n,a,Object);if(s!==void 0||a.length===1){s[o]=r;return}let u=a[a.length-1],c=a.slice(0,a.length-1),d=io(n,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=io(n,c,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=r},AB=(n,a,r,s)=>{const{obj:o,k:u}=io(n,a,Object);o[u]=o[u]||[],o[u].push(r)},ec=(n,a)=>{const{obj:r,k:s}=io(n,a);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},hB=(n,a,r)=>{const s=ec(n,r);return s!==void 0?s:ec(a,r)},dE=(n,a,r)=>{for(const s in a)s!=="__proto__"&&s!=="constructor"&&(s in n?it(n[s])||n[s]instanceof String||it(a[s])||a[s]instanceof String?r&&(n[s]=a[s]):dE(n[s],a[s],r):n[s]=a[s]);return n},Hs=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var gB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const mB=n=>it(n)?n.replace(/[&<>"'\/]/g,a=>gB[a]):n;class pB{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const r=this.regExpMap.get(a);if(r!==void 0)return r;const s=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,s),this.regExpQueue.push(a),s}}const yB=[" ",",","?","!",";"],EB=new pB(20),bB=(n,a,r)=>{a=a||"",r=r||"";const s=yB.filter(c=>a.indexOf(c)<0&&r.indexOf(c)<0);if(s.length===0)return!0;const o=EB.getRegExp(`(${s.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!o.test(n);if(!u){const c=n.indexOf(r);c>0&&!o.test(n.substring(0,c))&&(u=!0)}return u},bA=(n,a,r=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const s=a.split(r);let o=n;for(let u=0;u<s.length;){if(!o||typeof o!="object")return;let c,d="";for(let p=u;p<s.length;++p)if(p!==u&&(d+=r),d+=s[p],c=o[d],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&p<s.length-1)continue;u+=p-u+1;break}o=c}return o},lo=n=>n==null?void 0:n.replace("_","-"),vB={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){var r,s;(s=(r=console==null?void 0:console[n])==null?void 0:r.apply)==null||s.call(r,console,a)}};class tc{constructor(a,r={}){this.init(a,r)}init(a,r={}){this.prefix=r.prefix||"i18next:",this.logger=a||vB,this.options=r,this.debug=r.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,r,s,o){return o&&!this.debug?null:(it(a[0])&&(a[0]=`${s}${this.prefix} ${a[0]}`),this.logger[r](a))}create(a){return new tc(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new tc(this.logger,a)}}var ur=new tc;class fc{constructor(){this.observers={}}on(a,r){return a.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const o=this.observers[s].get(r)||0;this.observers[s].set(r,o+1)}),this}off(a,r){if(this.observers[a]){if(!r){delete this.observers[a];return}this.observers[a].delete(r)}}emit(a,...r){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([o,u])=>{for(let c=0;c<u;c++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,u])=>{for(let c=0;c<u;c++)o.apply(o,[a,...r])})}}class Dp extends fc{constructor(a,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const r=this.options.ns.indexOf(a);r>-1&&this.options.ns.splice(r,1)}getResource(a,r,s,o={}){var A,E;const u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;a.indexOf(".")>-1?d=a.split("."):(d=[a,r],s&&(Array.isArray(s)?d.push(...s):it(s)&&u?d.push(...s.split(u)):d.push(s)));const p=ec(this.data,d);return!p&&!r&&!s&&a.indexOf(".")>-1&&(a=d[0],r=d[1],s=d.slice(2).join(".")),p||!c||!it(s)?p:bA((E=(A=this.data)==null?void 0:A[a])==null?void 0:E[r],s,u)}addResource(a,r,s,o,u={silent:!1}){const c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[a,r];s&&(d=d.concat(c?s.split(c):s)),a.indexOf(".")>-1&&(d=a.split("."),o=r,r=d[1]),this.addNamespaces(r),Tp(this.data,d,o),u.silent||this.emit("added",a,r,s,o)}addResources(a,r,s,o={silent:!1}){for(const u in s)(it(s[u])||Array.isArray(s[u]))&&this.addResource(a,r,u,s[u],{silent:!0});o.silent||this.emit("added",a,r,s)}addResourceBundle(a,r,s,o,u,c={silent:!1,skipCopy:!1}){let d=[a,r];a.indexOf(".")>-1&&(d=a.split("."),o=s,s=r,r=d[1]),this.addNamespaces(r);let p=ec(this.data,d)||{};c.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?dE(p,s,u):p={...p,...s},Tp(this.data,d,p),c.silent||this.emit("added",a,r,s)}removeResourceBundle(a,r){this.hasResourceBundle(a,r)&&delete this.data[a][r],this.removeNamespaces(r),this.emit("removed",a,r)}hasResourceBundle(a,r){return this.getResource(a,r)!==void 0}getResourceBundle(a,r){return r||(r=this.options.defaultNS),this.getResource(a,r)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const r=this.getDataByLanguage(a);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var fE={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,r,s,o){return n.forEach(u=>{var c;a=((c=this.processors[u])==null?void 0:c.process(a,r,s,o))??a}),a}};const Lp={},Rp=n=>!it(n)&&typeof n!="boolean"&&typeof n!="number";class ac extends fc{constructor(a,r={}){super(),dB(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ur.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,r={interpolation:{}}){const s={...r};if(a==null)return!1;const o=this.resolve(a,s);return(o==null?void 0:o.res)!==void 0}extractFromKey(a,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let u=r.ns||this.options.defaultNS||[];const c=s&&a.indexOf(s)>-1,d=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!bB(a,s,o);if(c&&!d){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:it(u)?[u]:u};const A=a.split(s);(s!==o||s===o&&this.options.ns.indexOf(A[0])>-1)&&(u=A.shift()),a=A.join(o)}return{key:a,namespaces:it(u)?[u]:u}}translate(a,r,s){let o=typeof r=="object"?{...r}:r;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);const u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(a[a.length-1],o),A=p[p.length-1];let E=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;E===void 0&&(E=":");const v=o.lng||this.language,C=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((v==null?void 0:v.toLowerCase())==="cimode")return C?u?{res:`${A}${E}${d}`,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:A,usedParams:this.getUsedParamsDetails(o)}:`${A}${E}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:A,usedParams:this.getUsedParamsDetails(o)}:d;const S=this.resolve(a,o);let k=S==null?void 0:S.res;const D=(S==null?void 0:S.usedKey)||d,R=(S==null?void 0:S.exactUsedKey)||d,N=["[object Number]","[object Function]","[object RegExp]"],U=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,P=o.count!==void 0&&!it(o.count),V=ac.hasDefaultValue(o),de=P?this.pluralResolver.getSuffix(v,o.count,o):"",ce=o.ordinal&&P?this.pluralResolver.getSuffix(v,o.count,{ordinal:!1}):"",Z=P&&!o.ordinal&&o.count===0,X=Z&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${de}`]||o[`defaultValue${ce}`]||o.defaultValue;let K=k;j&&!k&&V&&(K=X);const ee=Rp(K),pe=Object.prototype.toString.apply(K);if(j&&K&&ee&&N.indexOf(pe)<0&&!(it(U)&&Array.isArray(K))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ge=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,K,{...o,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(S.res=ge,S.usedParams=this.getUsedParamsDetails(o),S):ge}if(c){const ge=Array.isArray(K),Ne=ge?[]:{},Ee=ge?R:D;for(const Y in K)if(Object.prototype.hasOwnProperty.call(K,Y)){const ae=`${Ee}${c}${Y}`;V&&!k?Ne[Y]=this.translate(ae,{...o,defaultValue:Rp(X)?X[Y]:void 0,joinArrays:!1,ns:p}):Ne[Y]=this.translate(ae,{...o,joinArrays:!1,ns:p}),Ne[Y]===ae&&(Ne[Y]=K[Y])}k=Ne}}else if(j&&it(U)&&Array.isArray(k))k=k.join(U),k&&(k=this.extendTranslation(k,a,o,s));else{let ge=!1,Ne=!1;!this.isValidLookup(k)&&V&&(ge=!0,k=X),this.isValidLookup(k)||(Ne=!0,k=d);const Y=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Ne?void 0:k,ae=V&&X!==k&&this.options.updateMissing;if(Ne||ge||ae){if(this.logger.log(ae?"updateKey":"missingKey",v,A,d,ae?X:k),c){const re=this.resolve(d,{...o,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let xe=[];const Me=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Me&&Me[0])for(let re=0;re<Me.length;re++)xe.push(Me[re]);else this.options.saveMissingTo==="all"?xe=this.languageUtils.toResolveHierarchy(o.lng||this.language):xe.push(o.lng||this.language);const G=(re,ye,Re)=>{var Je;const Ve=V&&Re!==k?Re:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(re,A,ye,Ve,ae,o):(Je=this.backendConnector)!=null&&Je.saveMissing&&this.backendConnector.saveMissing(re,A,ye,Ve,ae,o),this.emit("missingKey",re,A,ye,k)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?xe.forEach(re=>{const ye=this.pluralResolver.getSuffixes(re,o);Z&&o[`defaultValue${this.options.pluralSeparator}zero`]&&ye.indexOf(`${this.options.pluralSeparator}zero`)<0&&ye.push(`${this.options.pluralSeparator}zero`),ye.forEach(Re=>{G([re],d+Re,o[`defaultValue${Re}`]||X)})}):G(xe,d,X))}k=this.extendTranslation(k,a,o,S,s),Ne&&k===d&&this.options.appendNamespaceToMissingKey&&(k=`${A}${E}${d}`),(Ne||ge)&&this.options.parseMissingKeyHandler&&(k=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${A}${E}${d}`:d,ge?k:void 0,o))}return u?(S.res=k,S.usedParams=this.getUsedParamsDetails(o),S):k}extendTranslation(a,r,s,o,u){var p,A;if((p=this.i18nFormat)!=null&&p.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const E=it(a)&&(((A=s==null?void 0:s.interpolation)==null?void 0:A.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(E){const S=a.match(this.interpolator.nestingRegexp);v=S&&S.length}let C=s.replace&&!it(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),a=this.interpolator.interpolate(a,C,s.lng||this.language||o.usedLng,s),E){const S=a.match(this.interpolator.nestingRegexp),k=S&&S.length;v<k&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),s.nest!==!1&&(a=this.interpolator.nest(a,(...S)=>(u==null?void 0:u[0])===S[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${r[0]}`),null):this.translate(...S,r),s)),s.interpolation&&this.interpolator.reset()}const c=s.postProcess||this.options.postProcess,d=it(c)?[c]:c;return a!=null&&(d!=null&&d.length)&&s.applyPostProcessor!==!1&&(a=fE.handle(d,a,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),a}resolve(a,r={}){let s,o,u,c,d;return it(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(s))return;const A=this.extractFromKey(p,r),E=A.key;o=E;let v=A.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const C=r.count!==void 0&&!it(r.count),S=C&&!r.ordinal&&r.count===0,k=r.context!==void 0&&(it(r.context)||typeof r.context=="number")&&r.context!=="",D=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);v.forEach(R=>{var N,U;this.isValidLookup(s)||(d=R,!Lp[`${D[0]}-${R}`]&&((N=this.utils)!=null&&N.hasLoadedNamespace)&&!((U=this.utils)!=null&&U.hasLoadedNamespace(d))&&(Lp[`${D[0]}-${R}`]=!0,this.logger.warn(`key "${o}" for languages "${D.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),D.forEach(j=>{var de;if(this.isValidLookup(s))return;c=j;const P=[E];if((de=this.i18nFormat)!=null&&de.addLookupKeys)this.i18nFormat.addLookupKeys(P,E,j,R,r);else{let ce;C&&(ce=this.pluralResolver.getSuffix(j,r.count,r));const Z=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(P.push(E+ce),r.ordinal&&ce.indexOf(X)===0&&P.push(E+ce.replace(X,this.options.pluralSeparator)),S&&P.push(E+Z)),k){const K=`${E}${this.options.contextSeparator}${r.context}`;P.push(K),C&&(P.push(K+ce),r.ordinal&&ce.indexOf(X)===0&&P.push(K+ce.replace(X,this.options.pluralSeparator)),S&&P.push(K+Z))}}let V;for(;V=P.pop();)this.isValidLookup(s)||(u=V,s=this.getResource(j,R,V,r))}))})}),{res:s,usedKey:o,exactUsedKey:u,usedLng:c,usedNS:d}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,r,s,o={}){var u;return(u=this.i18nFormat)!=null&&u.getResource?this.i18nFormat.getResource(a,r,s,o):this.resourceStore.getResource(a,r,s,o)}getUsedParamsDetails(a={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=a.replace&&!it(a.replace);let o=s?a.replace:a;if(s&&typeof a.count<"u"&&(o.count=a.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const u of r)delete o[u]}return o}static hasDefaultValue(a){const r="defaultValue";for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)&&r===s.substring(0,r.length)&&a[s]!==void 0)return!0;return!1}}class Qp{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ur.create("languageUtils")}getScriptPartFromCode(a){if(a=lo(a),!a||a.indexOf("-")<0)return null;const r=a.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(a){if(a=lo(a),!a||a.indexOf("-")<0)return a;const r=a.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(a){if(it(a)&&a.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(a)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let r;return a.forEach(s=>{if(r)return;const o=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&a.forEach(s=>{if(r)return;const o=this.getScriptPartFromCode(s);if(this.isSupportedCode(o))return r=o;const u=this.getLanguagePartFromCode(s);if(this.isSupportedCode(u))return r=u;r=this.options.supportedLngs.find(c=>{if(c===u)return c;if(!(c.indexOf("-")<0&&u.indexOf("-")<0)&&(c.indexOf("-")>0&&u.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===u||c.indexOf(u)===0&&u.length>1))return c})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(a,r){if(!a)return[];if(typeof a=="function"&&(a=a(r)),it(a)&&(a=[a]),Array.isArray(a))return a;if(!r)return a.default||[];let s=a[r];return s||(s=a[this.getScriptPartFromCode(r)]),s||(s=a[this.formatLanguageCode(r)]),s||(s=a[this.getLanguagePartFromCode(r)]),s||(s=a.default),s||[]}toResolveHierarchy(a,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],a),o=[],u=c=>{c&&(this.isSupportedCode(c)?o.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return it(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):it(a)&&u(this.formatLanguageCode(a)),s.forEach(c=>{o.indexOf(c)<0&&u(this.formatLanguageCode(c))}),o}}const Up={zero:0,one:1,two:2,few:3,many:4,other:5},Mp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class wB{constructor(a,r={}){this.languageUtils=a,this.options=r,this.logger=ur.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,r){this.rules[a]=r}clearCache(){this.pluralRulesCache={}}getRule(a,r={}){const s=lo(a==="dev"?"en":a),o=r.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:s,type:o});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let c;try{c=new Intl.PluralRules(s,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Mp;if(!a.match(/-|_/))return Mp;const p=this.languageUtils.getLanguagePartFromCode(a);c=this.getRule(p,r)}return this.pluralRulesCache[u]=c,c}needsPlural(a,r={}){let s=this.getRule(a,r);return s||(s=this.getRule("dev",r)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(a,r,s={}){return this.getSuffixes(a,s).map(o=>`${r}${o}`)}getSuffixes(a,r={}){let s=this.getRule(a,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((o,u)=>Up[o]-Up[u]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(a,r,s={}){const o=this.getRule(a,s);return o?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",r,s))}}const _p=(n,a,r,s=".",o=!0)=>{let u=hB(n,a,r);return!u&&o&&it(r)&&(u=bA(n,r,s),u===void 0&&(u=bA(a,r,s))),u},rA=n=>n.replace(/\$/g,"$$$$");class xB{constructor(a={}){var r;this.logger=ur.create("interpolator"),this.options=a,this.format=((r=a==null?void 0:a.interpolation)==null?void 0:r.format)||(s=>s),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:o,prefix:u,prefixEscaped:c,suffix:d,suffixEscaped:p,formatSeparator:A,unescapeSuffix:E,unescapePrefix:v,nestingPrefix:C,nestingPrefixEscaped:S,nestingSuffix:k,nestingSuffixEscaped:D,nestingOptionsSeparator:R,maxReplaces:N,alwaysFormat:U}=a.interpolation;this.escape=r!==void 0?r:mB,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=u?Hs(u):c||"{{",this.suffix=d?Hs(d):p||"}}",this.formatSeparator=A||",",this.unescapePrefix=E?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":E||"",this.nestingPrefix=C?Hs(C):S||Hs("$t("),this.nestingSuffix=k?Hs(k):D||Hs(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=N||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(r,s)=>(r==null?void 0:r.source)===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(a,r,s,o){var S;let u,c,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},A=k=>{if(k.indexOf(this.formatSeparator)<0){const U=_p(r,p,k,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(U,void 0,s,{...o,...r,interpolationkey:k}):U}const D=k.split(this.formatSeparator),R=D.shift().trim(),N=D.join(this.formatSeparator).trim();return this.format(_p(r,p,R,this.options.keySeparator,this.options.ignoreJSONStructure),N,s,{...o,...r,interpolationkey:R})};this.resetRegExp();const E=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((S=o==null?void 0:o.interpolation)==null?void 0:S.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:k=>rA(k)},{regex:this.regexp,safeValue:k=>this.escapeValue?rA(this.escape(k)):rA(k)}].forEach(k=>{for(d=0;u=k.regex.exec(a);){const D=u[1].trim();if(c=A(D),c===void 0)if(typeof E=="function"){const N=E(a,u,o);c=it(N)?N:""}else if(o&&Object.prototype.hasOwnProperty.call(o,D))c="";else if(v){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${D} for interpolating ${a}`),c="";else!it(c)&&!this.useRawValueToEscape&&(c=Sp(c));const R=k.safeValue(c);if(a=a.replace(u[0],R),v?(k.regex.lastIndex+=c.length,k.regex.lastIndex-=u[0].length):k.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),a}nest(a,r,s={}){let o,u,c;const d=(p,A)=>{const E=this.nestingOptionsSeparator;if(p.indexOf(E)<0)return p;const v=p.split(new RegExp(`${E}[ ]*{`));let C=`{${v[1]}`;p=v[0],C=this.interpolate(C,c);const S=C.match(/'/g),k=C.match(/"/g);(((S==null?void 0:S.length)??0)%2===0&&!k||k.length%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),A&&(c={...A,...c})}catch(D){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,D),`${p}${E}${C}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,p};for(;o=this.nestingRegexp.exec(a);){let p=[];c={...s},c=c.replace&&!it(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const A=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(A!==-1&&(p=o[1].slice(A).split(this.formatSeparator).map(E=>E.trim()).filter(Boolean),o[1]=o[1].slice(0,A)),u=r(d.call(this,o[1].trim(),c),c),u&&o[0]===a&&!it(u))return u;it(u)||(u=Sp(u)),u||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((E,v)=>this.format(E,v,s.lng,{...s,interpolationkey:o[1].trim()}),u.trim())),a=a.replace(o[0],u),this.regexp.lastIndex=0}return a}}const CB=n=>{let a=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const s=n.split("(");a=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);a==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):a==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(c=>{if(c){const[d,...p]=c.split(":"),A=p.join(":").trim().replace(/^'+|'+$/g,""),E=d.trim();r[E]||(r[E]=A),A==="false"&&(r[E]=!1),A==="true"&&(r[E]=!0),isNaN(A)||(r[E]=parseInt(A,10))}})}return{formatName:a,formatOptions:r}},jp=n=>{const a={};return(r,s,o)=>{let u=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(u={...u,[o.interpolationkey]:void 0});const c=s+JSON.stringify(u);let d=a[c];return d||(d=n(lo(s),o),a[c]=d),d(r)}},IB=n=>(a,r,s)=>n(lo(r),s)(a);class BB{constructor(a={}){this.logger=ur.create("formatter"),this.options=a,this.init(a)}init(a,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?jp:IB;this.formats={number:s((o,u)=>{const c=new Intl.NumberFormat(o,{...u});return d=>c.format(d)}),currency:s((o,u)=>{const c=new Intl.NumberFormat(o,{...u,style:"currency"});return d=>c.format(d)}),datetime:s((o,u)=>{const c=new Intl.DateTimeFormat(o,{...u});return d=>c.format(d)}),relativetime:s((o,u)=>{const c=new Intl.RelativeTimeFormat(o,{...u});return d=>c.format(d,u.range||"day")}),list:s((o,u)=>{const c=new Intl.ListFormat(o,{...u});return d=>c.format(d)})}}add(a,r){this.formats[a.toLowerCase().trim()]=r}addCached(a,r){this.formats[a.toLowerCase().trim()]=jp(r)}format(a,r,s,o={}){const u=r.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(d=>d.indexOf(")")>-1)){const d=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,d)].join(this.formatSeparator)}return u.reduce((d,p)=>{var v;const{formatName:A,formatOptions:E}=CB(p);if(this.formats[A]){let C=d;try{const S=((v=o==null?void 0:o.formatParams)==null?void 0:v[o.interpolationkey])||{},k=S.locale||S.lng||o.locale||o.lng||s;C=this.formats[A](d,k,{...E,...o,...S})}catch(S){this.logger.warn(S)}return C}else this.logger.warn(`there was no format function for ${A}`);return d},a)}}const SB=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class NB extends fc{constructor(a,r,s,o={}){var u,c;super(),this.backend=a,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=ur.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(c=(u=this.backend)==null?void 0:u.init)==null||c.call(u,s,o.backend,o)}queueLoad(a,r,s,o){const u={},c={},d={},p={};return a.forEach(A=>{let E=!0;r.forEach(v=>{const C=`${A}|${v}`;!s.reload&&this.store.hasResourceBundle(A,v)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?c[C]===void 0&&(c[C]=!0):(this.state[C]=1,E=!1,c[C]===void 0&&(c[C]=!0),u[C]===void 0&&(u[C]=!0),p[v]===void 0&&(p[v]=!0)))}),E||(d[A]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(a,r,s){const o=a.split("|"),u=o[0],c=o[1];r&&this.emit("failedLoading",u,c,r),!r&&s&&this.store.addResourceBundle(u,c,s,void 0,void 0,{skipCopy:!0}),this.state[a]=r?-1:2,r&&s&&(this.state[a]=0);const d={};this.queue.forEach(p=>{AB(p.loaded,[u],c),SB(p,a),r&&p.errors.push(r),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(A=>{d[A]||(d[A]={});const E=p.loaded[A];E.length&&E.forEach(v=>{d[A][v]===void 0&&(d[A][v]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(a,r,s,o=0,u=this.retryTimeout,c){if(!a.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:r,fcName:s,tried:o,wait:u,callback:c});return}this.readingCalls++;const d=(A,E)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(A&&E&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,a,r,s,o+1,u*2,c)},u);return}c(A,E)},p=this.backend[s].bind(this.backend);if(p.length===2){try{const A=p(a,r);A&&typeof A.then=="function"?A.then(E=>d(null,E)).catch(d):d(null,A)}catch(A){d(A)}return}return p(a,r,d)}prepareLoading(a,r,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();it(a)&&(a=this.languageUtils.toResolveHierarchy(a)),it(r)&&(r=[r]);const u=this.queueLoad(a,r,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(c=>{this.loadOne(c)})}load(a,r,s){this.prepareLoading(a,r,{},s)}reload(a,r,s){this.prepareLoading(a,r,{reload:!0},s)}loadOne(a,r=""){const s=a.split("|"),o=s[0],u=s[1];this.read(o,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${r}loading namespace ${u} for language ${o} failed`,c),!c&&d&&this.logger.log(`${r}loaded namespace ${u} for language ${o}`,d),this.loaded(a,c,d)})}saveMissing(a,r,s,o,u,c={},d=()=>{}){var p,A,E,v,C;if((A=(p=this.services)==null?void 0:p.utils)!=null&&A.hasLoadedNamespace&&!((v=(E=this.services)==null?void 0:E.utils)!=null&&v.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${s}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((C=this.backend)!=null&&C.create){const S={...c,isUpdate:u},k=this.backend.create.bind(this.backend);if(k.length<6)try{let D;k.length===5?D=k(a,r,s,o,S):D=k(a,r,s,o),D&&typeof D.then=="function"?D.then(R=>d(null,R)).catch(d):d(null,D)}catch(D){d(D)}else k(a,r,s,o,d,S)}!a||!a[0]||this.store.addResource(a[0],r,s,o)}}}const Op=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),it(n[1])&&(a.defaultValue=n[1]),it(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const r=n[3]||n[2];Object.keys(r).forEach(s=>{a[s]=r[s]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Fp=n=>{var a,r;return it(n.ns)&&(n.ns=[n.ns]),it(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),it(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((r=(a=n.supportedLngs)==null?void 0:a.indexOf)==null?void 0:r.call(a,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Nu=()=>{},kB=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})};class oo extends fc{constructor(a={},r){if(super(),this.options=Fp(a),this.services={},this.logger=ur,this.modules={external:[]},kB(this),r&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,r),this;setTimeout(()=>{this.init(a,r)},0)}}init(a={},r){this.isInitializing=!0,typeof a=="function"&&(r=a,a={}),a.defaultNS==null&&a.ns&&(it(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const s=Op();this.options={...s,...this.options,...Fp(a)},this.options.interpolation={...s.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const o=A=>A?typeof A=="function"?new A:A:null;if(!this.options.isClone){this.modules.logger?ur.init(o(this.modules.logger),this.options):ur.init(null,this.options);let A;this.modules.formatter?A=this.modules.formatter:A=BB;const E=new Qp(this.options);this.store=new Dp(this.options.resources,this.options);const v=this.services;v.logger=ur,v.resourceStore=this.store,v.languageUtils=E,v.pluralResolver=new wB(E,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),A&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(v.formatter=o(A),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new xB(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new NB(o(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(S,...k)=>{this.emit(S,...k)}),this.modules.languageDetector&&(v.languageDetector=o(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=o(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new ac(this.services,this.options),this.translator.on("*",(S,...k)=>{this.emit(S,...k)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Nu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const A=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);A.length>0&&A[0]!=="dev"&&(this.options.lng=A[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(A=>{this[A]=(...E)=>this.store[A](...E)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(A=>{this[A]=(...E)=>(this.store[A](...E),this)});const d=$l(),p=()=>{const A=(E,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(v),r(E,v)};if(this.languages&&!this.isInitialized)return A(null,this.t.bind(this));this.changeLanguage(this.options.lng,A)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),d}loadResources(a,r=Nu){var u,c;let s=r;const o=it(a)?a:this.language;if(typeof a=="function"&&(s=a),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const d=[],p=A=>{if(!A||A==="cimode")return;this.services.languageUtils.toResolveHierarchy(A).forEach(v=>{v!=="cimode"&&d.indexOf(v)<0&&d.push(v)})};o?p(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(E=>p(E)),(c=(u=this.options.preload)==null?void 0:u.forEach)==null||c.call(u,A=>p(A)),this.services.backendConnector.load(d,this.options.ns,A=>{!A&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(A)})}else s(null)}reloadResources(a,r,s){const o=$l();return typeof a=="function"&&(s=a,a=void 0),typeof r=="function"&&(s=r,r=void 0),a||(a=this.languages),r||(r=this.options.ns),s||(s=Nu),this.services.backendConnector.reload(a,r,u=>{o.resolve(),s(u)}),o}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&fE.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let r=0;r<this.languages.length;r++){const s=this.languages[r];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,r){this.isLanguageChangingTo=a;const s=$l();this.emit("languageChanging",a);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===a&&(o(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,s.resolve((...A)=>this.t(...A)),r&&r(d,(...A)=>this.t(...A))},c=d=>{var E,v;!a&&!d&&this.services.languageDetector&&(d=[]);const p=it(d)?d:d&&d[0],A=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(it(d)?[d]:d);A&&(this.language||o(A),this.translator.language||this.translator.changeLanguage(A),(v=(E=this.services.languageDetector)==null?void 0:E.cacheUserLanguage)==null||v.call(E,A)),this.loadResources(A,C=>{u(C,A)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(a),s}getFixedT(a,r,s){const o=(u,c,...d)=>{let p;typeof c!="object"?p=this.options.overloadTranslationOptionHandler([u,c].concat(d)):p={...c},p.lng=p.lng||o.lng,p.lngs=p.lngs||o.lngs,p.ns=p.ns||o.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||s||o.keyPrefix);const A=this.options.keySeparator||".";let E;return p.keyPrefix&&Array.isArray(u)?E=u.map(v=>`${p.keyPrefix}${A}${v}`):E=p.keyPrefix?`${p.keyPrefix}${A}${u}`:u,this.t(E,p)};return it(a)?o.lng=a:o.lngs=a,o.ns=r,o.keyPrefix=s,o}t(...a){var r;return(r=this.translator)==null?void 0:r.translate(...a)}exists(...a){var r;return(r=this.translator)==null?void 0:r.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const c=(d,p)=>{const A=this.services.backendConnector.state[`${d}|${p}`];return A===-1||A===0||A===2};if(r.precheck){const d=r.precheck(this,c);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,a)&&(!o||c(u,a)))}loadNamespaces(a,r){const s=$l();return this.options.ns?(it(a)&&(a=[a]),a.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{s.resolve(),r&&r(o)}),s):(r&&r(),Promise.resolve())}loadLanguages(a,r){const s=$l();it(a)&&(a=[a]);const o=this.options.preload||[],u=a.filter(c=>o.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=o.concat(u),this.loadResources(c=>{s.resolve(),r&&r(c)}),s):(r&&r(),Promise.resolve())}dir(a){var o,u;if(a||(a=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!a)return"rtl";if(Intl.Locale){const c=new Intl.Locale(a);if(c&&c.getTextInfo){const d=c.getTextInfo();if(d&&d.direction)return d.direction}}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=((u=this.services)==null?void 0:u.languageUtils)||new Qp(Op());return a.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(s.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},r){return new oo(a,r)}cloneInstance(a={},r=Nu){const s=a.forkResourceStore;s&&delete a.forkResourceStore;const o={...this.options,...a,isClone:!0},u=new oo(o);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},s){const d=Object.keys(this.store.data).reduce((p,A)=>(p[A]={...this.store.data[A]},p[A]=Object.keys(p[A]).reduce((E,v)=>(E[v]={...p[A][v]},E),p[A]),p),{});u.store=new Dp(d,o),u.services.resourceStore=u.store}return u.translator=new ac(u.services,o),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(o,r),u.translator.options=o,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ba=oo.createInstance();ba.createInstance=oo.createInstance;ba.createInstance;ba.dir;ba.init;ba.loadResources;ba.reloadResources;ba.use;ba.changeLanguage;ba.getFixedT;ba.t;ba.exists;ba.setDefaultNamespace;ba.hasLoadedNamespace;ba.loadNamespaces;ba.loadLanguages;const TB=async()=>{const n=await Ke.getItem("local:language");if(n&&G0.includes(n))return n;const a=navigator.language.split("-")[0];return G0.includes(a)?a:ky},DB=async()=>{const n=await TB();await ba.use(ov).init({resources:E1,lng:n,fallbackLng:ky,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};DB().catch(n=>{console.error("Failed to initialize i18n:",n),ba.emit("initialized")});const Vp=()=>{Xb.createRoot(document.getElementById("root")).render(h.jsx(Nx,{children:h.jsx(kx,{children:h.jsx(aI,{children:h.jsx(Rx,{children:h.jsx(Dx,{children:h.jsx(X2,{children:h.jsx(cB,{})})})})})})}))};ba.isInitialized?Vp():ba.on("initialized",Vp);
